Skip to content

feat: add shadcn admin ui - #403

Merged
loic425 merged 33 commits into
Sylius:shadcn-admin-uifrom
rem42:feat/shadcn-admin-ui
Nov 17, 2026
Merged

loic425 merged 33 commits into
Sylius:shadcn-admin-uifrom
rem42:feat/shadcn-admin-ui

Conversation

@rem42

@rem42 rem42 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Create shadcn admin ui based on bootstrap admin ui.

Screenshots

Login

Login

Dashboard

Dashboard

Grid

Grid

Form

Form

Color themes

Interchangeable color themes, enabled in the bundle configuration (plain CSS, no Tailwind rebuild needed):

sylius_shadcn_admin_ui:
    themes: [zinc, blue]

Base colors: stone, zinc, slate. Accents: blue, green, orange, rose, violet.

No theme (neutral)

Neutral theme

[zinc, blue]

zinc and blue themes

[stone, orange]

stone and orange themes

[slate, violet]

slate and violet themes

[green]

green theme

[rose]

rose theme

@camilleislasse camilleislasse 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.

Thanks @rem42 for this PR! I reviewed it and tested both themes in the demo. I put my proposals in rem42#3, I'd like your opinion and @loic425's.

Things I didn't touch:

  • "Admin panel" in sidebar.php goes through |trans but isn't a key, so it's never translated. Maybe a sylius.ui.admin_panel key in UiTranslations?
  • Row "…" menu with the keyboard: focus stays on the trigger, arrows do nothing, and with 2+ actions the second Tab closes the menu. I guess because grid actions aren't DropdownMenu:Item.
  • dropdown.default() only reads text, icon and class from button, the other Bootstrap options (disabled, icon_only, size...) are ignored. Not used anywhere in the repo though.
  • No JS test for the custom Stimulus controllers. Bootstrap has one for its copy-to-clipboard controller (yarn test in CI), the shadcn copy controller could get the same.

Found along the way, not related to this PR (both themes):

  • Update page breadcrumbs: with a custom index route, the item links to the list (/admin/speakers?id=16) instead of the show page.
  • flashes: app.session|default(null) gives null when the session has flash messages but no attribute (Session is Countable and only counts attributes), so they're not shown. Edge case, e.g. a page without a logged-in user.
  • Bootstrap accordion(): auto_close: false does nothing, false|default(true) is true.
  • docs/cookbook/admin_panel/logo.md uses sylius_admin.security.login.logo, it should be sylius_admin.security.login.page.logo.

@rem42

rem42 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

@camilleislasse i create this PR rem42#4 to add the 4 things you suggested, i hope the implementation is ok ?

@loic425
loic425 changed the base branch from main to shadcn-admin-ui November 17, 2026 13:17
@loic425
loic425 merged commit 8b14e06 into Sylius:shadcn-admin-ui Nov 17, 2026
8 checks passed
@loic425

loic425 commented Nov 17, 2026

Copy link
Copy Markdown
Member

@rem42 @camilleislasse I've merged this one on a dedicated branch, so we can start using it in our projects.

@loic425 loic425 mentioned this pull request Nov 17, 2026
1 of 4 tasks
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.

4 participants