Repository navigation
Replies: 1 comment
|
Thank you for the proposal. The supported browsers are now listed in the installation guide (v0.11.8): Chrome and Edge 111, Firefox 121 and Safari 16.2 or later, with Firefox 125 or Safari 17 for the segment editor. CI checks for the floor are not planned at this time. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
Speakr ships modern CSS and ES2020 JavaScript, but the repository defines no browser floor and no configuration that tools can read, so the supported range is implicit and rises whenever a new construct is added. The practical fix is to choose a floor, record it once, and let existing linters report anything that exceeds it, instead of maintaining per-rule fallbacks for browsers the project does not support.
Affected Version
v0.11.7
Requested Feature
Document the supported browsers, encode the same list in a
.browserslistrcfile, and run a CSS compatibility linter and an ECMAScript check in CI against that list. Keep features such as@view-transitionas progressive enhancement, and do not add blanket@supportswrappers or duplicated fallback declarations.Proposed Implementation
.browserslistrcat the repository root with the matching queries (last 2 Chrome versions,last 2 Edge versions,last 2 Firefox versions,Firefox ESR,last 2 Safari versions,last 2 iOS major versionsandlast 2 ChromeAndroid versions), so the documented and machine-readable ranges have one source of truth.stylelintandstylelint-no-unsupported-browser-featuresas dev dependencies, enable onlyplugin/no-unsupported-browser-featuresat warning severity withignorePartialSupport, and runnpx stylelint "static/css/**/*.css"in CI.es-checkas a dev dependency and run it incheckBrowsermode against.browserslistrc, so JavaScript syntax above the floor fails the build.:has(),color-mix(),scrollbar-gutterandcontent-visibilityrules unchanged, because a browser that does not support them ignores the declaration and the degradation is cosmetic.@view-transitionatstatic/css/styles.css:1-8documented as a Chromium-and-Safari enhancement, and keepfield-sizing: contentatstatic/css/styles.css:4015as is becausestatic/js/modules/asr-editor/pane.js:33already detects support and falls back to manual sizing.Expected Behavior
.browserslistrcand CI checks describe the same browser range..browserslistrcedit.Root Cause Analysis
The repository has no browser support policy, no
.browserslistrcand no compatibility check;package.jsonholds test tooling only, andstatic/css/andstatic/js/contain no@supportsrule. The floor is therefore whatever the newest construct requires, and a future:has(),color-mix()or ES2021 feature can raise it without anyone noticing.The current code is already modern: it uses
:has()in 93 places,color-mix()in 89, and ES2020 optional chaining and nullish coalescing in shipped modules. Optional chaining needs Chrome 80, Firefox 74 and Safari 13.1,:has()needs Chrome 105, Firefox 121 and Safari 15.4, andcolor-mix()needs Chrome 111, Firefox 113 and Safari 16.2, all well below the proposed floor.Chasing Chrome 79 or Safari 15.4 would make compatibility expensive, because each construct would need a hand-written fallback.
@view-transitionis already correctly treated as an enhancement, andfield-sizingalready has a JavaScript fallback, so those two need no change.Additional Context
One construct to watch is
field-sizing, added in Chrome 123, Firefox 152 and Safari 26.2; the current Firefox ESR already includes it, and an older ESR would fall back through the existing JavaScript guard atstatic/js/modules/asr-editor/pane.js:33. The vendored markdown parser needs Chrome 92, Firefox 90 and Safari 15.4, and@view-transitionneeds Chromium 126 and Safari 18.2, so neither raises the floor for a modern support policy.Browserslist and both checks read
.browserslistrc, so the policy has one source of truth. The stylelint plugin's own guidance is to keep the compatibility rule at warning severity, because it cannot detect a fallback that already exists; that is why the CSS side is advisory whilees-checkis blocking.A few Chromium-first enhancements may still appear as warnings; the policy should name them as accepted so they are not treated as regressions. Lazy loading the markdown parser is a separate performance change with no compatibility impact at this floor.
All reactions