cylc / cylc-ui

Web app for monitoring and controlling Cylc workflows
https://cylc.github.io
GNU General Public License v3.0
37 stars 27 forks source link

Table view: sort empty entries last regardless of sort order #1762

Closed MetRonnie closed 4 months ago

MetRonnie commented 5 months ago

Closes https://github.com/cylc/cylc-ui/issues/1255

When sorting by e.g. Submitted Time, an absence of a value means a job has not yet been submitted by the task that this row corresponds to. If sorting ascending, it is therefore logical that empty values should come last. But if sorting descending, you are probably interested in the newest jobs so again the empty values should come last. Note this is somewhat different behaviour to the linked issue.

Check List

oliver-sanders commented 4 months ago

I'm not so sure about putting undefined vales after defined ones, it might make more sense to put them before. E.g. it makes sense for a task which has not yet submitted to be listed before one which has (because it is yet to submit).

A notable use case for the table view is to view the most recent submitted/started/finished jobs (ala Cylc Review). Unfortunately, giving undefined items after defined ones makes this difficult as all the n>0 tasks come first:

Screenshot from 2024-05-22 11-24-02

MetRonnie commented 4 months ago

E.g. it makes sense for a task which has not yet submitted to be listed before one which has (because it is yet to submit).

No I don't think it does. If you sort by ascending submitted time, surely you want the oldest submissions at the top, but instead you would get tasks that have not been submitted yet.

So should we sort empty values after real values all the time, then (regardless of ascending/descending order)?

oliver-sanders commented 4 months ago

So should we sort empty values after real values all the time, then (regardless of ascending/descending order)?

That seems sensible (any other choice is arbitrary) but makes it a Vuetify problem?