Replies: 4 comments 2 replies
-
From memory, there times where advanced feedbacks are used are:
For 1, we can ignore these, they should be migrated to boolean. I don't know if modules do 2&3 in the same feedback, hopefully not. Or if they do, then maybe any feedback should be able to produce these variables (including boolean feedbacks). We would then need somewhere to park feedbacks which are used just for their variables, but that should be solvable. |
Beta Was this translation helpful? Give feedback.
-
Some other things will 'break' as part of this The feedback 'use another buttons style' won't work fully, as one of those 'advanced' feedbacks. I expect we will leave this 'broken' when going across types, and add a new one for this new button type. The 'set button text' and similar api endpoints and actions wouldn't nicely translate across to this. We could take the opportunity to remove them, or we could expand them to allow choosing a layer index (which will be brittle) defaulting to the first text layer. I would lean towards removing them, everything they support will be possible with custom variables instead in this. Satellite API can provide text and text colour to clients. We need to define a rule on how those should be determined from a multi-layer button. |
Beta Was this translation helpful? Give feedback.
-
I appreciate this summary and it is mostly also what I'd suggest.
There's now not an answer for all of the open questions, but I tend to write too much and I think we'll find more solutions along the way if we agree first on the concept. |
Beta Was this translation helpful? Give feedback.
-
Something else to do as part of this: Stop using Doing this is messy for presets, but if we do it at the same time as introducing a new preset type, we can leave the old behaviour for old presets, with new behaviour for new presets |
Beta Was this translation helpful? Give feedback.
-
For anyone stumbling upon this curious about what this is;
We want your examples for complex buttons or weird scenarios that are hard to do in the current system.
There are a few threads around different aspects of this already, but things have changed in companion since they were opened and there are additional requirements now.
The ones I found: #262, a snippet of #2387, #2237, #3067, #2367
I want to focus on the aspects of:
A lot of this builds heavily on what @dnmeid has already written, primarily around adding layers.
I think that doing anything around this is going to 'break' advanced feedbacks, because they are very tied to the current structure of properties we use for drawing. This structure has become a bit of a mess as new bits have been added over time, but has been unable to be tidied up the layout due to it being used in feedbacks and the module-api.
I would propose that this would probably be best achieved as a new button type. We wouldn't touch existing buttons (for now), once this is done we could look at auto converting some/all existing buttons across, but I expect that not everything will translate perfectly.
This way, we don't break things for existing users, and don't limit ourselves by trying to minimise this breakage.
We can then drop the old rendering in a future major version, or sooner if we can figure out acceptable automatic translation.
I feel like this should be implemented largely in the open in main, rather than hidden on a branch until it is complete. We can label the new type as alpha/beta, and if we want to do a stable release we could leave it in or hide the ui option
Layers
As has already been proposed, I agree that buttons should have layers. I would suggest that each layer should do a single thing, ie, a layer can be a png layer or a text layer. This will allow us to add more options within each layer without making the ui too cluttered. And at the same time, we can add new layer types without cluttering up the ui,
The user should be free to add and remove as many layers as they like into this stack, the one they will not be able to remove is the fixed background layer which will be where the background colour is set.
UI clutter is a big concern I have around improving the drawing, the existing style properties don't feel very organised and any changes to the current system feel like they will make it worse unless we can categorise things better..
Once we have this structure, adding many of the things from https://github.com/thedist/companion-module-utils would be much simpler, as they would be their own layer types.
A thought for myself, perhaps we could utilise the layering for some extra performance enhancements? We could draw each layer as its own bitmap and then flatten afterwards. Doing this is excessive, but we could utilise it for any costly layers, or to avoid repeating ourselves too much when it comes to gifs or frequent redraws. Not in scope of this, but something to think about in the future.
What about feedbacks
Now for one of the more radical ideas I have here; we should move the feedbacks to be defined as part of this layering.
For boolean feedbacks, this would be a pretty trivial way of adding an enable rule on each layer. This will likely need a way of linking layers to accommodate this fully, or a way of defining some 'button local' variables based on feedbacks. I am not sure on the best approach here.
For 'advanced' feedbacks, as written above I dont think these will translate well to this new model. I would be tempted to call these 'legacy feedbacks', and be able to mark layers as 'override for legacy feedbacks'. And at the same time, define a new 'advanced' feedback type which would fit better into this model.
I forgot to consider here that feedbacks override the defaults currently..
Perhaps then each layer type should have its own feedback stack to allow applying overrides to itself? That feels like it will be a bit clunky, but if we encourage doing it via local variables (or only allow via local variables?), to be able to share feedbacks across layers then it wouldnt be terrible? Definitely better than forcing enabling/disabling of layers
I am very open to ideas here
Aspect ratios
Finally, we need to be able to handle different aspect ratios of buttons. The Stream Deck Studio has slightly widescreen buttons that we 'letterbox', the Neo has the lcd strip that we ignore, the Plus has the LCD strip that we leave space around each button, the loupedecks have vertical strips that we ignore, and more quirks will come in the future.
I am not 100% sure how this should work, but I think long term we need to allow the user control over how different aspect ratios render.
The MVP could be to just perform the same operations on the different aspect ratio, and hope it works out. This will likely do for many users, as they will likely only look at buttons on one type of surface. We would need to figure out how to show this to them in the UI, but I dont think that is in scope of this task.
For a proper solution, I feel like we would need to have a separate stack of layers to draw, but that will get tedious if you just need to tweak one thing. Perhaps they share a stack and layers can be marked as 'only for X', and 'except for X'. I'm not sure, and I think it would be best to leave this to a follow up task.
The UI
I am not sold on these ideas, just my immediate thoughts for future me.
For showing this in the UI, I think this would be a case of adding this as a new tab in the action step tab list. Probably as the first and default tab.
The 'progress' and 'rotary actions' toggles should probably be moved to an 'options'/'settings' tab there too.
This tab could be split with the top portion showing a larger preview of the button, with a layer list beside it.
With the editor for the currently selected layer below.
Beta Was this translation helpful? Give feedback.
All reactions