Skip to content

Conversation

loic425
Copy link
Member

@loic425 loic425 commented Sep 24, 2025

Add a better DX for the admin ui context.

- {% set dashboard_path = hookable_metadata.context.routing.dashboard_path|default('/admin') %}
+ {% set dashboard_path = sylius_admin_ui_context.routing.dashboardPath %}

Then, we have an autocompletion on our IDE.
image

@loic425 loic425 marked this pull request as draft September 24, 2025 13:01
@loic425 loic425 marked this pull request as ready for review September 25, 2025 07:31
'@symfony/ux-live-component' => [
'path' => './vendor/symfony/ux-live-component/assets/dist/live_controller.js',
],
'tom-select/dist/css/tom-select.bootstrap4.css' => [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need both?

Copy link
Member Author

@loic425 loic425 Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's automatical now, after the composer install. Here, it's only on the test application.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should both Context and RoutingContext have interfaces? In case I would want to override those classes at end-user projects.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want user to change those contexts for now. That's only to bring access to admin ui configuration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either interfaces or some other extension point would be great, but yeah, it could be added at a later date.

Copy link
Member Author

@loic425 loic425 Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but before adding some extension point, it's preferable to be stable on data accessors. I think I need to add login path and things like that before. Or just adding the interface on the main context class.

@loic425
Copy link
Member Author

loic425 commented Sep 25, 2025

I really didn't think it through; we can use the routes provided now.
Replaced by #283

@loic425 loic425 closed this Sep 25, 2025
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.

3 participants