Repository navigation
Make the blocks palette and list insertion easier to use (#1484) - #1489
Merged
Merged
Conversation
The code palette closed whenever a press missed a block, showed pairs of concepts that render identically (Name/Reference, Input/Bind, and more), and gave lone tokens no box to grab. An open palette now closes only from its arrow, look-alikes are left out or moved to "etc." in the palette only, and chromeless entries get a framed 24px target. Adding to a list was hard to discover: the "+" opened a menu that began with Outputs, and every number carried two unit menus. The "+" now appends an empty slot to type into, the menu leads with more of what the list already holds, and the slash menu appears only once a number has a unit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Context
#1484 reported four problems with the blocks-mode code palette. The reporter later added that he couldn't figure out how to add another number to a list. Each report was verified in the code and in a headless browser before changing anything.
Palette (Sidebar.svelte, conceptGroups.ts, ConceptPreview.svelte, Wellspring.svelte)
name, Input and Bind asname: value, a Dimension asname, Markup/Paragraph/Words as…, PatternLiteral/PatternType as⣿⣿, Program/Source as_, and Text/Translation as''.isPaletteConceptleaves the fragments out, andgetPaletteGroupsmoves Words, PatternType and Translation to "etc.".getPurpose()is unchanged, because purpose also ranks the editor's insert menu, where Advanced comes last.none/type(0,unit,‥) draw no box, and the palette also stripped their padding. In the palette they are now framed, and every entry is at least--wordplay-target-size(WCAG 2.5.8).This(⬚, U+2B1A). It renders correctly and now sits in a framed box like the others.List insertion (NodeSequenceView.svelte, Editor.svelte, Menu.ts, UnitView.svelte)
[1 2 3]rendered as1 ▾ ▾ 2 ▾ ▾ 3 ▾ ▾ +. Both ▾ belonged to the number's empty Unit: one for its numerator, one for its slash. The slash ▾ now appears only once a unit has a numerator.ExpressionPlaceholderand selects it, so typing fills it in:appendSloton the editor context, via the existingAppendrevision. Its position computation moved into a sharedgetInsertionPosition. Lists of other kinds keep the menu.ui.source.menu.append("add an item"), translated into all locales.0, notπ), and ranks that purpose first. Mixed lists keep today's order.Before/after screenshots of every change, in light and dark: https://claude.ai/artifact/VKnG71qvu9bfUezoT3KWbh. It's private until shared.
Related issues
Verification
npm run check:now,npm run test:run,npm run test:sweep,npm run locales,npm run rtlandnpm run tokensall pass.[1 2 _](and for its placeholder) leads with a plain numeral and ranks Numbers before Outputs, while a mixed list keeps the usual order. These tests fail with the ranking disabled.[1 2 3 _]with the slot selected, and typing4gives[1 2 3 4].[1m 2]still shows the slash ▾ on1m.Checklist
🤖 Generated with Claude Code