-
-
Notifications
You must be signed in to change notification settings - Fork 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
Add a new Twig component to create Action Menus #6649
base: 4.x
Are you sure you want to change the base?
Conversation
Hey Javier! just a heads-up: after symfony/ux#2019, anonymous components now have native bundle support. This might make the workaround mentioned in the article unnecessary. Let me know if there's anything else I can help with. |
@yceruto thanks for your tip. I tried removing the config in
I think it's related to having defined |
Well, the default convention uses the Twig Could you elaborate a bit more on why you want to create a new |
On the application side, if you want to override that component, you can create a new template at the following path: |
Becuase |
In that case, adding an extra Twig namespace |
By the way, in the description, you set |
This is the first anonymous Twig Component that we added to the project. It's modeled after GitHub's
ActionMenu
component (https://primer.style/components/action-menu) and allows to create dropdowns.Sadly, using this component means that we lost the
{% block user_menu %}...{% endblock %}
TWig block in the template. This is because I can't make it work with the new Twig component. If anybody knows how to keep that block, please tell me. Thanks!Again, this was possible thanks to the excellent article written by @yceruto in https://dev.to/yceruto/bundling-your-symfony-ux-twig-components-4997
Just a quick comment for @yceruto. In this section: https://dev.to/yceruto/bundling-your-symfony-ux-twig-components-4997#bundling-uionly-components you propose to use this:
This didn't work for me because the application that installs the bundle might not have defined the
templates/bundles/AcmeBundle/
dir. Maybe I'm doing something wrong ... but in any case, I updated it as follows: