Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Make long song titles with the same prefix visually distinguishable #52

Open
derat opened this issue Jan 11, 2023 · 0 comments
Open

Make long song titles with the same prefix visually distinguishable #52

derat opened this issue Jan 11, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@derat
Copy link
Owner

derat commented Jan 11, 2023

It'd be nice to elide titles differently in the song-table component when there are a bunch that start with the same prefix:

Screenshot 2023-01-11 08 49 10

It looks like text-overflow has a two-value form for specifying different behavior for the start and end of the text, but per https://caniuse.com/mdn-css_properties_text-overflow_two_value_syntax it's only supported in Firefox. (https://chromestatus.com/feature/5090725653905408 was just tracking overflow, not text-overflow.)

Here are some hacks:

It sounds like the best CSS option might be using direction: rtl, but that seems like it might cause other problems. unicode-bidi: plaintext might also be needed to prevent punctuation from being treated as LTR.

The other option would be mangling the titles via JS, but that also feels gross. For example, I could imagine something like this: if a title overflows and shares its first n chars with the previous title, then replace the prefix with . I'd probably want to scan the whole table and repeat that process whenever the table is changed. Yuck.

@derat derat added the enhancement New feature or request label Jan 11, 2023
@derat derat self-assigned this Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant