feat: #3620060 Opt the icon props into the Canvas Icon Picker with x-canvas-icon

Issue: https://www.drupal.org/project/vartheme_bs5_horizonaid/issues/3620060

Adds x-canvas-icon: ['bootstrap_icons'] to the icon prop of seven components, keeping every enum exactly as it is: badge (43 curated ids), bootstrap-icon (2,078), button (51), date (7), icon (51), card-icon (43), icon-toggle (50).

components/foundation/icons is deliberately left alone: it is noUi: true and has no enum, so it is never offered in the Canvas UI.

This cannot land on its own. Converting the props changes the component version hash Drupal Canvas derives, and recipes/horizonaid/recipe.yml hardcodes 134 component_version values, 13 of them pre-conversion hashes of these components. Installed alone, a fresh Horizon Aid install fails with:

There were validation errors in canvas.content_template.node.blog.impressed_card_large:
- component_tree.24ba3122-...component_version: '13d91759ac4fcdfe' is not a version that
  exists on component config entity 'sdc.vartheme_bs5_horizonaid.badge'.

Confirmed as caused by this change and not pre-existing: with the theme reverted, the same build installs green. Land together with https://www.drupal.org/project/horizonaid/issues/3620065, which re-exports the affected component configs so the old hashes survive as stored versions.

Requires drupal/canvas_icon_picker >= 1.0.3, installed by Varbase Admin Base in https://www.drupal.org/project/varbase_admin_base/issues/3620064.

Verified on two fresh Varbase 11 installs with the Horizon Aid site template, one from a codebase built from scratch: every stored version resolves the icon prop to the picker; allowed_icon_ids match the manifests exactly (43/2078/51/7/51/43/50); searching heart on the Button returns nothing because it is not curated, arrow-right returns its two curated matches; picking arrow-right stores the bare id and the Donate button renders bi bi-arrow-right anonymously; all eight Canvas pages return 200; picker endpoints 403 anonymously; zero log entries at Error or worse.

14 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
Edited by Rajab Natshah

Merge request reports

Loading
Loading