element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
75 stars 12 forks source link

Converge on displaying empty list items and numbered lists #189

Open kittykat opened 2 years ago

kittykat commented 2 years ago
-
- foo
+
+ foo
*
* foo
2021.
2021. foo

^ should be displayed to users in the same way on all three platforms.

Currently, it's displayed like this:

kittykat commented 2 years ago

Proposal for feedback:

  1. Lists with single items should be displayed literally, e.g.

    • 2021. Oct 12 should be displayed just like that rather than as 21. Oct 12 (Web), 1. Oct 12 (Android) or Oct 12 (iOS)
    • + foo should display literally, same as \+ foo
    • * foo should display literally, same as \* foo
    • - foo should display literally, same as \- foo
  2. \123. should display as "123." (in web, only 123\. seems to work right now)

  3. For *, - and +, e.g.:

    *
    * foo

    should be shown as

    • foo

    This is broken on Android, but working on iOS and web

  4. Changing between *, + and - should start a new unordered list with extra spacing between them as currently happens on web and iOS (broken on Android)

  5. If possible, the alignment for numbered list should be based off longest number so lists which are 100+ items long can still show the number correctly. This is useful if the user is, e.g., discussing a long numbered document with a group or in a DM. Ideally alignment should be per message with enough space for the longest number in the message.

  6. Blank line between list items should be considered to be the end of one list and start of the next list.

dkasak commented 2 years ago

The above proposal sounds good to me and it encompasses all problematic cases which I can think of right now.

Note: When thinking about this, we need to take care to separate the case of a single message with a single list of N items and N messages each containing a single list with a single item. Both of these cases are currently rendered the same so they are sometimes mistaken as the same, but in the former case we have just a single list and in the latter cases we necessarily have N lists.

Changing between *, + and - should start a new unordered list with extra spacing between them as currently happens on web and iOS (broken on Android)

This should also be the behaviour if the list items use the same character but have empty lines interspersed.

So this is a compact list:

- a
- b
- c

And this is a loose list:

- a

- b

- c