-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Easier way to override button #7306
Easier way to override button #7306
Conversation
c987e77
to
915d356
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.
makes sense to me 👍
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.
Should we prefix these blocks with sonata_
? looks like almost all of our blocks are prefixed
The block I would say it's better without the prefix, all of these template are inside the sonata project, there is no need to add this extra prefix. To me is kinda the same than prefixing all the method with sonata, like |
Based on sonata-project/dev-kit#205 (comment) looks like it was decided to add |
This was voted 5 year ago, and I checked and have difficulties to call this a standard when 90% of the blocks of the SonataAdmin code are not prefixed by This is more consistent to me to respect the "empirical standard" of this project. Since almost all the block are already not prefixed. WDYT @sonata-project/contributors ? |
Yeah I would agree here. I don't see the benefit of those prefixes. |
Subject
I am targeting this branch, because BC.
When you want to override a button label, or changing some design, you currently have to override the whole form actions, and copy paste all the logic.
With these new blocks, you can now override only one button without taking care bout the logic behind.
WDYT ?
Changelog