cylc-ui icon indicating copy to clipboard operation
cylc-ui copied to clipboard

workflow toolbar: improve for narrower viewports

Open oliver-sanders opened this issue 2 years ago • 7 comments

Update: this has been fixed, see discussion below for more possible improvements

Long workflow IDs should be truncated to ensure the information on the right of the toolbar remains visible.

Unfortunately with really long workflow IDs this is not always the case:

Screenshot 2022-03-03 at 09 29 04 Screenshot 2022-03-03 at 09 29 09

Sometimes the status string gets broken onto multiple lines. Sometimes the control icons, status string & add-view button are all pushed off the toolbar completely.


Related to this we could look at reducing directory names e.g. turn foo/bar/baz/pub into f/b/b/pub when there is not enough space for the full name.

Note: The full ID of the workflow can be obtained by clicking on the mutation button.

Pull requests welcome! This is an Open Source project - please consider contributing a bug fix yourself (please read CONTRIBUTING.md before starting any work though).

oliver-sanders avatar Mar 03 '22 09:03 oliver-sanders

Is there a reason not to allow the title to wrap onto another line (so the toolbar occupies more height)?

MetRonnie avatar Mar 04 '22 17:03 MetRonnie

Truncation would look a lot nicer. We could supply the full name in a tooltip?

hjoliver avatar Mar 07 '22 04:03 hjoliver

Wrapping onto multiple lines would be ugly and require vertical expansion of the toolbar which would cut into the workflow workspace on smaller screens. The full ID is be available via the mutation menu.

(note we should try to avoid on-hover tooltips as they are not mobile friendly, on-tap/click are ok but are typically used with a button style icon to make it clear they are interactive).

oliver-sanders avatar Mar 07 '22 09:03 oliver-sanders

A problem with the current toolbar height is it really doesn't show much of the name at all on mobile (and this is after I've reduced the font size of the name):

This can be partially remedied by hiding the status on narrow viewports and making it available in the mutation menu

MetRonnie avatar Mar 07 '22 10:03 MetRonnie

The original idea for mobile was to break the toolbar over multiple lines: https://github.com/cylc/cylc-ui/issues/87

Screenshot 2022-03-07 at 11 05 55

(note the mobile view here does not support lumino tabs, you can only open one view at a time)

Screenshot 2022-03-07 at 11 08 25

oliver-sanders avatar Mar 07 '22 11:03 oliver-sanders

If we want to make the ellipsis happen in the middle of the workflow name, rather than the end, this is a useful trick: https://css-tricks.com/using-flexbox-and-text-ellipsis-together/

MetRonnie avatar Mar 07 '22 13:03 MetRonnie

This has mostly been fixed by #967, though there are still some enhancements that could be made as discussed in the thread. Changing the title and bumping to a later milestone

MetRonnie avatar Apr 05 '22 10:04 MetRonnie