Repository navigation
fix: improve ui/ux - #213
Conversation
Tchips46
left a comment
There was a problem hiding this comment.
Review: ui/ux (3fd47f3)
Line numbers are at this PR's head.
Must fix
1. wordStarts breaks palette abbreviations (plugins/command-palette/src/palette/fuzzy.ts:~95, used by rankActions in palette-model.ts:74-84)
-
The matching table picks one best alignment, and only afterwards rejects it if it jumps into the middle of a later word. No other alignment is tried.
-
When the category starts with the same letter as the title, the category's letter wins and the match is rejected. I ran this file's
fuzzyMatchwith{ wordStarts: true }:rstno longer findsRun: Restart;fndno longer findsFile: Find in files.
Both matched before. The test passes only because
View: Reset layouthas no earlierr. -
Fix: apply the rule inside the table. From a letter that is not at a word start, allow only jumps from the same word: keep a second running max, reset at each
isBoundary(text, j). Then remove the check that runs afterwards, and addexpect(fuzzyMatch('rst', 'Run: Restart', { wordStarts: true })).toBeDefined().
Should fix
2. The recorder refuses plain keys even when a when keeps them out of typing (plugins/command-palette/src/keymap/RecordDialog.svelte:64, docs/docs/editor/settings.mdx:39)
plugins/file-manager/nanoforge.manifest.json:111binds plainDeletewithwhen: "focusedWidget == 'file-manager.files' && !textInputFocus", which takes nothing from typing.- Example: a Mac user can't bind
Backspacewith that samewhen, and someone who removed the default can't record it back: Save is disabled, and the message is wrong. - Fix:
const typing = $derived(strokes.length > 0 && !/!textInputFocus/.test(when) && blocksTyping(strokes[0]!));, and add the exception to the docs line.
Nice to have
- Dead branch (
plugins/scene/src/service/scene-service.ts:~560):this.appcomes fromsceneApps(), which already filters on!!app.entryFile, so the "has no entry file" message can never show. Keep only the!codecase. - The discard loop in
plugins/settings-ui/src/dialogs/settings/SettingsDialog.svelte:~155runs right beforeclose()unmounts the dialog and drops its local draft. It only fires extra change events:const discard = () => close();. nameTaken(packages/project/src/workspace/workspace-queries.ts:20):project.namefalls back to the folder name when the root has nopackage.json, so in a folderpong, a library namedpongis refused as "the project's own name". Rare.
3fd47f3 to
1e41fbb
Compare
- palette: word starts are checked inside the match, so abbreviations whose first letter also starts the category are found again - shortcut recorder: a plain key is accepted when its condition needs !textInputFocus (outsideTyping in the keybinding helpers) - scene: drop the unreachable no entry file problem - settings: closing without saving no longer discards change by change - shared library names: the project's own name clashes only when the project has a root package.json (else it is just the folder's name)
1e41fbb to
05a0e3d
Compare
What does this PR do?
This PR improve the UI/UX of the app. It add titles, more error messages, keybinds, ...
How do you test this PR?