-
-
Notifications
You must be signed in to change notification settings - Fork 551
feat: overhaul preset definitions #3931
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: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Maybe a good moment to bring back two long standing feature requests about presets:
So both of those changes would be completely backwards compatible and give a very easy upgrade path for module developers if they want to enhance preset organization. This would also bring the regular button presets to the same level of text presets but with less effort at declaration. |
With this change, it goes back to relying on the order the presets/sections/groups are provided in
This adds a single additonal level of groups, replacing the current text definiiton with the name+descritpion of a group. I realised that the text definition type needs to go away for searching to be sane, otherwise we will need to either discard the text nodes early (loosing the context), or many searches will be left with just the text nodes.
I almost did do an unlimited depth for these, but I dont think we actually want that from a UX perspective. I'm not sure that even the groups I have added would want to collapse, but maybe they could (perhaps automatically when they grow above some threshold of number of contents). I dont think that going further than that will be nice to use.
This is a decision to make here; Do we want something backwards compatible but harder to interpret and understand (both on companion and module dev side), or a breaking change that gives a chance to clean it up? The other idea I had was to basically don't touch the current structure (other than require an unique id on each preset), but to have a second optional parameter that defines the new structure, referencing the array of presets by id. Personally, I think that a bit of a breaking change would be beneficial. My hope is that by forcing devs to review their preset code a little, they are more likely to update it to newer functionality. Like the matrix group; which will cut down the volume of presets many provide dramatically. A good example of why is there was an issue a couple of years back with bmd-videohub where it kept crashing for 288x288 videohubs, because of the volume of presets. It was trying to produce 288x288x3. All those could now be replaced with just a handful |
see bitfocus/companion-module-base#182
Allows for:
Screencast.From.2026-02-01.21-41-17.mp4