feat: #3620057 Opt the icon props into the Canvas Icon Picker with x-canvas-icon
Issue: https://www.drupal.org/project/vartheme_bs5_educare/issues/3620057
Adds x-canvas-icon: ['bootstrap_icons'] to the icon prop of six components, keeping every enum exactly as it is: badge (43 curated ids), bootstrap-icon (2,078), button (51), icon (51), card-icon (43), icon-toggle (50).
CanvasIconPickerHooks::canvasStorablePropShapeAlter() forces field_type: string, sets allowed_icon_pack from the x-canvas-icon array and allowed_icon_ids from the enum. The picker stores the bare id, which is what 'bi-' ~ icon in bootstrap-icon.twig already expects, so there is no pack-prefix handling to add and no template to touch.
components/foundation/icons is deliberately left alone: it is noUi: true and has no enum, so it is never offered in the Canvas UI.
Requires drupal/canvas_icon_picker >= 1.0.3, which Varbase Admin Base installs in https://www.drupal.org/project/varbase_admin_base/issues/3620064. The matching recipe-side change is https://www.drupal.org/project/educare/issues/3620058, and it should land with this one.
Verified on two fresh Varbase 11 installs with the Educare site template, including one from a codebase built from scratch: the picker renders in the Canvas sidebar with previews, search and a pack filter; no [icon] select element remains; 51 curated ids are offered where the prop has an enum against 2,092 where it does not; picking people stores people and renders as bi bi-people to an anonymous visitor; every Canvas page returns 200 anonymously and the picker endpoints return 403; zero log entries at Error or worse.
12 added lines, nothing removed.
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release