Support variables presets in Creator (preview & condition editors) - #7992
Draft
andrewtelnov wants to merge 7 commits into
Draft
Support variables presets in Creator (preview & condition editors)#7992andrewtelnov wants to merge 7 commits into
andrewtelnov wants to merge 7 commits into
Conversation
andrewtelnov
marked this pull request as draft
September 9, 2026 19:33
andrewtelnov
force-pushed
the
feature/7982-variable-presets
branch
from
September 10, 2026 12:02
0c5cb7a to
a028402
Compare
… from the page toolbar The creator takes the host's variable presets container (the `variablePresets` option/property, held by reference) and exposes the survey-core companion over it as `variablePresetsModel`. The active preset is Preview's state: it lives on the Preview plugin as `VariablePresetsManager` (`plugin.variablePresets`) and is applied to the running survey in one `setVariables` call. Preview's page toolbar gains a preset switcher and a View button that shows the active preset's values as read-only JSON. `onVariablePresetsChanged` fires on a selection change so a host can persist it; Creator has no user-settings layer. Refs #7982 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ition When the container has a definition, the Preview toolbar button opens a two-page dialog: a list of presets, then the definition itself as the form for one preset. Add, delete and a Back button use existing matrix and footer actions, so no new framework component is needed. Permissions: `allowEdit` / `allowAdd` / `allowDelete` on the manager, narrowed per preset by the new `onVariablePresetEditing` event. A preset that may not be edited opens in display mode. `setPresets` writes the list into the host's own container object and fires one "edit" event. Refs #7982 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…othing is editable - The list compared names case-insensitively, so renaming "Gold" to "gold" left the old name on screen. - With nothing editable, Apply replaced the host's presets with copies and fired an "edit" event; it now closes the dialog without writing. Refs #7982 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
andrewtelnov
force-pushed
the
feature/7982-variable-presets
branch
from
September 10, 2026 12:07
a028402 to
57db705
Compare
…variables preset is emtpy
This file contains hidden or 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
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.
No description provided.