Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding a sort key field #694

Closed
ddbeck opened this issue Mar 15, 2024 · 4 comments
Closed

Consider adding a sort key field #694

ddbeck opened this issue Mar 15, 2024 · 4 comments

Comments

@ddbeck
Copy link
Collaborator

ddbeck commented Mar 15, 2024

I have no strong feelings but it irked me before that when looking up [features] alphabetically you basically need to check B for Bluetooth and then again W for Web Bluetooth to find it. This problem becomes quite obvious when you look at https://developer.mozilla.org/en-US/docs/Web/API for example.

Originally posted by @Elchi3 in #691 (comment)

I wonder if we can help solve this problem by letting feature IDs and names match conventional use (e.g., "WebUSB", "Web Bluetooth), but provide alternate keys for sorting (e.g., "usb", "bluetooth").

We might also consider using those keys as aliases, too (so that we can't ever accidentally collide bluetooth with web-blueooth).

@foolip
Copy link
Collaborator

foolip commented Mar 15, 2024

What would be the sort keys of Web Audio, Web Bluetooth, WebUSB, and WebVTT?

As long as some start with "web" I think sorting will still seem weird.

@captainbrosset
Copy link
Contributor

We could also ignore common prefixes like Web when doing sorting. Not sure where we would sort though. This repo doesn't publish a sorted list of features (yet). If we did, then we could consider "web" as a prefix that should be ignored when sorting.

@foolip
Copy link
Collaborator

foolip commented Mar 15, 2024

I should have stated my opinion instead of asking a socratic question :)

I think WebVTT should not be sorted as VTT, because it's never called that, and VTT doesn't stand on its own. It expands to Video Text Tracks, but that by itself sounds more like a reference to video.textTracks, which is agnostic of text track format, while WebVTT is a specific text track file format.

Typically when there's a sort key, there's also an alternate string representation that makes sense of the sort order you're seeing. "Beatles, The" might appear under B. "Audio, Web" wouldn't work. Maybe "(Web) Audio" would work. But not "(Web)VTT".

I just think this will be messy, and it's better to provide a search field than to find features in an alphabetical list.

@ddbeck
Copy link
Collaborator Author

ddbeck commented Mar 18, 2024

OK, I'm convinced that a sort key is perhaps not ideal for solving this problem. Maybe this is something that would be better handled as short names (e.g., "Bluetooth" for "Web Bluetooth" but "WebVTT" would have no shorter variant). For something like MDN's https://developer.mozilla.org/en-US/docs/Web/API, you could choose, for instance, to have entries in both places, like an printed index: "Bluetooth, see Web Bluetooth".

Which is a long way of saying, I guess I move to close this issue.

@foolip foolip closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants