Skip to content

Add enums to sort by browser feature support#1073

Merged
jcscottiii merged 2 commits intomainfrom
jcscottiii/expand-sorting-enum
Jan 28, 2025
Merged

Add enums to sort by browser feature support#1073
jcscottiii merged 2 commits intomainfrom
jcscottiii/expand-sorting-enum

Conversation

@jcscottiii
Copy link
Collaborator

No description provided.

@jcscottiii
Copy link
Collaborator Author

@jrobbins I currently use desktop_availability_{browser}_{direction} to match the column keys in the frontend:

DesktopAvailabilityChrome = 'desktop_availability_chrome',
DesktopAvailabilityEdge = 'desktop_availability_edge',
DesktopAvailabilityFirefox = 'desktop_availability_firefox',
DesktopAvailabilitySafari = 'desktop_availability_safari',

But when we bring on mobile support (#996), we will use the keys from web features: https://github.com/web-platform-dx/web-features/blob/580ce2ca36a2a603efa15df46592569a08f802d0/packages/compute-baseline/src/baseline/core-browser-set.ts#L3-L12

export const identifiers = [
  "chrome",
  "chrome_android",
  "edge",
  "firefox",
  "firefox_android",
  "safari",
  "safari_ios",
];

Thoughts on removing the desktop_ prefix so that enum will be availability_{browser}_{direction}?

@jcscottiii jcscottiii requested a review from jrobbins January 27, 2025 16:51
@jrobbins
Copy link
Collaborator

Thoughts on removing the desktop_ prefix so that enum will be availability_{browser}_{direction}?

That seems fine. It is shorter, and for the mobile cases, the browser name includes the word to differentiate from desktop.

@jcscottiii jcscottiii force-pushed the jcscottiii/expand-sorting-enum branch from 9c92d0f to 93e4170 Compare January 28, 2025 15:46
@jcscottiii jcscottiii added this pull request to the merge queue Jan 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 28, 2025
@jcscottiii jcscottiii added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit 528fa25 Jan 28, 2025
6 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/expand-sorting-enum branch January 28, 2025 18:18
@past past mentioned this pull request Jan 29, 2025
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

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add a new set of sort by browser availability date option to the sort enum

2 participants