fix(AppShell): wire up <minimum>/<maximum>/<increment> control hints - #2148
Merged
Conversation
IEditorControl.GetInt/GetDouble already existed but nothing called them - number/numberdouble controls in the property panel had no bounds or step, silently dropping every <minimum>/<maximum>/<increment> hint in the .aslx (e.g. Timer's interval >= 1, Game's background opacity 0.0-1.0 step 0.1). Threads them through ToControlInfo/ControlInfo into native min/max/step attributes on the number <input>. Part of #2116. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The original commit only threaded these into the property panel (ToControlInfo/PropertyEditor.svelte) - script command parameters using an expression's "number"/"numberdouble" simpleeditor (e.g. Grid_DrawShape's opacity, 0.0-1.0 step 0.1) went through a separate path (BuildScriptControlData/ScriptEditor.svelte) that never read them at all. Adds Minimum/Maximum/Increment to ScriptControlData, reads them in BuildScriptControlData for a "number"/"numberdouble" simpleEditor, and applies them as min/max/step on the script editor's number input. Reported by the user testing this PR.
alexwarren
force-pushed
the
fix/editor-number-min-max-increment
branch
from
August 26, 2026 15:43
8ed30c8 to
bd9c087
Compare
alexwarren
added a commit
that referenced
this pull request
Aug 27, 2026
main independently added an identical GetNumericHint(IEditorControl, string) helper via #2148 while this branch had its own copy for the expression- template code path, causing a CS0111 duplicate-member build failure once merged. Drop this branch's copy and keep main's. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
IEditorControl.GetInt/GetDoublealready existed but nothing inWasmEditorBridge.cscalled them for numeric control hints -<minimum>/<maximum>/<increment>were fully dead (34+9+2 uses across 11.aslxfiles), e.g. Timer's interval (minimum=1), Game's background opacity (minimum=0.0 maximum=1.0 increment=0.1), Grid_DrawShape's opacity script parameter (minimum=0.0 maximum=1.0 increment=0.1).Minimum/Maximum/IncrementtoControlInfo, read fornumber/numberdoublecontrols inToControlInfo(triesGetDoublethenGetInt, since a hint may be authored as either), threaded intomin/max/stepon the number<input>inPropertyEditor.svelte.ScriptControlData, read inBuildScriptControlDatafor a"number"/"numberdouble"simpleeditoron anexpressioncontrol, threaded intomin/max/stepon the number input inScriptEditor.svelte. This is a separate rendering pipeline from the property panel, so needed its own fix - script command parameters like Grid_DrawShape's opacity were still unbounded until this.simpleeditor="number"inside the expression template picker (RandomChance's percentile) is a third, distinct rendering pipeline that isn't even given a number<input>today - a pre-existing, unrelated gap, not touched here.Test plan
dotnet build --configuration Releasedotnet test --configuration Release(all passing)npm run check/npm run lintinsrc/AppShell(clean)node tests/e2e/find-affected-tests.mjs+ ran the relevant flagged scripts (verify-advanced-tree, verify-appshell-attributes-panel-pinned, verify-appshell-gamebook-mode, verify-appshell-object-pickers-exclude-pages, verify-appshell-code-view, verify-appshell-scriptadder-advanced-commands, verify-appshell-switch-cases-editor, verify-appshell-verbs-editor, verify-appshell-script-label-stacks-below, verify-appshell-scripteditor-row-buttons) against a local dev server - all pass.min="1"; Game's background Opacity field hasmin="0" max="1" step="0.1"; an unrelated number field (Font size) is unaffected (no min/max/step); Grid_DrawShape's Opacity script parameter now hasmin="0" max="1" step="0.1"too (previously unbounded).🤖 Generated with Claude Code