Problem/Motivation
Display Builder uses Shoelace 2.20.1 for its UI components. Web components were chosen to isolate the builder's CSS from whatever front theme it renders inside.
Proposed resolution
Migrate to Web Awesome 3 Free.
- MIT licensed, GPL compatible.
- 70 components. Everything the module uses is covered.
- Same delivery model as today: autoloader from CDN, local fallback for CI. No build step.
- Official migration guide from Shoelace: https://webawesome.com/docs/resources/migrating-from-shoelace/
sl-* and wa-* are different element names, so both libraries can be loaded at the same time. That allows migrating one component at a time, with a working builder at every commit, instead of a single large change.
Alternatives considered and rejected: staying on an archived library, Elena which is an authoring library rather than a component set and drops shadow DOM isolation, Nord which is proprietary.
Remaining tasks
- Spike: confirm Web Awesome theme classes can be scoped to
.display-builderinstead of<html> - Load Web Awesome alongside Shoelace, register Bootstrap Icons as an icon library
- Migrate the leaf component wrappers: button, icon_button, icon, input, select, card, avatar, button_group, tabs, alert, dropdown
- Migrate menu and menu_item to
wa-dropdown-item - Rework the contextual menu, which uses a standalone menu Web Awesome does not have
- Migrate the
--sl-*CSS tokens to--wa-* - Remove Shoelace, rename
components/shoelace/tocomponents/webawesome/ - Update Playwright selectors and docs, keep the axe suite at zero violations
Each item is a separate commit. Child issues can be opened for the larger ones.
User interface changes
None intended. The Shoelace compatibility theme is used during the migration so the visual result stays identical.
API changes
The 12 SDC component IDs under display_builder: move from components/shoelace/ to components/webawesome/ in the final step.
Comments
Comment #2
mogtofu33 commented