Skip to content

fix(AppShell): wire up <keyname> control hint - #2153

Open
alexwarren wants to merge 1 commit into
mainfrom
fix/editor-keyname-hint
Open

fix(AppShell): wire up <keyname> control hint#2153
alexwarren wants to merge 1 commit into
mainfrom
fix/editor-keyname-hint

Conversation

@alexwarren

Copy link
Copy Markdown
Contributor

Summary

  • Part of Editor: several v5 .aslx control hints not wired through to AppShell (freetext, min/max/increment, nullable, width, ...) #2116.
  • <keyname> was fully dead (4 uses, all in CoreEditorObjectUseGive.aslx on the useon/selfuseon multi controls). A multi control's nested scriptdictionary sub-editor (e.g. "Use (other object) on this" → "Handle objects individually") always showed generic "Add entry key…" / "Select object…" wording, even though these particular keys are specifically object names and the .aslx already declares <keyname>Object</keyname> to say so.
  • Threads ctrl.GetString("keyname") through the "multi" branch of ToControlInfo into a new keyLabel prop on ScriptDictionaryEditor.svelte, which swaps in the more specific wording ("Add Object…" / "Select Object…") when set, and falls back to the existing generic text otherwise (both call sites of ScriptDictionaryEditor under a "multi" sub-editor pass it; the unrelated top-level scriptdictionary controltype call site, e.g. AttributesEditor, is untouched since <keyname> never applies there).

Noticed in passing but out of scope: the same useon/selfuseon controls also declare <keyprompt>, which is also dead for "multi" controls specifically (it's already wired for stringdictionary/gamebookoptions, just not multi) - not part of this issue's tracked tag list, so left alone here rather than expanding scope.

Test plan

  • dotnet build --configuration Release
  • dotnet test --configuration Release (all passing)
  • npm run check / npm run lint in src/AppShell (clean)
  • node tests/e2e/find-affected-tests.mjs + ran the relevant flagged scripts (verify-appshell-verbs-editor, verify-appshell-attributes-panel-pinned) against a local dev server - all pass.
  • Manual check in-browser: enabled an object's Use/Give feature, set "Use (other object) on this" to "Handle objects individually", and confirmed the resulting object picker's aria-label reads "Add Object" and its default option reads "Select Object…" (previously the generic "Add entry key" / "Select object…").

🤖 Generated with Claude Code

<keyname> was fully dead (4 uses, all on CoreEditorObjectUseGive.aslx's
useon/selfuseon multi controls) - a "multi" control's nested scriptdictionary
sub-editor always showed generic "Add entry key…"/"Select object…" wording,
even though useon/selfuseon's keys are specifically object names ("Object").

Threads ctrl.GetString("keyname") through the "multi" branch of
ToControlInfo into a new keyLabel prop on ScriptDictionaryEditor.svelte,
which swaps in the more specific wording (e.g. "Add Object…"/"Select
Object…") when set, falling back to the existing generic text otherwise.

Part of #2116.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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