-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Preset Navigation usermod #4354
base: 0_15
Are you sure you want to change the base?
Conversation
Allows grouping of related effects presets in 'banks' as the user likes, and provides navigation functions to traverse between or within banks.
9b2cea5
to
a868e63
Compare
Ninja edit: Preset Navigation is a better name for this. Updated accordingly but the usermod is the same as described. |
IMO this is why playlists exist. |
Thanks for mentioning it. Can you say more about that? It wouldn't be the first time my mental model about WLED would be wrong ;) |
@softhack007 Not a revival of anything, it's a feature to let a user create a menu of many presets. There were concerns about textareas in the usermods page initially voiced but they were all addressed, and nobody has suggested any further issues since. |
Handling presets is not a thing usermod would need to be invented for IMO. |
I could adapt most of this code for a core feature. If WLED were desktop-first, I'd think about a drag-and-drop reordering interface for the preset cards themselves... but that demands a lot of screen real estate, and drag-to-reorder implementations are only barely good enough for a single list on mobile—this is much more complicated as a list of lists . A text area was the simplest idea that I could think up. An enhancement might be a JS parser to check for properly formed input/no undefined preset IDs. Should a text area like this live in a heading under Macros, or would it be a better fit under User Interface? |
A simple usermod called
Preset ArrayPreset Navigation (edit: it occurred to me since making the request, this name could be better! And this is my only chance to fix it! Sorry if anyone was in the midst of dealing with this while I made the change). It lets you group effect presets together however you see fit, and cycle between the groups ("banks") without going through every single effect preset you've saved. When you've gotten to the bank you want, you can then cycle through just the presets of that bank.This is primarily focused for controlling WLED in ways other than the web UI.
Preset banks are one one line of preset IDs, comma separated:
Cycling between banks in this example takes you through preset 10, 20, 30, 40, then back to 10. If you are at 30, cycling within the bank takes you to 31, 32, 33, and then back to 30.
For a specific example: presets in a bank can have any logical connection you want, in this video demo of the usermod I show how the third bank (presets
30,31,32,33
) are all different color variations of a flame effect. When cycling between banks you don't have to cycle through every color variation if you aren't going for flame. When you do get to that flame effect, you can cycle just within that bank through the color variations.Another benefit of this usermod over normal preset cycling is that it isn't sequence-sensitive. I've used a numerical pattern above but a new preset can be squeezed in anywhere in the cycle, whereas the typical preset cycling API call needs preset IDs to be in order without gaps.
This usermod uses a textarea in the config for multiline input, so it depends on #4217