ohbendy / Scripts-of-SEAsia

Listing all known indigenous scripts of SEAsia
2 stars 0 forks source link

Feature request: sortable table rows #3

Open ohbendy opened 3 months ago

ohbendy commented 3 months ago

Some people will want to sort by country, language, perhaps Unicode status.

sovichet commented 3 months ago

It can be done with jQuery and this DataTable library. I've tried it, but we have an issue because the first column (Script) does not have enough data. So it will be considered empty.

Here's when sorted by Script.

Screenshot 2024-06-05 at 9 46 37 at night

Here's when searched.

Screenshot 2024-06-05 at 9 45 33 at night Screenshot 2024-06-05 at 9 45 07 at night
ohbendy commented 3 months ago

Thanks for looking at this! I did wonder what would happen with the empty spaces. I'm not sure how to deal with those, it's going to add extra clutter if every script name is repeated for every language, and if we also have to add an 'orthography name' to every language, to be able to sort by orthography, we'll have to invent names for the orthographies that don't really have names. Thoughts?

sovichet commented 1 month ago

I think this issue has been solved already. Closing now.

ohbendy commented 1 month ago

I noticed we've got the same problem of empty cells when filtering. Here we see Tai Sar is listed under Round Script (reformed) but when we filter and the Shan row is not included, that category disappears. Will that be easier to manage with a .js source instead of .md?

Screenshot 2024-07-28 at 18 55 32

Screenshot 2024-07-28 at 18 52 44

sovichet commented 3 weeks ago

This is from the v2 codebase search/filter. Can you confirm this is correct?

Screenshot 2024-08-20 at 5 36 30 in the afternoon

ohbendy commented 3 weeks ago

Sorry I see I didn't explain properly. Here's the problem:

Tai Sar appears with various orthographies in the full list before searching:

tai sar yes

But when searching for it, the orthographies disappear because they're on lines that aren't displayed, but we need those to show:

Tai Sar no

sovichet commented 3 weeks ago

Ah I see. Technically, in the current data/table, there isn't Long script (traditional) (Lik Hto Ngouk, Lik To Yao), etc. in those rows, so it's not showing. I'd suggest repeating the text for those rows.

Currently, we are grouping the rows by script; if we are to also group them by Orthography and it's happening in all other rows, we can consider updating the code.

ohbendy commented 3 weeks ago

Right, but also the script isnt repeated in those rows, but it shows when searching. Can't it do the same for orthographies? I don't want to fill up the table with repeated info