Skip to content

fix(AppShell): wire up <keyprompt> for multi controltype - #2157

Closed
alexwarren wants to merge 1 commit into
fix/editor-keyname-hintfrom
fix/editor-keyprompt-hint
Closed

fix(AppShell): wire up <keyprompt> for multi controltype#2157
alexwarren wants to merge 1 commit into
fix/editor-keyname-hintfrom
fix/editor-keyprompt-hint

Conversation

@alexwarren

Copy link
Copy Markdown
Contributor

Summary

  • <keyprompt> was silently dropped whenever declared on a "multi" controltype control (useon/selfuseon/give/giveto in CoreEditorObjectUseGive.aslx) — ToControlInfo's "multi" branch never read it, even though ControlInfo.KeyPrompt and the reading pattern for it already exist for stringdictionary/gamebookoptions controls.
  • Threads ctrl.GetString("keyprompt") through the "multi" branch alongside the just-added KeyName (fix(AppShell): remove dead <keyname> control hint #2153), and wires it into ScriptDictionaryEditor.svelte's existing keyLabel prop as a tooltip (title attribute) on the add-row input — keyPrompt's longer descriptive sentence (e.g. "Please enter the object name") doesn't fit as placeholder/aria-label text the way keyLabel's short noun ("Object") does.

Stacked on #2153 (base branch set to fix/editor-keyname-hint) since it depends on the KeyName/keyLabel plumbing added there. Part of #2116.

Test plan

  • dotnet build --configuration Release / dotnet test --configuration Release — all pass
  • npm run check / npm run lint in src/AppShell — clean
  • node tests/e2e/find-affected-tests.mjs — ran all 41 flagged scripts; 36 pass, 5 confirmed pre-existing failures unrelated to this change (verified via git stash A/B comparison on the same server)
  • Manual verification in-browser: enabled Use/Give on an object, set "Use (other object) on this" to "Handle objects individually" — the add-object dropdown now shows title="Please enter the object name" (resolved [EditorObjectUseGivePleaseenter] text) alongside the existing "Select Object…"/"Add Object" wording from <keyname>

🤖 Generated with Claude Code

<keyprompt> was silently dropped whenever it was declared on a "multi"
controltype control (useon/selfuseon/give/giveto in
CoreEditorObjectUseGive.aslx) - ToControlInfo's "multi" branch never read
it, even though ControlInfo.KeyPrompt and the reading pattern for it
already exist for stringdictionary/gamebookoptions controls.

Threads ctrl.GetString("keyprompt") through the "multi" branch alongside
the just-added KeyName, and wires it into ScriptDictionaryEditor.svelte's
existing keyLabel prop as a tooltip (title attribute) on the add-row
input, since keyPrompt's longer descriptive sentence doesn't fit as
placeholder/aria-label text the way keyLabel's short noun does.

Follow-up to #2153, part of #2116.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
alexwarren added a commit that referenced this pull request Aug 27, 2026
Same dead-tag pattern as <keyname> above, spotted while reviewing #2157
(stacked PR proposing to wire this up as a tooltip on the object-picker
<select>). ToControlInfo's "multi" branch never reads <keyprompt> - it's
only wired for the "isDictionary" (stringdictionary/gamebookoptions)
branch - and the specific text here ("Please enter the object name") is
actively wrong for these controls anyway: they all set <source>object</source>,
so the add-row control is a <select> of real object names, not a
free-text field to type into. Not worth wiring up; removed the tag from
all 4 usages instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alexwarren

Copy link
Copy Markdown
Contributor Author

Closing this rather than rebasing it. Same call as #2153's revert of <keyname>: wiring <keyprompt> up here isn't worth it, for two reasons:

  1. It's a hover-only title tooltip — invisible on touch, easy to miss on desktop, the same weak-signal problem fix(AppShell): remove dead <filefiltername> and <preview/> hints #2152 already rejected for <filefiltername>.
  2. The text is actively wrong for this control: <keyprompt>'s "Please enter the object name" is an instruction to type a name, but these controls (useon/selfuseon/give/giveto) all set <source>object</source>, so the add-row control is a <select> dropdown of real object names — you pick, you don't type. A tooltip telling you to "enter" a name on a dropdown is worse than no tooltip.

I've removed the dead <keyprompt> tag from the same 4 controls directly on fix/editor-keyname-hint (#2153) instead, matching how the <keyname> tag was handled. <keyprompt> itself stays fully wired and correct for stringdictionary/gamebookoptions controls — only these 4 dead multi-controltype usages are gone.

@alexwarren alexwarren closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant