Skip to content

#772 Improve Browser Support for new components#816

Open
NoelDeMartin wants to merge 6 commits into
SolidOS:stagingfrom
NoelDeMartin:772-browser-support
Open

#772 Improve Browser Support for new components#816
NoelDeMartin wants to merge 6 commits into
SolidOS:stagingfrom
NoelDeMartin:772-browser-support

Conversation

@NoelDeMartin

@NoelDeMartin NoelDeMartin commented Jun 24, 2026

Copy link
Copy Markdown
Member

This PR aligns the features used in the new components with our target browsers, in particular:

  • Removes :state() usage.
  • Removes CSS anchor positioning usage.
  • Removes popover usage.
  • Tweaks <dialog> usage. It is supported by almost all our target browsers, but it should be "usable" for the 0.01% that don't.

It also improves a11y for the Combobox component, and cleans up some Vite and package.json configs.

- Update dependencies range to dev prereleases
- Move tailwindcss to devDependencies (reset CSS is bundled in dist)
- Remove React dependencies (no longer needed for Storybook 10)
@NoelDeMartin NoelDeMartin changed the base branch from main to staging June 24, 2026 15:26
@NoelDeMartin NoelDeMartin self-assigned this Jun 24, 2026
@NoelDeMartin NoelDeMartin force-pushed the 772-browser-support branch from fa69b34 to 5bb90bd Compare June 25, 2026 11:47
@NoelDeMartin NoelDeMartin requested a review from timea-solid June 25, 2026 11:48
@NoelDeMartin NoelDeMartin marked this pull request as ready for review June 25, 2026 11:48
@SharonStrats SharonStrats requested a review from Copilot June 25, 2026 11:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves cross-browser compatibility for Solid UI components and build outputs by removing reliance on newer/less-supported platform features (Popover API, :state() selectors, direct FS copy/write steps) and consolidating build-time Babel behavior into solidos-toolkit.

Changes:

  • Replace local Vite Babel plugin with solidos-toolkit/vite and centralize Lit decorator path configuration.
  • Improve runtime browser support by updating component behavior (Combobox popup implementation, Dialog showModal() guard, :state()data-state-*).
  • Make build artifacts more bundler-native via emitFile() (CSS d.ts + CDN legacy alias generation).

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vite.config.mts Switch Babel integration to solidos-toolkit/vite and pass Lit decorator paths.
vite-config/styles.ts Emit theme.css.d.ts via Rollup asset emission instead of writing to disk.
vite-config/components.ts Introduce litDecoratorPaths configuration used by Babel plugin.
vite-config/cdn.ts Use solidos-toolkit/vite Babel + change legacy alias generation from FS copy to bundle emission.
vite-config/babel.ts Remove the repo-local Babel plugin implementation.
tsconfig.json Include .storybook/**/* in TypeScript compilation scope.
src/lib/components/web-component/WebComponent.ts Replace ElementInternals state toggling with data-state-* attributes for broader CSS support.
src/lib/components/traits/InputTrait.ts Add stable label id for improved ARIA wiring.
src/components/dialog/Dialog.ts Guard showModal() usage for browsers without support.
src/components/dialog/Dialog.styles.css Remove closed-dialog display:none override.
src/components/dialog-provider/DialogProvider.ts More reliable slot lookup via querySelector('slot').
src/components/combobox/Combobox.ts Replace Popover API usage with wa-popup and implement keyboard/mouse open/selection logic + ARIA.
src/components/combobox/Combobox.styles.css Style wa-popup and update listbox/active option styling.
src/components/avatar/Avatar.styles.css Update state styling to data-state-* selectors.
src/components/account/Account.styles.css Update state styling to data-state-* selectors.
package.json Dependency adjustments (introduce solidos-toolkit, move/update versions).
package-lock.json Lockfile updates reflecting dependency and transitive changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/combobox/Combobox.ts Outdated
Comment thread src/components/combobox/Combobox.ts Outdated
Comment thread src/components/dialog/Dialog.ts
Comment thread vite-config/cdn.ts
@NoelDeMartin NoelDeMartin linked an issue Jun 25, 2026 that may be closed by this pull request
@NoelDeMartin NoelDeMartin force-pushed the 772-browser-support branch from 5bb90bd to b53f40b Compare June 25, 2026 14:07
NoelDeMartin and others added 4 commits June 25, 2026 17:31
- Reuse babel config from solidos-toolkit
- Replace closeBundle usage with generateBundle emits
- Fix storybook TS config
- Use bundler module resolution
Only 0.01% of our target browsers don't support it (KaiOS and Opera Mini), so it's not worth adding any polyfills. However, these changes make it at least usable on these browsers given that a <dialog> will be rendered as a plain unknown element instead of crashing.
Prompts:
- Looking at https://github.com/shoelace-style/webawesome/blob/next/packages/webawesome/src/components/select/select.ts, can you update the Combobox component to be accessible? Also, replace the popup and anchor CSS positioning by using Web Awesome's popup instead (wa-popup).
- Can you review the ARIA guidelines for our current implementation? https://www.w3.org/WAI/ARIA/apg/patterns/combobox/

AI Summary of the work:
- Replaced native popover and CSS anchor positioning with wa-popup
- Added combobox ARIA roles, states, and keyboard navigation
- Aligned aria-selected, labeling, and keyboard behavior with APG guidelines
- Close popup on outside click or focus, Escape, Tab, and empty filter results
- Added label ids in InputTrait for aria-labelledby

Co-Authored-By: Cursor <cursoragent@cursor.com>
@NoelDeMartin NoelDeMartin force-pushed the 772-browser-support branch from b53f40b to d738e7d Compare June 25, 2026 15:31
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.

Review a11y for design system and primitive Web Components Improve Browser Support for design system and primitive Web Components

3 participants