Page 1 of 1

Problem when sorting a list

Posted: Fri Oct 07, 2022 8:56 pm
by susannecm
Hi everyone,
I am trying to sort an unordered list inside a table cell, but nothing happens.
Is this on purpose, or could I be doing something wrong?
Thank you for your help
Susanne

Re: Problem when sorting a list

Posted: Mon Oct 10, 2022 2:24 am
by chrispitude
Hi Susanne,

I don't think you're doing anything wrong. I was able to reproduce this issue in the Oxygen v25 nightly build (2022092906).

Re: Problem when sorting a list

Posted: Mon Oct 10, 2022 8:05 am
by Radu
Hi,

Can you give me a small sample topic and a sequence of steps?
Right I cannot reproduce the problem, so I have a DITA topic like this:

Code: Select all

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_xsh_pkf_dvb">
    <title>abc</title>
    <body>
    <table id="table_qlq_skf_dvb">
      <title>T1</title>
      <tgroup cols="2">
        <colspec colname="c1" colnum="1" colwidth="1*"/>
        <colspec colname="c2" colnum="2" colwidth="1*"/>
        <tbody>
          <row>
            <entry>
              <ul id="ul_i5y_pkf_dvb">
                <li>l3</li>
                <li>l2</li>
                <li>l1</li>
              </ul>
            </entry>
            <entry/>
          </row>
          <row>
            <entry/>
            <entry/>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
I open it in the Author visual editing mode, select all three list items, then invoke the toolbar action "Sort the cells of a table or the items of a list" with the defaults and it sorts the entries. I tested with both Oxygen 24.1 and 25.0.
Regards,
Radu

Re: Problem when sorting a list

Posted: Mon Oct 10, 2022 2:12 pm
by chrispitude
Hi Radu,

I see what was happening, at least for me.

If you select the <ul> and right-click, you will see a Sort context item whose dialog looks a lot like the sort dialog you get when you do the same thing for a <ul> outside a table. However, the dialog is for table rows, not list items.

I was able to sort the list by either (1) putting the cursor inside the <ul> without selecting any list items, or (2) selecting the list items of interest, then right-clicking and choosing Other actions > Sort.

Re: Problem when sorting a list

Posted: Mon Oct 10, 2022 6:30 pm
by susannecm
Yes, that was the problem! :)
If I select the ul element within a table cell, the software wants to sort rows, even though that doesn't make much sense given the selection.
Easy to handle if you know how, thank you!

Re: Problem when sorting a list

Posted: Tue Oct 11, 2022 7:05 am
by Radu
Hi,
All clear now, I added an internal issue for it with ID:
EXM-51575 Sort contents of unordered list inside table cell actually sorts table rows
If we manage to fix it in a future version we'll update this forum thread.

Regards,
Radu

Re: Problem when sorting a list

Posted: Fri Mar 17, 2023 9:38 am
by Radu
Hi,
As an update we released Oxygen 25.1 which should have a fix for this.
Regards,
Radu