-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Admin] Improve highlighting menu items #14324
Conversation
->addChild('taxons', ['route' => 'sylius_admin_taxon_create', 'extras' => ['routes' => [ | ||
['route' => 'sylius_admin_taxon_create_for_parent'], | ||
['route' => 'sylius_admin_taxon_update'], | ||
]]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you use the ::setExtra
method instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that, but it doesn't work, I'm not sure why and haven't searched deeper 🤷🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you recheck, because I just added
->setExtra('routes', [
['route' => 'sylius_admin_taxon_create'],
['route' => 'sylius_admin_taxon_create_for_parent'],
['route' => 'sylius_admin_taxon_update'],
])
and it seems to work just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see the difference, you are passing also the "main" route to extras, which I didn't do, so this approach requires duplication of one route in each menu item, now, I'm not sure if it looks better 😄
4b09db7
to
46bd86e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some doubts, that we have to declare it manually, but let's go with what we have right now and perhaps improve it in the future
Examples:
![Zrzut ekranu 2022-09-19 o 11 46 10](https://user-images.githubusercontent.com/6140884/190995194-99e09aa3-1e9f-4944-a83e-c909eef16540.png)
Before:
After:
![Zrzut ekranu 2022-09-19 o 11 45 49](https://user-images.githubusercontent.com/6140884/190995220-d93b35da-f29c-4b00-add0-ccd2a6f7b469.png)