Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
397023d
feat(bubble): compute the Style face
HMarzban Nov 22, 2026
1386276
feat(slash): suggest recent insert kinds
HMarzban Nov 22, 2026
b0c73d5
feat(toolbar): group the row's more menu
HMarzban Nov 22, 2026
b157a51
docs(toolbar): screenshots of the grouped more menu
HMarzban Nov 22, 2026
16a81cb
feat(toolbar): turn-into menu shared by the bubble and the row
HMarzban Nov 22, 2026
a9c0f1a
feat(slash): inline hint, footer tip and close button
HMarzban Nov 22, 2026
6ba7416
feat(phone): insert sheet
HMarzban Nov 22, 2026
07bf97d
fix(toolbar): logical check slot and a real box for Simplified toolbar
HMarzban Nov 22, 2026
5b483e1
feat(slash): plus button on empty lines
HMarzban Nov 22, 2026
a3d455d
fix(ui): logical radio, submenu chevron and shortcut spacing in dropd…
HMarzban Nov 22, 2026
54a3a5e
refactor(slash): mount the + from the bubble chunk
HMarzban Nov 22, 2026
0744dfa
feat(slash): alias hints and a label contract test
HMarzban Nov 22, 2026
8a79e21
feat(phone): style first in the format sheet; words on tablet stand-ins
HMarzban Nov 22, 2026
a5a6c39
refactor(toolbar): use logical inline spacing in menu check rows
HMarzban Nov 22, 2026
f1e3b3f
feat(bubble): fuller bubble with style, strike, code and clear
HMarzban Nov 22, 2026
99f0a38
docs(toolbar): dark and RTL submenu shots for the grouped more menu
HMarzban Nov 22, 2026
f6df0d9
fix(phone): keep the insert sheet above the keyboard and say why in it
HMarzban Nov 22, 2026
b8a7f84
fix(slash): follow the trigger for the + origin
HMarzban Nov 22, 2026
9af2a96
Merge remote-tracking branch 'origin/main' into feat/quick-insert
HMarzban Nov 22, 2026
e37fc12
feat(bubble): settle keyboard selections before showing in the contro…
HMarzban Nov 22, 2026
5d3f1f9
fix(bubble): live Style face, unwrapping Turn into and narrower inlin…
HMarzban Nov 22, 2026
1b84738
docs(slash): record quick insert P2 in the changelog and A19
HMarzban Nov 22, 2026
5d61b17
fix(bubble): set the keyboard flag before ProseMirror handles the key
HMarzban Nov 22, 2026
5414d72
feat(color): named colour rows on desktop surfaces
HMarzban Nov 22, 2026
d8d6749
docs(phone): insert sheet, Aa sheet order and tablet stand-in words
HMarzban Nov 22, 2026
283a682
feat(bubble): show at once on Alt+F10 and follow the motion token
HMarzban Nov 22, 2026
9a8d345
fix(color): mark low-contrast rows and keep the note inside its column
HMarzban Nov 22, 2026
5aa9be3
test(color): cover the named colour rows and the phone pick pill
HMarzban Nov 22, 2026
325716e
feat(bubble): hand off to the link field without a gap
HMarzban Nov 22, 2026
ac8e875
fix(slash): outline the New badge on the active row
HMarzban Nov 22, 2026
eeb00ff
docs(slash): quick insert P2 design-review screenshots
HMarzban Nov 22, 2026
df8f8c1
refactor(phone): title insert steps from the registry labels
HMarzban Nov 22, 2026
ceccd8e
docs(contract): amend A21 for the phone insert sheet, sheet order and…
HMarzban Nov 22, 2026
5e146b9
fix(color): draw the More chevron in CSS so the editor chunk stays flat
HMarzban Nov 22, 2026
a856ea0
fix(color): read Recent as stored so the editor chunk keeps no new ex…
HMarzban Nov 22, 2026
8aed264
fix(bubble): render the icon face as a component and pin the brush re…
HMarzban Nov 22, 2026
b9e647c
docs(slash): say which slash-items helper reads memory
HMarzban Nov 22, 2026
5e981a7
perf(slash): write nothing per keystroke while the + is hidden
HMarzban Nov 22, 2026
5efe70e
fix(toolbar): keep turn-into rows on one line and the check rows' end…
HMarzban Nov 22, 2026
66eb6ec
docs(bubble): add the phase 1 design-review screenshots
HMarzban Nov 22, 2026
85c594e
docs(bubble): record phase 1 in the changelog and contract A20
HMarzban Nov 22, 2026
0046d27
fix(a11y): name the row's stand-ins by the words tablets show
HMarzban Nov 22, 2026
71e0830
fix(phone): load the insert sheet body on its own and tighten the sheets
HMarzban Nov 22, 2026
7178c4d
docs(contract): record the stand-in names and the sheet body chunk in…
HMarzban Nov 22, 2026
ff3d3ac
docs(bubble): add the flipped, paint and narrow-window screenshots
HMarzban Nov 22, 2026
6e451fb
refactor(toolbar): drop the duplicate group label and reserve the pag…
HMarzban Nov 22, 2026
3010a8c
Merge branch 'feat/bubble-v2-settle' into feat/bubble-v2
HMarzban Nov 22, 2026
a8a3c17
docs(toolbar): re-shoot the before baseline and add other-menu checks
HMarzban Nov 22, 2026
6ba77ab
docs(changelog): re-measure the editor chunk for the grouped more menu
HMarzban Nov 22, 2026
84c5f89
feat(bubble): settle keyboard selections before showing
HMarzban Nov 22, 2026
49ff973
fix(ui): open submenus on the inline end
HMarzban Nov 22, 2026
5bcb2a8
feat(toolbar): turn list items and quotes into a text style from the …
HMarzban Nov 22, 2026
5117bc1
docs(bubble): record the settle, the registry unwrap and the new sizes
HMarzban Nov 22, 2026
427f1c9
fix(phone): follow the visual viewport's height while the keyboard is up
HMarzban Nov 22, 2026
f8670e0
Merge remote-tracking branch 'origin/main' into feat/overflow-groups
HMarzban Nov 22, 2026
2b29cd9
docs(toolbar): re-measure the grouped more menu against main
HMarzban Nov 22, 2026
204eddb
Merge remote-tracking branch 'origin/main' into feat/quick-insert
HMarzban Nov 22, 2026
1751306
fix(toolbar): draw the tablet stand-in words from first paint
HMarzban Nov 22, 2026
6a28ee5
docs: update the P4 changelog entry and A21 for the review fixes
HMarzban Nov 22, 2026
d010832
fix(color): lay named rows out in a line and open More on the inline …
HMarzban Nov 22, 2026
5cfd7cb
test(color): align the colour suites with the named rows
HMarzban Nov 22, 2026
0ae452a
fix(slash): an ordinary + slash, quiet typing and RTL hints
HMarzban Nov 22, 2026
fe7d476
test(slash): check shortcuts and JSX text, with the app input rules
HMarzban Nov 22, 2026
9356f5f
docs(color): screenshots of the named colour rows and the phone pick …
HMarzban Nov 22, 2026
33da950
docs(slash): re-shoot the RTL screenshots with left-to-right hints
HMarzban Nov 22, 2026
f582873
docs(slash): update the P2 changelog entry after review
HMarzban Nov 22, 2026
1301c11
test(bubble): wait out the scale-in and keep setup marks out of undo
HMarzban Nov 22, 2026
deb9103
fix(bubble): keep the keyboard flag while Shift is held
HMarzban Nov 22, 2026
0a754b5
Merge remote-tracking branch 'origin/main' into feat/phone-insert-sheet
HMarzban Nov 22, 2026
175dc01
Merge branch 'feat/quick-insert' into feat/phone-insert-sheet
HMarzban Nov 22, 2026
0ad5ecb
Merge branch 'feat/bubble-v2-settle' into feat/bubble-v2
HMarzban Nov 22, 2026
c54e459
refactor(phone): take Suggested and New badges from the slash menu's …
HMarzban Nov 22, 2026
90871cc
docs(phone): re-shoot the insert sheet, Aa sheet and tablet stand-in …
HMarzban Nov 22, 2026
8b40031
docs: re-measure P4 against main 1548d5e with P2 merged
HMarzban Nov 22, 2026
630bff6
test(slash): raise the slash chunk budget to 7 KB
HMarzban Nov 22, 2026
4ff290e
test(slash): name the budget test after the 7 KB budget
HMarzban Nov 22, 2026
c6c2be3
fix(color): open bubble colour menus past the selection's lines, neve…
HMarzban Nov 22, 2026
4f7cb73
fix(phone): 44px pill actions and six-swatch lines in the Aa sheet
HMarzban Nov 22, 2026
ab51bd4
feat(color): named rows pick and close, wrap, typeahead and announce
HMarzban Nov 22, 2026
e89b981
Merge branch 'feat/quick-insert' into feat/phone-insert-sheet
HMarzban Nov 22, 2026
83f08da
Merge remote-tracking branch 'origin/main' into feat/overflow-groups
HMarzban Nov 22, 2026
a0fb1c2
Merge remote-tracking branch 'origin/main' into feat/phone-insert-sheet
HMarzban Nov 22, 2026
9d58096
docs(phone): tablet stand-in words decision pack
HMarzban Nov 22, 2026
36018d3
docs(toolbar): re-measure the grouped more menu against main 84a9458
HMarzban Nov 22, 2026
1c7c510
docs: cite the P4 editor-chunk measurement against main 84a9458
HMarzban Nov 22, 2026
f40bb62
fix(color): shrink the sheet's swatch gaps, never the swatches, on 32…
HMarzban Nov 22, 2026
6218d28
test(color): picks close the menu and return focus to the text
HMarzban Nov 22, 2026
89a4ab3
docs(color): re-shoot the bubble colour menu and the phone sheet
HMarzban Nov 22, 2026
e9e6d49
Merge branch 'feat/overflow-groups' into feat/phone-insert-sheet
HMarzban Nov 22, 2026
9b58ab1
feat(toolbar): give touch tablets the stand-in words at every width
HMarzban Nov 22, 2026
60bc13b
docs: record option (b) for the tablet stand-in words
HMarzban Nov 22, 2026
ba3fc25
fix(color): announce picks from the panel so the editor chunk keeps i…
HMarzban Nov 22, 2026
8e93fde
docs(color): note the e2e that guards the untrusted Esc close
HMarzban Nov 22, 2026
b8864fd
Merge branch 'feat/bubble-v2-color' into feat/bubble-v2
HMarzban Nov 22, 2026
f29198d
Merge remote-tracking branch 'origin/feat/phone-insert-sheet' into fe…
HMarzban Nov 22, 2026
604637d
refactor(toolbar): drop the physical padding stopgap in menu check rows
HMarzban Nov 22, 2026
ef12763
fix(toolbar): turn only the selected list items and quote lines into …
HMarzban Nov 22, 2026
ab0f26c
refactor(toolbar): name the paragraph style Text in the registry
HMarzban Nov 22, 2026
d9065b3
fix(bubble): keep Turn into off the selection's lines when it flips
HMarzban Nov 22, 2026
5e74f58
feat(toolbar): skip the title, lift for code and quote and name what …
HMarzban Nov 22, 2026
6fec72f
fix(bubble): cancel a pending bubble on Esc and tighten its smaller e…
HMarzban Nov 22, 2026
9038c90
refactor(toolbar): lift wrapped text blocks with less code
HMarzban Nov 22, 2026
8975a49
docs(bubble): fold the colour rows, the lift and the new sizes into P…
HMarzban Nov 22, 2026
1550854
test(bubble): load the bubble chunk before timing Esc against the delay
HMarzban Nov 22, 2026
28c6982
perf(toolbar): inject the per-item style lift from the lazy chunks
HMarzban Nov 22, 2026
adf7aaa
fix(ui): keep menu shortcut glyphs left to right in RTL
HMarzban Nov 22, 2026
135cb2d
perf(bubble): draw face and More headings icons from the registry
HMarzban Nov 22, 2026
5427def
docs(bubble): record the injected style lift and the flat editor chunk
HMarzban Nov 22, 2026
1f8ddad
perf(slash): leave the style lift to the bubble's idle chunk
HMarzban Nov 22, 2026
367c3fa
perf(slash): give the phone Insert sheet the slash helpers through th…
HMarzban Nov 22, 2026
224512a
perf(phone): hand the Insert sheet the slash helpers at load, not by …
HMarzban Nov 22, 2026
b0fd152
perf(slash): build the menu's and the phone sheet's items with one ex…
HMarzban Nov 22, 2026
09d4eb2
fix(slash): keep Markdown hint caps at the row's inline end in RTL
HMarzban Nov 22, 2026
f319ed3
test(toolbar): ⋯ rows line up their labels in RTL
HMarzban Nov 22, 2026
c46c703
fix(phone): keep an Insert cell's note with its label
HMarzban Nov 22, 2026
00bcedb
docs(bubble): record the slash budget fix and the RTL fixes
HMarzban Nov 22, 2026
ce9408c
fix(bubble): read a pending keyboard selection before Alt+F10 shows t…
HMarzban Nov 22, 2026
b2a6fbf
fix(toolbar): lift list items as list commands do and keep cells out …
HMarzban Nov 22, 2026
1fa5b69
fix(bubble): refuse only a pending show on Esc and tidy the review's …
HMarzban Nov 22, 2026
3857a4d
fix(toolbar): line up menu labels and shortcuts, and give Text its icon
HMarzban Nov 22, 2026
d912c80
fix(phone): line up More headings with the Aa sheet's Style rows
HMarzban Nov 22, 2026
3b56450
fix(toolbar): install Text's icon with the style lift, not in the reg…
HMarzban Nov 22, 2026
6687194
fix(phone): install Text's icon from the Aa sheet, not the shared lift
HMarzban Nov 22, 2026
7190551
fix(toolbar): keep Text's icon in the registry after all
HMarzban Nov 22, 2026
01e444b
perf(toolbar): dry-run Turn into's lift once per editor state
HMarzban Nov 22, 2026
a3a2261
test(bubble): name the spec's waits after the bubble's delays
HMarzban Nov 22, 2026
4fb9e83
revert(toolbar): leave Text without a registry icon, as on main
HMarzban Nov 22, 2026
65d065d
test(bubble): wait for the editor's focus before pressing keys
HMarzban Nov 22, 2026
449232c
Merge remote-tracking branch 'origin/main' into feat/bubble-v2
HMarzban Nov 22, 2026
4f48944
fix(bubble): show Comment only where comments are offered
HMarzban Nov 22, 2026
672c91d
docs(bubble): re-measure P1 against main 7b9fdc7
HMarzban Nov 22, 2026
54d34d6
fix(toolbar): split a list item before lifting a block after its first
HMarzban Nov 22, 2026
301fb23
test(toolbar): assert the exact shape after lifting a middle child
HMarzban Nov 22, 2026
a93ffd0
fix(toolbar): refuse a style lift whose step throws
HMarzban Nov 22, 2026
7aa7940
perf(toolbar): stop Turn into's scan once marks and cells are known
HMarzban Nov 22, 2026
266a57a
test(bubble): wait for the comments hook before selecting for Comment
HMarzban Nov 22, 2026
5351bd5
docs(design): add the bubble and quick insert design review page
HMarzban Nov 22, 2026
79cf4d6
Merge remote-tracking branch 'origin/main' into feat/bubble-v2
HMarzban Nov 22, 2026
ad0f280
docs(bubble): record the owner's design review decisions
HMarzban Nov 22, 2026
1bf2204
test(toolbar): compare only the style shortcuts' widths off macOS too
HMarzban Nov 22, 2026
630ad05
Merge remote-tracking branch 'origin/main' into feat/bubble-v2
HMarzban Nov 22, 2026
4fc591e
perf(toolbar): give the lazy menus their own Type icon
HMarzban Nov 22, 2026
481bf61
perf(toolbar): keep the title reason and insert-kind check out of the…
HMarzban Nov 22, 2026
d8f06c3
build: add the bubble and quick insert work's 26 B D23 ledger line
HMarzban Nov 22, 2026
6e9cf5f
test(toolbar): allow a pixel between style shortcut widths without ta…
HMarzban Nov 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
204 changes: 204 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,210 @@ since the previous tag.

## [Unreleased]

### Selection bubble P1: Style ▾, strike, code, clear and a gap-free link field

The selection bubble gains the rest of its v2 row (spec
`2026-11-17-bubble-and-quick-insert-design.md` §7, v1 contract A21):
Style ▾ │ B I U S ‹› Tx │ A▁▾ 🔗 🖌, and named colour rows. With P2–P4, the
editor chunk group grows 26 B: 394,545 B gz against 394,519 B on `main` at
`2764fb5`. That is a D23 ledger line the owner approved on 2026-11-22
(`EDITOR_CHUNK_LEDGER_BYTES` 2,205 → 2,231 B), covering the style-lift hook,
List and Quote in the style value and the Insert sheet's nested load. The
per-item lift behind the text styles is injected from the lazy chunks.
Merging `main` `2764fb5` first measured +981 B: the lazy menus imported
lucide's Type, which made Turbopack split the editor group's small modules
into two files. The menus now draw their own copy of the icon
(`components/smart-toolbar/type-icon.ts`). The
"/" chunk is under its 7 KB budget, 7,099 B gz by its own test
(`SLASH_BUDGET=1`; 7,334 B on the P4 tip): the phone Insert sheet now gets
the "/" items at load instead of importing them. The bubble chunk is
14,860 B gz (9,797 B on `main` at `2764fb5`) and the colour chunk
6,580 B gz (3,639 B).

#### Added

- **Bubble:** Style ▾ shows the selection's block type as one word (Text,
H1–H6, Title, List, Quote, Code, Mixed), sized once to the longest word,
and opens Turn into away from the text. Strike, inline code and clear
formatting join B, I and U. A comment slot is reserved at the end and
renders nothing until the comments work registers `comment.add`.
- **Turn into:** one menu body for the bubble and the row's Text style ▾:
Text, Heading 1–3, More headings ▸ (4–6), the three lists, Quote and Code
block, with icons, shortcuts and a trailing ✓, and no Markdown chips.
The row keeps Your formats below them.
- **Text styles:** Text and the headings turn the selected list items or
quote lines into that block, lifted to the top level, in one undo step,
wherever they run (Turn into, the palette, the "/" menu, the phone's
Style rows, the shortcuts); unselected items and lines stay in their list
or quote, and a range across a paragraph and a list converts every
block. The lift loads with the bubble (on idle), the menus, the phone
bar or the palette; before any of them, a style shortcut or a "/" pick
in a list restyles in place, as before.
- **Turn into:** after select all it converts everything but the title
("The title stays a heading."); Code block and Quote lift list items and
quote lines first; Code block over formatting says "Formatting
removed"; a range with table cells converts around them ("Table cells
keep their type."). Each pill has Undo. Opened toward the text, it goes
past the selection's lines, never over them.
- **Colour:** the bubble's and the row's colour menus are named rows:
Recent, then Text | Highlight side by side (Default and No highlight
first, five colours each, the rest under More colours ▸ and More
highlights ▸), with ✓ on the current value, typeahead and the hover
preview. From the bubble the menu opens below or above the selection,
never over it. Enter or Space picks and closes the menu (a change from
O4, spec §7.10), and the pick is announced with Undo.
- **Phone:** the Aa sheet keeps the swatch grid, six per line, names the
current colours under it, and each tap shows a pill naming the colour
("Teal text") with a 44px Undo.
- **Bubble:** a keyboard selection (Shift+arrows, ⌘A) shows the bubble
300 ms after Shift is released and the selection is still, never while
Shift is held or a key repeats.
- **Bubble:** Alt+F10 shows a bubble that is still waiting (its delay) at
once, with focus on Style ▾.
- **Bubble:** applying inline code over linked or coloured text says "Link
and colour removed" (or "Link removed", "Colour removed") on the status
pill, with Undo.

#### Changed

- **Text style:** the paragraph style is named "Text" everywhere (the
registry label, so the row, the palette, the "/" menu and the phone
agree), and the row's face reads "List" or "Quote" inside a list or
quote, as the bubble's does.
- **Bubble:** inside inline code, B, I, U, S, colour and link say "Inline
code can't take other formatting." instead of the generic refusal; the
Paint format brush says the same on inline code on every surface
(phone cells included), where it said "Code has no formatting."
- **Bubble:** a lighter edge in light mode, its own darker-than-page
surface in dark mode (`oklch(0.24 0 0)`, edge `oklch(1 0 0 / 36%)`), focus
rings drawn inside each button, a dashed bar for a mixed mark, and a
`CanvasText` edge under forced colours.
- **Bubble:** motion follows the O10 token: 120 ms scale-in from the anchor
side, 80 ms fade out, and none at all under reduced motion
(`prefers-reduced-motion` or `data-motion="reduce"`).

#### Fixed

- **RTL:** the "/" menu's Markdown hint caps sit at the row's inline end
again (they had drifted next to the labels); the row ⋯ menu's rows line
up; menu shortcut glyphs read left to right; the phone Insert sheet keeps
a note ("3 × 3") next to its label, so it no longer reads as the next
column's.

- **Bubble:** clicking 🔗 and pasting or typing a URL at once no longer
replaces the selected words: focus moves to the link field in the click
itself, and the bubble hides in the same task.
- **Bubble:** Esc while the bubble is still waiting to show (its delay or
a keyboard selection's settle) cancels it.

### Phone Insert sheet, Style first in the Aa sheet, words on tablet stand-ins (P4)

Phase P4 of the selection bubble and quick insert design (spec §8.3, §13.1,
§13.2). Phones get an Insert sheet in place of the desktop dropdown, the Aa
sheet leads with Style, and touch tablets name the row's unclear stand-ins.

#### Added

- **Phone:** the bar's Insert cell opens a bottom sheet
(`components/smart-toolbar/phone/insert-sheet.tsx`): the "/" menu's items
as a two-column grid of 44px cells. Suggested (the "/" menu's own rows for the
recent kinds) comes first when there are any, then "Blocks" (the caret's block is empty)
or "Turn into" (it has text), then Insert. Kinds that can't run here show
their reason on a second line. Table and Embed open their step inside the
sheet; Diagram lists the templates. A pick closes the sheet and puts the
caret in the new block, with the keyboard back. "/embed" on a phone opens
the sheet at the embed step. The sheet rides above the keyboard while the
link field has focus, and a pick refused since it opened (a
collaborator's edit) says why inside it. Its cells and steps are their own
lazy chunk, fetched when the browser is idle and on the cell's press.
- **Touch tablets:** on a coarse pointer from 768px, the row's stand-ins
read `T Format ▾`, `¶ Layout ▾` and `⫶ Block ▾` (O8 a), from first paint
(CSS in `app/globals.css`). Below an 848px window the row has no room for
their 120px in a code block or table, so (owner decision, option b) Redo
moves from the row to the top of ⋯ there, and the list button keeps only
List ▾. ⌘⇧Z still redoes. Desktop's ⋯ menu is unchanged.

#### Changed

- **Toolbar:** the stand-ins are named "Format" (was "More text
formatting"), "Layout" (was "Paragraph") and "Block: Section tools" and so
on (was "Section tools"), so each name begins with the word shown on it
(WCAG 2.5.3). The phone's slot cell takes the same name.
- **Phone:** the Aa sheet starts with Style: Text and H1–H3, a More
headings disclosure for H4–H6 (open when the current style is one of
them, closable all the same), then the lists and Quote, the current style
pressed. Colours follow. Both sheets end in a 16px fade while they scroll,
above the home indicator.

Measured against `main` at 84a9458, with the "/" menu's P2 and the grouped ⋯
menu's P3 work merged in: the editor chunk group gets 23 B smaller (393,995 B
gz against 394,018 B). The phone bar chunk grows 978 B gz (18,175 B), and the
sheet body is a chunk of its own, 3,926 B gz. The app's CSS grows 494 B gz
(16,487 B): 138 B for the tablet words and 71 B for the touch step that
moves Redo; the rest is P2 and P3.

### Quick insert P2: Suggested, the "/" hint and footer, and the `+` on empty lines

The "/" menu gains what the second reference set showed it lacked, and a
pointer path to it (spec `2026-11-17-bubble-and-quick-insert-design.md`
§8.2, §8.5; v1 contract A20). The editor chunk group is unchanged
(393,817 B gz, −3 B against `main` at `1548d5e`); the slash chunk grows
from 5,772 B to 7,041 B gz, and its test budget (`SLASH_BUDGET=1`) is
raised from 6 KB to 7 KB (7,168 B) by the owner's decision of 2026-11-22.
The growth by feature (gz): the `+`'s undo handling 336 B, the footer
269 B, the "Type to search" hint 258 B, Suggested 154 B, the RTL anchor
66 B; "New" badges compile out while none is declared. The bubble chunk, which now mounts the
`+`, from 9,798 B to 10,930 B gz. The footer lives in `slash-menu.tsx`
rather than its own `slash-footer.tsx` (the plan's file list): it shares
the menu's state and placement, and a separate module would only add
bytes.

#### Added

- **"/" menu:** a Suggested section leads with your last 3 inserted kinds
(table, image, divider…) that can go at the caret; each stays in its own
section too. A new writer sees no Suggested section; "Forget my choices"
clears it. A query hides it and puts a recent kind first among equal
matches.
- **"/" menu:** "Type to search" sits after the "/" while the query is
empty and nothing follows the caret (never during IME composition); a
pinned footer teaches the active row's Markdown shortcut ("Type ## then
space for Heading 2") and has a Close button (Esc still works). On touch
the footer is only a 44 px Close. Hints stay left to right in RTL ("1.",
never ".1").
- **"/" menu:** rows can carry a "New" badge until a date, hidden once you
have used that kind; none are declared yet.
- **`+` on an empty line:** on a mouse or trackpad, a `+` in the start
margin of an empty paragraph (in line with the heading grips; the right
margin in RTL) types the "/" for you, so the ordinary "/" menu opens. It
shows beside the caret 300 ms after you stop typing, or under the
pointer after a 150 ms rest, never in the title, a list, a quote or a
table cell, and never on touch. The "/" it types is an ordinary one: a
query, a pick, Esc and undo work as after a typed "/". Only with the
query still empty, Esc removes it without an undo step and a pick
undoes to the empty line. It is mounted by
the lazy bubble chunk's desktop wrapper, so it appears once that chunk
has loaded (a deviation from the spec's §15 file split, which put it in
`SlashMenuHost`: that would have grown the editor chunk).
- **Insert menu:** each row shows its "/" alias ("/table", "/code").

#### Changed

- **"/" menu:** 320 px wide (was 288); in an RTL paragraph its right edge
is at the "/".
- **Placeholder:** an empty paragraph reads "Type / for blocks" (was
"Type something...").

### Row ⋯ menu in three labelled groups (BQ4)

The row's ⋯ menu is now Text (Superscript, Subscript, Inline code, Clear
formatting, Paint format), View (Simplified toolbar, Appearance) and Help
(All actions…), with "Forget my choices…" alone at the end. Each group has a
visible heading and `role="group"` with the same label, and every row keeps a
16 px leading slot so the labels line up (Simplified toolbar shows its check
there). Nothing is added or removed. Page width follows with the preferences
work. Editor chunk +1 B against `main` at `84a9458`, from chunk-name hashes only; no eager code.

### Desktop P2.6f: repair and rebuild the library

Repair and rebuild for the format-2 library (offline data-model revision
Expand Down
69 changes: 69 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,72 @@ button[aria-pressed="mixed"]::after {
color: GrayText;
}
}

/*
* Touch tablets (O8 a, spec §13.2): the row's stand-ins whose icons don't
* explain themselves show one fixed word between the icon and the chevron
* ("Format", "Layout", "Block"; each stand-in's name begins with it, WCAG
* 2.5.3, `collapse-menus.tsx`). Here, with the app's first CSS, so the row
* has its final width at first paint and never shifts, at no cost to the
* editor chunk group.
*/
@media (min-width: 768px) and (pointer: coarse) {
:is(
[data-toolbar-group="marks"],
[data-toolbar-group="paragraph"],
[data-toolbar-group="slot"]
)
> [data-collapse-standin]
[data-toolbar-item]::after {
order: 1;
font-size: 0.8125rem;
font-weight: 500;
}

:is(
[data-toolbar-group="marks"],
[data-toolbar-group="paragraph"],
[data-toolbar-group="slot"]
)
> [data-collapse-standin]
[data-toolbar-item]
> svg:last-child {
order: 2;
}

[data-toolbar-group="marks"]
> [data-collapse-standin]
[data-toolbar-item]::after {
content: "Format" / "";
}

[data-toolbar-group="paragraph"]
> [data-collapse-standin]
[data-toolbar-item]::after {
content: "Layout" / "";
}

[data-toolbar-group="slot"]
> [data-collapse-standin]
[data-toolbar-item]::after {
content: "Block" / "";
}
}

/*
* The touch ladder's last step (owner decision 2026-11-22, option b): the
* words add 120px, which a row narrower than 832px (the row spans the
* window less 16px, so a window under 848px) has no room for in a code or
* table block. There Redo leaves the row for the top of ⋯ (the same query,
* `TOUCH_ROW_REDO_IN_MORE` in `row/row-menu-bodies.tsx`), and the list
* split keeps only List ▾ (one tap more for the last list type). ⌘⇧Z
* still redoes.
*/
@media (min-width: 768px) and (max-width: 847.98px) and (pointer: coarse) {
[data-variant="fixed"]
[data-toolbar-group="history"]
[data-action-id="history.redo"],
[data-variant="fixed"] .st-split[data-list-face] > [data-action-id^="list."] {
display: none;
}
}
2 changes: 1 addition & 1 deletion components/document-editor/document-editor-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const LinkPolicyHyperlink = Hyperlink.extend({

const PLACEHOLDER_TEXT: Record<string, string> = {
heading: "Heading",
paragraph: "Type something...",
paragraph: "Type / for blocks",
codeBlock: "Write code...",
};

Expand Down
42 changes: 32 additions & 10 deletions components/document-editor/mobile-toolbar-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {

import { ActionButton } from "@/components/smart-toolbar/action-button";
import { FormatSheetBody } from "@/components/smart-toolbar/phone/format-sheet";
import { InsertSheet } from "@/components/smart-toolbar/phone/insert-sheet";
import {
type MobileBarMode,
nextMobileBarMode,
Expand Down Expand Up @@ -139,8 +140,9 @@ interface MobileToolbarContentProps {
/** Esc on a cell: back to the document with its selection. */
onEscape?: () => void;
/**
* The last cells (List ▾, Indent, Insert ▾: `PhoneMenuCells`), rendered
* by the editor shell so the row's menus stay in the editor chunk.
* List ▾, Indent and the context slot (`PhoneMenuCells`), rendered by
* the editor shell so the row's menus stay in the editor chunk. Insert
* (its sheet) follows them, from this chunk.
*/
menuCells: ReactNode;
}
Expand All @@ -151,11 +153,11 @@ interface MobileToolbarContentProps {
* undo, redo (from 404px; below, the sheet carries it, so the slot cell
* never shifts the others), Aa (the
* "Text format" sheet: style, size, colours, align, more), B, I, then
* `menuCells` (list, indent, the context slot, Insert). Toggles show their
* state with `aria-pressed` (#269). Hidden in a read-only document (#308),
* which also closes the sheet. While text is selected it swaps to
* `PhoneSelectionCells` (PR E, spec §4.7), never while focus is in the bar
* or the sheet is open; ✕ keeps the normal cells until the selection
* `menuCells` (list, indent, the context slot), then Insert (its sheet,
* spec §8.3). Toggles show their state with `aria-pressed` (#269). Hidden
* in a read-only document (#308), which also closes the sheets. While text
* is selected it swaps to `PhoneSelectionCells` (PR E, spec §4.7), never
* while focus is in the bar or a sheet is open; ✕ keeps the normal cells until the selection
* collapses. Clear of the home indicator while the keyboard is closed
* (`data-keyboard`, `phone.scss`). The status pill (design pass §5) sits
* 8px above it, a sibling of the cells, never in a masked element. Its own
Expand All @@ -168,6 +170,7 @@ export function MobileToolbarContent({
menuCells,
}: MobileToolbarContentProps) {
const [sheetOpen, setSheetOpen] = useState(false);
const [insertOpen, setInsertOpen] = useState(false);
/** Opened for `formats.remove`: Your formats starts at its Remove list. */
const [removing, setRemoving] = useState(false);
const recent = useRememberedChoice(RECENT_COLORS_CHOICE);
Expand All @@ -189,7 +192,7 @@ export function MobileToolbarContent({
const [focusInBar, setFocusInBar] = useState(false);
const [mode, setMode] = useState<MobileBarMode>("all");
const nextMode = nextMobileBarMode({
hasTextSelection: selectionKey !== null && !sheetOpen,
hasTextSelection: selectionKey !== null && !sheetOpen && !insertOpen,
focusInBar,
dismissedForSelection: dismissed,
current: mode,
Expand Down Expand Up @@ -299,15 +302,25 @@ export function MobileToolbarContent({
[editor, readOnly, onSheetOpenChange],
);

const onInsertOpenChange = useCallback(
(open: boolean) => {
setPageInert(editor, open);
setInsertOpen(open);
},
[editor],
);

/** Closes the sheet for an action that moves focus elsewhere itself. */
const closeSheet = useCallback(() => {
keepFocusOnCloseRef.current = true;
onSheetOpenChange(false);
}, [onSheetOpenChange]);

useEffect(() => {
if (readOnly) onSheetOpenChange(false);
}, [readOnly, onSheetOpenChange]);
if (!readOnly) return;
onSheetOpenChange(false);
onInsertOpenChange(false);
}, [readOnly, onSheetOpenChange, onInsertOpenChange]);

useEffect(() => () => setPageInert(editor, false), [editor]);

Expand Down Expand Up @@ -396,6 +409,15 @@ export function MobileToolbarContent({
{menuCells}
</>
)}
{/* Mounted in both modes: it answers "/" and palette picks of Table
and Embed (`insert.open`) even while the selection cells show. */}
<InsertSheet
editor={editor}
open={insertOpen}
onOpenChange={onInsertOpenChange}
cell={mode !== "selection"}
keyboardInset={inset}
/>
{sheetOpen ? null : <StatusPill placement="phone" />}
</Toolbar>
);
Expand Down
Loading
Loading