fix(AppShell): wire up <colour> control hint for script textboxes - #2156
Open
alexwarren wants to merge 1 commit into
Open
fix(AppShell): wire up <colour> control hint for script textboxes#2156alexwarren wants to merge 1 commit into
alexwarren wants to merge 1 commit into
Conversation
for direct "textbox" controltype script controls <colour> was fully dead (2 uses: @failed's fallback-script text in red, a // comment's text in green, both CoreEditorScriptsScripts.aslx). While wiring it up, found its two controls also declare <multiline/>/<expand/> (the tags #2115 fixed) but never got that fix - #2115 only touched the "expression" controltype's textbox *simple editor* path; @failed/// use controltype=textbox directly, a separate code path in ScriptEditor.svelte that still rendered a plain single-line input regardless of the hints. Fixing colour alone would have produced a colored box that still couldn't show its own (often multi-line) text properly, so multiline/expand are completed for this controltype too, in the same branch. ScriptControlData.Multiline/Expand were already read unconditionally in BuildScriptControlData (the gap was frontend-only); this adds Colour next to them and mirrors the existing simple-editor multiline/expand rendering into the direct "textbox"/"richtext" controlType branch of ScriptEditor.svelte. Part of #2116. 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
<colour>was fully dead (2 uses:@failed's fallback-script text in red, a//comment's text in green, bothCoreEditorScriptsScripts.aslx) - same family as fix(AppShell): honor multiline/expand script control hints, auto-size code view #2115's<multiline/>/<expand/>fix (a script-control hint, not a property-panel one).@failed///'s controls also declare<multiline/>/<expand/>(the tags fix(AppShell): honor multiline/expand script control hints, auto-size code view #2115 fixed) but never actually got that fix. fix(AppShell): honor multiline/expand script control hints, auto-size code view #2115 only patched the"expression"controltype's textbox simple editor rendering path (used by e.g. Print's message);@failed///usecontroltype=textboxdirectly, a separate branch inScriptEditor.sveltethat still rendered a plain single-line<input>regardless of the hints.ScriptControlData.Multiline/Expandwere already read unconditionally inBuildScriptControlData- the gap was purely on the frontend, in a code path fix(AppShell): honor multiline/expand script control hints, auto-size code view #2115 didn't touch. Coloring a still-single-line box for what's meant to be multi-line fallback-script/comment text would have been a confusing half-fix, so this PR completes multiline/expand for that controltype too, in the same branch, alongside colour.ColourtoScriptControlData, and mirrors the existing simple-editor multiline/expand rendering (growing textarea) into the direct"textbox"/"richtext"controlType branch ofScriptEditor.svelte, with the colour applied as an inlinecolorstyle on both the textarea and the (still-used-by-other-controls) plain input.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-appshell-code-view, verify-appshell-script-label-stacks-below, verify-appshell-scripteditor-row-buttons, verify-appshell-scripteditor-selection-toolbar) against a local dev server - all pass.// Commentscript command and confirmed via computed style it's now a<textarea>(rows: 1, auto-growing height) withcolor: green(previously a plain<input>with no color). Typed multi-line text into it and confirmed the box grows to fit, staying green throughout.🤖 Generated with Claude Code