-
Notifications
You must be signed in to change notification settings - Fork 383
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 config ui for trigger set options #5357
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds a new `config` entry to trigger sets that can add field entries to the top of the trigger set under the raidboss section in the config ui. Trigger sets must have an id to have any config loaded, saved, or displayed. Triggers can use `data.triggerSetConfig['optionId']` here to access anything listed in the `config` section by id. The `Data` type for a trigger set can be extended in a way that will type check ids and add field names. To avoid naming collisions, not all trigger set config values are loaded. Trigger sets get their own config's values loaded implicitly, but if they need to load some other trigger set's values, they can use `loadConfigs` and specify other trigger sets by id. For backwards compat, `data.triggerSetConfig` contains all saved values (even ones that no longer have a `config` entry). Also, it is possible to use `loadConfigs` to load trigger set ids that no longer exist. To also support backwards compat, `ConfigEntry.default` can now be a function that reads from options. See the e8s/TEA changes for how this works.
@valarnin FYI if you're interested in taking a look |
I think this PR covered all the points I raised in our conversation. I won't have time to do more than a cursory examination at the code, but it looks good as far as my use cases are concerned. |
github-actions bot
pushed a commit
that referenced
this pull request
Apr 22, 2023
This adds a new `config` entry to trigger sets that can add field entries to the top of the trigger set under the raidboss section in the config ui. Trigger sets must have an id to have any config loaded, saved, or displayed. Triggers can use `data.triggerSetConfig['optionId']` here to access anything listed in the `config` section by id. The `Data` type for a trigger set can be extended in a way that will type check ids and add field names. To avoid naming collisions, not all trigger set config values are loaded. Trigger sets get their own config's values loaded implicitly, but if they need to load some other trigger set's values, they can use `loadConfigs` and specify other trigger sets by id. For backwards compat, `data.triggerSetConfig` contains all saved values (even ones that no longer have a `config` entry). Also, it is possible to use `loadConfigs` to load trigger set ids that no longer exist. To also support backwards compat, `ConfigEntry.default` can now be a function that reads from options. See the e8s/TEA changes for how this works. f7d621d
github-actions bot
pushed a commit
that referenced
this pull request
Apr 22, 2023
This adds a new `config` entry to trigger sets that can add field entries to the top of the trigger set under the raidboss section in the config ui. Trigger sets must have an id to have any config loaded, saved, or displayed. Triggers can use `data.triggerSetConfig['optionId']` here to access anything listed in the `config` section by id. The `Data` type for a trigger set can be extended in a way that will type check ids and add field names. To avoid naming collisions, not all trigger set config values are loaded. Trigger sets get their own config's values loaded implicitly, but if they need to load some other trigger set's values, they can use `loadConfigs` and specify other trigger sets by id. For backwards compat, `data.triggerSetConfig` contains all saved values (even ones that no longer have a `config` entry). Also, it is possible to use `loadConfigs` to load trigger set ids that no longer exist. To also support backwards compat, `ConfigEntry.default` can now be a function that reads from options. See the e8s/TEA changes for how this works. f7d621d
quisquous
added a commit
that referenced
this pull request
Apr 23, 2023
quisquous
added a commit
that referenced
this pull request
Apr 23, 2023
quisquous
added a commit
that referenced
this pull request
Apr 28, 2023
I love this new feature, thanks for developing it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new
config
entry to trigger sets that can add field entries to the top of the trigger set under the raidboss section in the config ui. Trigger sets must have an id to have any config loaded, saved, or displayed.Triggers can use
data.triggerSetConfig['optionId']
here to access anything listed in theconfig
section by id. TheData
type for a trigger set can be extended in a way that will type check ids and add field names.To avoid naming collisions, not all trigger set config values are loaded. Trigger sets get their own config's values loaded implicitly, but if they need to load some other trigger set's values, they can use
loadConfigs
and specify other trigger sets by id.For backwards compat,
data.triggerSetConfig
contains all saved values (even ones that no longer have aconfig
entry). Also, it is possible to useloadConfigs
to load trigger set ids that no longer exist.To also support backwards compat,
ConfigEntry.default
can now be a function that reads from options. See the e8s/TEA changes for how this works.