fix(AppShell): wire up <filefiltername> hint, remove dead <preview/> - #2152
Open
alexwarren wants to merge 1 commit into
Open
fix(AppShell): wire up <filefiltername> hint, remove dead <preview/>#2152alexwarren wants to merge 1 commit into
alexwarren wants to merge 1 commit into
Conversation
<filefiltername> was fully dead (13 uses) - HTML file inputs have no native filter-name UI like v5's WPF file dialog did, so this is surfaced as the upload button's tooltip instead (e.g. "Upload a new file (Picture Files)"), threaded through both the property panel (ToControlInfo) and script editor (BuildScriptControlData) "file" pickers into AssetPicker. <preview/> (8 uses) turns out to already be fully redundant, not dead: every usage pairs it with an image-only <source> filter, and AssetPicker already auto-thumbnails any picker whose extension filter is all-image (parseAssetSource's kind === "image"), regardless of this tag. Rather than wire up a no-op, removed the now-pointless tag from the .aslx files it appeared in - confirmed by hand that the thumbnail preview still works identically without it. 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
<filefiltername>(13 uses, e.g. "Picture Files" on cover art/background image pickers) was fully dead. HTML file inputs have no native filter-name UI the way v5's WPF file-open dialog did, so this is surfaced as the upload button's tooltip instead (e.g. "Upload a new file (Picture Files)"). Threaded through both the property panel (ToControlInfo/PropertyEditor.svelte) and script editor (BuildScriptControlData/ScriptEditor.svelte)file/simpleeditor="file"pickers into a newfilterNameprop onAssetPicker.svelte.<preview/>(8 uses) turns out to already be fully redundant, not just dead. Every single usage pairs it with an image-only<source>filter ([EditorImageFormats]or an explicit*.jpg;*.png;...list), andAssetPicker.sveltealready auto-shows a thumbnail for any picker whose extension filter is all-image (parseAssetSource'skind === "image",AssetPicker.svelte:80-88) - completely independent of this tag, which is never read anywhere inEditorCore/WasmEditorBridge.cs. Rather than wire up a no-op, removed the now-pointless tag from the 4.aslxfiles it appeared in (CoreEditorGame.aslxx3,CoreEditorObjectRoom.aslx,CoreEditorScriptsOutput.aslxx2,GamebookCoreEditor.aslxx2), and confirmed by hand that the thumbnail preview still works identically without it.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-library-editor, verify-appshell-library-xml-extension, verify-preview-custom-library, verify-appshell-gamebook-mode) against a local dev server - all pass.<preview/>didn't regress anything - the thumbnail was never driven by that tag in the first place.🤖 Generated with Claude Code