Skip to content

[BootstrapAdminUi] Register the Stimulus controllers automatically with AssetMapper - #402

Open
loic425 wants to merge 1 commit into
Sylius:mainfrom
loic425:docs/asset-mapper-improvements
Open

loic425 wants to merge 1 commit into
Sylius:mainfrom
loic425:docs/asset-mapper-improvements

Conversation

@loic425

@loic425 loic425 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Fills the gaps found while moving a Bootstrap Admin UI (0.14) admin panel from Webpack to AssetMapper.

Bundle

  • Registers the copy-to-clipboard and theme-switcher Stimulus controllers in the application's Stimulus app, like ShadcnAdminUi does: the bundle exposes assets/controllers to AssetMapper and adds it to stimulus.controller_paths. Without this, once symfony_ux is disabled, the copy buttons and the navbar theme switcher silently do nothing.
  • Identifiers come from the file names, so they don't change (copy-to-clipboard, theme-switcher).
  • symfony/asset-mapper stays optional, with a conflict on <6.4.

Docs

  • Document assets/controllers.json, the assets/controllers/ directory and importmap:require @symfony/stimulus-bundle.
  • Load the importmap in sylius_admin.base#stylesheets to avoid a FOUC.
  • Add an "Assets" page to the Bootstrap Admin UI docs, with a workaround for older versions.

@loic425
loic425 force-pushed the docs/asset-mapper-improvements branch 3 times, most recently from a0af595 to fd8b8cd Compare November 4, 2026 14:55
@loic425
loic425 marked this pull request as ready for review November 18, 2026 08:02
@loic425
loic425 force-pushed the docs/asset-mapper-improvements branch from b260365 to b5809b5 Compare November 23, 2026 15:24
@loic425 loic425 changed the title [BootstrapAdminUi][Docs] Complete the AssetMapper setup of the admin panel [BootstrapAdminUi] Register the Stimulus controllers automatically with AssetMapper Nov 23, 2026
…th AssetMapper

- Expose the copy-to-clipboard and theme-switcher Stimulus controllers to AssetMapper and add them to stimulus.controller_paths, like ShadcnAdminUi does
- Add a conflict on symfony/asset-mapper < 6.4, which stays optional
- Document the assets/controllers.json file and the assets/controllers/ directory required by StimulusBundle
- Load the importmap in the stylesheets hook to avoid a flash of unstyled content
- Add an Assets page to the Bootstrap Admin UI documentation
@loic425
loic425 force-pushed the docs/asset-mapper-improvements branch from 10c17ca to cd9c295 Compare November 23, 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.

1 participant