Skip to content
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

Open
wants to merge 1 commit into
base: 0_15
Choose a base branch
from
Open

Conversation

obar
Copy link

@obar obar commented Dec 6, 2024

A simple usermod called Preset Array Preset 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:

Screenshot 2024-12-06 at 16-04-47 Usermod Settings

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

Allows grouping of related effects presets in 'banks' as the user likes,
and provides navigation functions to traverse between or within banks.
@obar obar force-pushed the usermod-preset-array branch from 9b2cea5 to a868e63 Compare December 7, 2024 04:19
@obar obar changed the title Preset Array usermod Preset Navigation usermod Dec 7, 2024
@obar
Copy link
Author

obar commented Dec 7, 2024

Ninja edit: Preset Navigation is a better name for this. Updated accordingly but the usermod is the same as described.

@blazoncek
Copy link
Collaborator

IMO this is why playlists exist.

@obar
Copy link
Author

obar commented Dec 7, 2024

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
Copy link
Collaborator

@obar is this a revival of the "textarea" mod #4217 ?
I think we already decided to not add large textarea support.

@softhack007 softhack007 added discussion usermod usermod related labels Dec 11, 2024
@obar
Copy link
Author

obar commented Dec 11, 2024

@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.

@blazoncek
Copy link
Collaborator

Handling presets is not a thing usermod would need to be invented for IMO.
If anything it should be a core feature.

@obar
Copy link
Author

obar commented Dec 13, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion usermod usermod related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants