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

config: Add capability to disable/hide config options #594

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wexxlee
Copy link
Collaborator

@wexxlee wexxlee commented Jan 28, 2025

This adds two optional properties to config options, disabled and hidden, that can access the values of other config options in the config group and programmatically be hidden or disabled as other config options change. Essentially, this allows the ability to create "child" config options that will only appear or only be modifiable if their "parent" is set a certain way.

I originally had a stronger use case for this with some FRU p4 stuff I was working on, but I figured out an alternative way to do it without needing configs. I was going to shelve this, but someone in discord recently requested an option to have relative (vs. true) directions called out for P3 Ultimate Relativity, so there is at least a potential use for this now.

Some completely made up mockups below to illustrate:

Parent Strat is none, so both sub-options are hidden:
demo1

Parent strat set; both sub-options visible; but checkbox is false, so the final sub-option is disabled:
demo2

Checkbox now true, so the final sub-option is enabled:
demo3

@github-actions github-actions bot added docs /docs, /screenshots, *.md resources /resources raidboss /ui/raidboss module config ui/config, ui/[module]/config needs-review Awaiting review labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config ui/config, ui/[module]/config docs /docs, /screenshots, *.md needs-review Awaiting review raidboss /ui/raidboss module resources /resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant