Skip to content

Consider adding a sort key field #694

Closed as not planned
Closed as not planned

Description

@ddbeck

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).

Activity

  1. foolip commented on Mar 15, 2024

    @foolip
    Collaborator

    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.

  2. captainbrosset commented on Mar 15, 2024

    @captainbrosset
    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.

  3. foolip commented on Mar 15, 2024

    @foolip
    Collaborator

    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.

  4. ddbeck commented on Mar 18, 2024

    @ddbeck
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions