-
-
Notifications
You must be signed in to change notification settings - Fork 165
Extract palette and boxes building in data container #8285
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
base: 5.x
Are you sure you want to change the base?
Conversation
I would argue that we don't add anything at all to |
I agree that's a reason not to (currently) add legend support. But a turbo-based file manager should also allow me to render (custom) fields possibliy in palettes, maybe from a DCA? Since everything in Contao works that way? But that's a discussion for a different ticket :) |
I have an incredible new feature idea that would require this PR. CS and tests fixed now. I hope this can make it into 5.6? 🙃 |
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 haven't tested if things still work like before but I'd argue that we can still fix things. This is already a win because it moves logic from the behemoths that are the DC_*
classes to a separate service which is now even covered by tests. So this is a 👍 for me.
This continues my quest to simplify and unify the data containers.
Palettes and boxes currently generate a lot of duplicate code and inconsistencies in all three (DC_Table, DC_Folder, DC_File) data containers. They are not 100% identical, so this implementation makes sure it is consistent with
DC_Table
.It also adds preliminary support for named palettes for
DC_Folder
(because of unified code), which might be useful e.g. to have a palette for a specific file type. I have not manually tested this though! It also would support legends when editing files (since they are parsed), but I have not implemented rendering them in DC_Folder itself (since it didn't exist). Let me know if I should add that.