Skip to content

feat(admin): lay out the content editor as a page - #3710

Merged
khoinguyenpham04 merged 72 commits into
mainfrom
noah/editor-ui-refinement-7307c4
Oct 5, 2026
Merged

khoinguyenpham04 merged 72 commits into
mainfrom
noah/editor-ui-refinement-7307c4

Conversation

@khoinguyenpham04

@khoinguyenpham04 khoinguyenpham04 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Lays out the admin's content editor as a page, closer to Notion, while keeping every existing editor feature and Kumo's look.

Page

  • One top bar. It replaces the old header and the settings panel's action row. It holds the back link, a collection / title breadcrumb that follows the title as you type, the locale badge, the save status, and Live View, Preview, and Publish. Distraction-free mode uses the same bar and adds Discard changes and Schedule. The bar stays on one row: when it's narrow, its secondary buttons, Unpublish included, keep only their icon and the publish button reads Publish (screen readers still get the full labels), and on touch screens each button's target spans the bar's height.
  • Title. The collection's title field is a large input at the top of the page. Enter, or Down Arrow at the end of the title, moves into the body, and Up Arrow on the body's first line moves back. An entry without a body keeps Enter-to-save.
  • Body. The content Portable Text field uses a new document variant:
    • no frame, with page typography based on Notion's block rhythm;
    • a sticky, rounded toolbar card as wide as the page column, which scrolls sideways with an edge fade when it doesn't fit;
    • inline code in the body text colour on a faint tint with a hairline border;
    • the word count on a hairline rule that ends the body, hidden while the body is empty, above a clickable area that moves the caret to the end.
  • Other Portable Text fields keep the framed (boxed) editor and its prose typography.

Blocks

  • Hovering a block shows + (Alt-click adds above) and a ⋮⋮ handle. + starts a line with the slash menu open. Autosave ignores that line until a command runs, and closing the menu before anything is typed after the slash removes it. The handle drags the block or opens the block menu: Turn into, Align, Continue/Restart numbering, Duplicate, Move up/down, and Delete. Handles also show on touch screens wide enough for them.
  • Turn into converts a whole list or quote item by item, keeps nesting when switching list types, keeps alignment, joins a new list with a list of the same type beside it and keeps the joined list selected, and is one undo step. The toolbar's block buttons, the heading menu, and the slash menu convert through it, so they give the same result and use the same names.
  • Quotes and lists hold only what Portable Text stores for them: quoted paragraphs, and list item text with nested lists. Before, a heading, code block, image, or divider could be nested in one (from Turn into, the toolbar's Quote, /quote, an input rule, an insert, paste, or a drop) and was dropped on save. Now it lands beside the quote or list. Pasted HTML is split around such a block first, so no empty quote or bullet is left behind and a numbered list keeps counting after it. Alignment is offered only where it's saved.
  • A block inserted or pasted while another block is selected goes after it, and typing can't replace a selected image, divider, or embed. A block inserted with the caret in text goes after that block instead of splitting it, and an empty line in a list or quote becomes the inserted block.
  • A list nested in a list of the other type reports and converts its own type. The toolbar's block buttons and TipTap's block shortcuts convert the same way as Turn into.
  • Escape selects the block holding the caret, including from an HTML block's source. The arrow keys then move between blocks, Enter goes back to writing, and typing, dictation, or an IME can't replace the selected block. Select All selects the text of the block holding the caret first, and the whole document on a second press.
  • A selected block gets a tint, replacing each node view's own ring. Media and embeds, which have no text to carry the tint, also get a brand-coloured edge.
  • Clicking the space between two blocks that hold no text, such as embeds, leaves the caret where it was, as in Notion, instead of showing ProseMirror's gap cursor. + adds a line between them.
  • Code blocks get more room in their header row, where the language and copy buttons sit, and the block handle centres on that row.
  • A newly inserted HTML or iframe block shows its selected tab and its tabs take the arrow keys, and a new code block's language and copy buttons are reachable with Tab. Both were also broken on main.

Menus

  • Slash menu: commands are grouped (Basic blocks, Media, Advanced, Embeds), and search is ranked (/bl finds Bullet List). Each command shows its Markdown hint, and a footer describes the highlighted command. Headings 4 to 6 appear when you search for them.
  • Selection toolbar: Turn into, link, the inline marks, and More formatting (subscript, superscript, alignment, Clear formatting). On narrow screens it scrolls inside its own surface with the same edge fade as the toolbar.
  • Link preview: clicking a link, or otherwise placing the caret in it, shows where it goes, with Edit link and Remove link, instead of selecting the whole link. A bare domain such as example.com or a host such as localhost:3000 is linked with https://, a relative path such as ../about.html stays as typed, and a link the editor won't apply keeps its field open and says why.
  • Toolbars for assistive technology: the selection, link, table, and image toolbars are announced as toolbars, and Left, Right, Home, and End move between their buttons, flipped in RTL.
  • Shared menu parts: the block, slash, and selection menus share primitives in editor/EditorMenu.tsx, built on Base UI's menu so submenus and icons use logical spacing in RTL.

PortableTextEditor gains a variant prop ("boxed" by default, or "document") and an onArrowUpAtStart callback. Both are additive.

CI and test reliability

This PR changes ci.yml, so CI runs the full test plan on it. These fix the failures and flakes that surfaced:

  • Table E2E: the browsers' system packages are cached (installing them from a slow mirror took 23 minutes), and the cache is saved right after the install. The marketplace fixture PNG gets a valid checksum, which Firefox rejected. WebKit's reports of same-origin fetches cancelled by a navigation no longer fail the table spec.
  • E2E setup warms up the admin in a browser, so Vite's dependency reload doesn't fail each shard's first admin test, and stops rebuilding fixture dependencies on every run.
  • Sturdier waits:
    • the autosave, table, and content-actions e2e tests;
    • the admin toolbar and slash menu tests, which now focus the editor synchronously;
    • publish-autosave-race, which keeps advancing fake time until the autosave arrives.
  • plugin-types: the exhaustive capabilities round-trip gets a 60-second timeout. It timed out at 20 seconds on CI and takes about 4 seconds locally.

Keyboard shortcut hints and new shortcuts are left for a follow-up.

The editor screens' visual-regression baselines change with this layout.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main.
  • I have added and reviewed the user-facing changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...
  • I have included screenshots below if this PR changes the UI

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Opus 5.5

Screenshots / test output

The sample post, before (main) and after, at 1440×900 unless noted.

Before After
Main's post editor in dark mode: an "Edit Post" header, boxed title, featured image, and content fields, with Saved and Publish now in the settings panel The post editor in dark mode as a page: one top bar with Posts / title, Saved, and Publish now, a large Title field, the featured image, a rounded toolbar card, and frameless body text
Main's post editor in light mode The post editor as a page in light mode
Main's block menu with Turn into, Duplicate, and Delete The block menu open from a paragraph's handle, with Turn into, Align, Duplicate, Move up, Move down, and Delete, and the Turn into submenu showing Text checked; the paragraph is tinted as selected
Main's slash menu as a flat list The slash menu grouped under Basic blocks with Markdown hints, and a footer describing the highlighted command next to esc
Main's selection toolbar with inline marks The selection toolbar with Turn into set to Text, link, bold, italic, underline, strikethrough, code, and More formatting
Main's editor on a 390px phone, with the actions wrapping in the header The editor on a 390px phone: the bar stays on one row with icon-only Saved, Settings, and distraction-free buttons beside Publish now, and the toolbar card scrolls sideways
After
Block handles, plus and grip, beside a hovered paragraph in the page margin
Distraction-free mode using the same top bar, with Saved, Schedule, and Publish now
The block menu in Arabic, opening on the right with mirrored submenu arrows
A code block whose Bash language and copy buttons sit in its header row, with the + and grip handle centred beside that row, and inline code in the paragraph above drawn in the text colour with a hairline border
The link preview under a clicked link, showing developers.cloudflare.com/ai-gateway/ with Edit link and Remove link buttons, and the caret left in the link
The end of the body: a hairline rule with 307 words, 1,994 characters, and 2 min read centred on it, then the Excerpt field below

Tests: the admin suite passes. The new tests cover:

  • Turn into across lists and quotes, including one-step undo, quoting headings and code, and list joining with the joined list kept selected;
  • paste and inserts beside quotes, lists, and selected blocks, splitting a pasted quote or list around a block it can't hold, and the input guards on selected blocks;
  • scoped Select All and the title/body handoff;
  • the toolbar's block buttons and alignment availability;
  • links: bare domains, relative paths, rejected image links, and the start edge;
  • Tab and Escape returning from menus and the HTML source;
  • slash menu ordering and short queries, the + line staying out of autosave and undo, and the page end click;
  • clicking a link keeps the link preview, and a click between embeds leaves the caret alone;
  • the floating toolbars' roles and arrow keys, which leave the link field's arrow keys alone;
  • keyboard access to the tabs and toolbar of newly inserted HTML, iframe, and code blocks;
  • the code block handle on its header row, and the word count hidden for an empty body.

The entry editor becomes a Notion-like page: a large title, the content
field's Portable Text editor without a frame, and one top bar for
navigation, save status, and the view and publish actions, shared with
distraction-free mode.

The document editor gets a floating sticky toolbar, block handles with a
block menu (turn into, align, numbering, duplicate, move, delete), a
grouped slash menu with ranked search, Escape block selection, a selection
toolbar with turn-into and a link preview, and page typography.
Turn into ran clearNodes, which on a list or quote selected whole from its
handle converted only the first item, flattened nested lists, and left a
change that Undo couldn't reverse. It also fired for the type a block
already had and dropped the block's alignment.

The conversion now lifts each text block out of the lists and quotes
around it, then applies the new type across all of them, in a single
transaction. Switching between list types keeps the list and its nesting,
choosing the current type does nothing, and alignment carries over.
…ing blocks

- Enter or Down Arrow from the page title no longer selects an image or
  divider at the top of the body, where the next key replaced it; the caret
  goes above it. Up Arrow from there returns to the title.
- The title keeps main's Enter-to-save when the entry has no body, and
  ignores the Enter that commits a Safari IME composition.
- Select All selects just the code first only inside a code block;
  elsewhere it selects the whole document, as on main.
- A selected block can't be replaced by dictation, autocorrect, or an IME,
  and Escape closes an open editor menu before it selects a block.
- The gap cursor is visible on the dark theme.
…ected

- Edit link in a link's preview focuses the URL field; before, it stayed in
  the text and typing replaced the link. A link edit left open no longer
  carries over to the next selection.
- Removes the Cmd+K link shortcut, which belongs with the other shortcuts
  in a follow-up.
- Escape from the selection toolbar's Turn into and More formatting menus
  returns to the text instead of leaving focus on the trigger.
- The selection toolbar scrolls inside its own surface on narrow screens,
  so its buttons stay inside it and it stays on screen.
- The formatting toolbar no longer turns vertical wheel scrolling into
  sideways scrolling, which stopped the page from scrolling under it.
- The toolbar's heading menu offers headings 1 to 6 again, as on main.
- The slash menu's arrow keys follow the listed order when a plugin block
  shares a built-in category, and a code block alias that could never match
  is gone.
- Clicking below the last block moves the caret to the end without adding
  an empty paragraph.
- The block menu's alignment defaults to the text direction.
…ayouts

- The top bar switches its secondary buttons to icons by its own width,
  not the viewport's, so it stays on one row with the admin sidebar open
  at 768 to 1023px. Distraction-free mode's extra buttons go first. On
  touch screens each bar button's target spans the bar's height.
- The page's margin doubles as the block handle gutter instead of adding
  to the canvas padding, giving the column 48px back at mid widths.
- Block handles show on touch screens wide enough for the gutter.
- Other Portable Text fields keep main's prose typography, block
  selection styles apply to them too, and their toolbar sticks flush with
  the top of the editor canvas instead of half under it.
- The image and table toolbars use the same surface as the other editor
  menus, framed blocks are spaced evenly, the divider's handle is centered,
  and a selected code block's tint follows its corners.
…e test

The test ended while the refused publish was still settling. Its queued
save then ran against the next test's mock server with a stale token,
used up that test's held autosave, and failed it. Waiting for the conflict
banner asserts what the test describes and keeps the work inside it.
Only the page layout lacks room for block handles below 640px. The boxed
editors on other screens keep them at every width, as on main.
Ordered-list repairs could remap the selected list to a caret inside it
after Turn into, so the block menu's conversion dropped out of block
selection for nested lists. A block that stays whole is selected again.
…atting

- The bar's secondary buttons keep their labels down to 42rem of bar
  width, distraction-free mode's extras down to 60rem, and the
  breadcrumb shows from 44rem, so labels no longer vanish with room to
  spare at 1024px.
- Publish and Schedule get the full touch target too; Kumo's primary
  button clipped it.
- The selection toolbar's buttons scroll with the fixed toolbar's edge
  fade, so a narrow screen shows that more formatting is past the edge.
A boxed editor under 30rem drops to 1rem of side padding, where the
handles were cut off by the editor's frame, on main too. They now hide
there, as they do on the page below 640px.

The touch target's overflow also uncovered the 1px of the primary
button's shading that sits below it; clipping that layer keeps the button
looking the same.
Keyboard focus stopped 4px short of the end of a scrolled toolbar, so the
edge fade stayed over the focused button. Scroll padding matching the
toolbar's own padding lets it reach the end.
@changeset-bot

changeset-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 303dcd5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@emdash-cms/admin Minor
emdash Minor
@emdash-cms/cloudflare Minor
@emdash-cms/plugin-test Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/auth Minor
@emdash-cms/blocks Minor
create-emdash Minor
@emdash-cms/gutenberg-to-portable-text Minor
@emdash-cms/x402 Minor
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://noah-editor-ui-refinement-7307c4.try.emdashcms.com, https://noah-editor-ui-refinement-7307c4-emdash-playground.emdash-cms.workers.dev (commit 303dcd5)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f34c436a.try.emdashcms.com, https://f34c436a-emdash-playground.emdash-cms.workers.dev 303dcd5 2026-10-05T13:10:42.602Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://bd8a0246.try.emdashcms.com, https://bd8a0246-emdash-playground.emdash-cms.workers.dev 32087e8 2026-10-03T08:47:27.420Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://57fded5f.try.emdashcms.com, https://57fded5f-emdash-playground.emdash-cms.workers.dev d2c0c93 2026-10-02T15:13:31.607Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://303aa856.try.emdashcms.com, https://303aa856-emdash-playground.emdash-cms.workers.dev 9857374 2026-10-02T14:41:59.560Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f5fb2bf4.try.emdashcms.com, https://f5fb2bf4-emdash-playground.emdash-cms.workers.dev f70faf8 2026-10-02T14:31:23.314Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d38ad8c0.try.emdashcms.com, https://d38ad8c0-emdash-playground.emdash-cms.workers.dev 935e031 2026-10-02T13:35:23.497Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a252039a.try.emdashcms.com, https://a252039a-emdash-playground.emdash-cms.workers.dev b684f36 2026-10-02T13:20:22.737Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://79d0c756.try.emdashcms.com, https://79d0c756-emdash-playground.emdash-cms.workers.dev 8b41819 2026-10-02T13:05:24.428Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e82a04be.try.emdashcms.com, https://e82a04be-emdash-playground.emdash-cms.workers.dev 6cc3e99 2026-10-02T12:48:54.065Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3b33c36e.try.emdashcms.com, https://3b33c36e-emdash-playground.emdash-cms.workers.dev 9603e65 2026-10-02T11:31:07.904Z Visit the dashboard ↗

View all previews: View all previews ↗

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 5,294 lines across 29 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@3710

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@3710

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@3710

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@3710

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@3710

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@3710

emdash

npm i https://pkg.pr.new/emdash@3710

create-emdash

npm i https://pkg.pr.new/create-emdash@3710

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@3710

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@3710

@emdash-cms/plugin-test

npm i https://pkg.pr.new/@emdash-cms/plugin-test@3710

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@3710

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@3710

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@3710

@emdash-cms/registry-loader

npm i https://pkg.pr.new/@emdash-cms/registry-loader@3710

@emdash-cms/registry-moderation

npm i https://pkg.pr.new/@emdash-cms/registry-moderation@3710

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@3710

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@3710

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@3710

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@3710

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@3710

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@3710

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@3710

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@3710

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@3710

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@3710

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@3710

commit: 303dcd5

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Overlapping PRs

This PR modifies files that are also changed by other open PRs:

This may cause merge conflicts or duplicated work. A maintainer will coordinate.

Select All only scoped itself to code blocks, so in a paragraph, heading,
list item, quote, or table cell it selected the whole document. The first
press now selects the text of the block holding the caret, and the second
press selects the document.
github-actions Bot pushed a commit that referenced this pull request Oct 1, 2026
…everywhere

Quotes and list items could hold blocks that Portable Text can't store
for them, which were dropped on save: Turn into, the toolbar's Quote
button, and /quote wrapped headings, code, and media in a quote, and
inserts, input rules, paste, and drag and drop nested blocks in lists
and quotes. The schema now limits quotes to paragraphs and list items
to text with nested lists, so that content lands beside them instead.

- The toolbar's block buttons, the heading menu, and the slash menu
  convert through Turn into, so every surface gives the same result,
  joins a new list with a list of the same type beside it, and turns a
  heading or code block into quoted text. They're disabled where they
  can't apply, and Turn into also offers mixed selections.
- Images, embeds, HTML, dividers, and tables go after a selected block
  instead of replacing it, and after the list or quote holding the
  caret. Paste goes after a selected block, and typing can't replace a
  selected image, divider, or embed.
- Alignment is offered only where it's saved, not in lists or quotes.
- Links: a bare domain gets https://, a link the editor won't apply
  keeps its field open, image links reject unsafe URLs, editing a link
  from the toolbar leaves the caret after it, and typing at the start
  of a block that opens with a link doesn't extend the link.
- Subscript and superscript exclude each other.
- The toolbar uses the menus' names (Bulleted list, Code block, Inline
  code, Add link), and its hover and pressed states show on the boxed
  editor's toolbar band too, with 44px buttons on touch screens.
A one- or two-letter slash query also matched letters inside titles and
descriptions, so /t listed every command and /di listed every heading.
Short queries now match title, word, and alias starts and initials
(/bl still finds Bulleted list); substring, description, and loose
matches need three letters.
- A selected image, HTML block, embed, or gallery gets a brand-coloured
  edge as well as the tint, which was nearly invisible on media. A
  selected divider's tint is no longer clipped.
- Tables and node views follow the page's block spacing: a table before
  a heading gets the heading's space, and a code block or embed opening
  the page starts as close to the toolbar as text does.
- Code blocks get a faint edge on the light page, and read left to right
  in right-to-left documents.
- Block handles mirror in right-to-left text, centre on a code block's
  first line and a table's first row, and use stronger icons. On touch
  screens the grip has a 44px target and the toolbar's + replaces the
  gutter's. HTML and embed blocks drop their second, legacy drag grip.
- Tab from the block menu, Turn into, or More formatting closes the menu
  back into the editor, and Escape in an HTML block's source selects the
  block. In a linked table cell, the link preview shows instead of the
  table toolbar it used to cover.
- The link editor fits a phone screen, and the image toolbar's buttons
  share one radius and pressed style.
- The featured image card switches to its compact layout by its own
  width, so its actions no longer clip at tablet and laptop widths.
…nd on insert

- A list nested in a list of the other type reports its own type, so
  Turn into, the toolbar, and the slash menu switch just that list, and
  the toolbar no longer shows both list buttons pressed. Turning a list
  off moves the item up one level, as TipTap's toggles did.
- Inserting a block from an empty list item or quote line turns that
  line into the block instead of leaving it behind, where it was saved
  as an empty bullet or quote line. Typing --- in one does the same.
- A block inserted with the caret in a heading, code block, or other
  text goes after it instead of splitting it, and is scrolled into view.
- A new numbered list doesn't join a following list that starts at its
  own number.
- TipTap's block shortcuts (Mod+Shift+7/8/B, Mod+Alt+1-6/C) convert the
  way the toolbar does; Mod+Shift+B in a list item had fallen through to
  bold. Alignment buttons show no pressed state where they're disabled.
A link the editor refuses, such as javascript:, kept its field open
with no explanation. The selection toolbar, the image toolbar, and the
fixed toolbar's link fields now mark the field invalid and say the link
can't be used, until it's edited. localhost:3000 and example.com:8080
were read as URL schemes and refused; they get https:// like other bare
hosts.
- Opening Turn into while More formatting is open, or the reverse, now
  takes one click; the closing menu reset the opening one.
- Selected links, inline code, and highlighted code keep their colours.
- A selected HTML block or embed has one frame, the editor's, instead
  of its own brand border inside it.
- The image toolbar clears the selected image's frame.
- Remove link looks the same in the link editor and the link preview.
- The featured image card wraps its actions when long labels don't fit
  on one line, instead of hiding them in a hidden scroller.
- The toolbar's table control is 44px wide on touch screens, like the
  other buttons.
- A divider added from the last line of a list or quote at the end of
  the document left an extra empty paragraph and the caret between
  blocks; TipTap's command misplaces it there. Dividers from the slash
  menu and from --- in a list or quote now replace the empty line and
  put the caret in the text after them.
- Toggling a list's type off with the whole list selected did nothing,
  because there's no single item to lift; it now turns the list back
  into text.
- tel:5551234 and sms:12345 were read as host:port and given https://.
  Only localhost and dotted hosts with a port get it now.
@github-actions github-actions Bot removed the review/needs-rereview New commits since the last review label Oct 2, 2026
The test slept 300 ms and checked the toolbar was absent, which a slow
runner could pass even if the toolbar came back after its 120 ms update
delay. Show it first, then wait for it to go.
The click handler skips every place ProseMirror would put a gap cursor,
which includes the start of a document that opens with an embed, not
only the space between two embeds.
The click calls TipTap's focus command, which on Chromium moves focus
in the next animation frame, so checking it right after the click
depended on a frame having already passed.
@github-actions github-actions Bot added review/needs-rereview New commits since the last review and removed review/awaiting-author Reviewed; waiting on the author to respond labels Oct 3, 2026

@danielmlr danielmlr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Noah. I ran the latest commit (32087e8) on a local site alongside main and clicked through it at 1440, 1024 and 390 px, in light, dark and Arabic. A lot of it works well: Turn into is a single undo step, selecting a block with Escape and moving around with the arrow keys feels natural, the slash menu finds the right command quickly, right-to-left works throughout, existing content saves back unchanged, and typing in a 361-block document is as fast as on main.

Three things can change saved content or publishing state without the user meaning to, and two more are worth a look. I think all five are worth fixing before merge (details inline):

  1. Clicking + on a published entry creates a draft.
  2. Relative links such as ../about.html or ./guide.pdf are saved with https:// in front.
  3. Pasting a quote that contains a heading leaves an empty quote behind, and the quoted paragraphs lose their quote formatting. A heading inside a list item leaves an empty bullet.
  4. At 390 px the entry title disappears from the bar when the button says "Unpublish" or "Publish changes".
  5. The page layout only applies to a Portable Text field named content, so sites that use body, our e2e fixture among them, don't get it.

It'd be good to document the keyboard changes, so editors know how to control the editor: Enter and the arrow keys between the title and the body, Escape to select a block and the arrow keys to move between blocks, Select All taking the current block first, Alt-click on +, and the block menu. The changeset covers them for people upgrading, but the "Write rich text" section of the user guide (docs/src/content/docs/guides/working-with-content.mdx) doesn't mention them yet. A short paragraph or a small table of keys there would do.

Not blocking:

  • Turning a paragraph into a list right below another list can leave the wrong block selected (inline).
  • A few renamed labels will lose their existing translations (inline).
  • Was it intentional to drop Headings 4 to 6 from the block menu's Turn into? Main listed them; now they only show when the block already is one.
  • #3827 changes the same parts of PortableTextEditor.tsx, so it might be worth agreeing which one goes first.

Lint, typecheck and 45 admin test files (1,080 tests) pass locally; I didn't run the e2e suite.

// the previous locale's body in the editor and silently overwrites
// the new translation on the next edit.
const fieldKey = `${name}:${item?.id ?? "new"}`;
const isDocumentBody = field.kind === "portableText" && name === "content";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a Portable Text field named content gets the page layout. A collection whose body field is called body, like our e2e fixture's posts and pages, gets the new bar with the old boxed editor, and Enter in the title saves instead of moving into the body. Nothing tells the user why it behaves differently. Since the fixture uses body, the e2e tests and the new visual baselines never show the new layout. Would a collection setting, or the first Portable Text field after the title, work better?

~ 🤖 Claude Code (Opus 5.5)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping content for this PR: it's main's existing rule for the document outline, and choosing another field would change the layout on existing sites without them opting in. A collection setting for the page field would make a good follow-up.

The + button types a slash line to open the slash menu, and the editor
reported that line as an edit right away, so a 2-second autosave saved
it while the menu was open, turning a published entry into a draft.
Changes now wait until the menu closes.

When + typed into an empty line that was already there, the slash's
undo step was left behind after the menu closed, so the first Undo did
nothing. That slash now stays out of the undo history, as its removal
already did.
A link such as ../about.html, ./guide.pdf, or docs/guide.pdf looked like
a bare domain, so it was saved with https:// in front. Paths starting
with ./ or ../, or with a slash before the first dot, now stay as typed.
Pasting a quote holding a heading left an empty quote behind, and the
quoted paragraphs after the heading lost their quote. A heading in a
list item left an empty bullet, and a numbered list continued after it
as a bulleted one. The pasted HTML is now split around such blocks
first, so the block lands between the two halves, and a numbered list
keeps counting.

The existing paste test now pastes into an empty line: pasted content
that starts with a heading merges into a line that has text, as any
ProseMirror paste does.
Turning a selected block into a list beside a list of the same type
joins the two, which moves the block, but Turn into reselected the
block's old position. That selected the paragraph inside the joined
list, so typing replaced its text. The joined list is now selected.
Paragraph, Bullet List, Numbered List, Code Block, and Inline Code were
renamed to Text, Bulleted list, Numbered list, Code block, and Inline
code, which are new strings for translators, so about 30 locales showed
them in English. The existing labels and their translations are back.
The slash menu still finds /text and /bulleted.
Closing the + menu with Escape, Tab, or a click elsewhere left the new
empty line in the document, which is still an edit, so autosave turned
a published entry into a draft. The line now goes again, and when it is
still the last change, its undo step goes with it, so the next Undo
undoes the edit before it. A picker command that removes the line, and
a command run in an empty line that was already there, no longer leave
an undo step that does nothing either.

This replaces keeping a reused line's slash out of the undo history,
which left a slash that Undo couldn't remove when a query was kept.
In a narrow bar, as on a phone, Publish now, Publish changes, and
Unpublish with the collection name kept their full labels and squeezed
the entry title down to a few letters. There, both publish labels read
Publish, and Unpublish shows only its icon like the bar's other
secondary buttons; all keep their full names for screen readers.

@ascorbic ascorbic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good

@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-rereview New commits since the last review labels Oct 5, 2026

@danielmlr danielmlr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Noah, this looks great!
Everything I raised is fixed, and keeping content as the page field makes sense.
A short note on the new keys in the user guide would be nice later on.

@khoinguyenpham04
khoinguyenpham04 merged commit 06a9146 into main Oct 5, 2026
69 of 75 checks passed
@khoinguyenpham04
khoinguyenpham04 deleted the noah/editor-ui-refinement-7307c4 branch October 5, 2026 13:56
khoinguyenpham04 added a commit that referenced this pull request Oct 5, 2026
…m-uploads-8f5d39

Brings in the page layout for the content editor (#3710). Its slash
command list now builds each built-in top-level block from a
module-scope command wrapped by topLevelInsert, so Video follows that
pattern: a videoSlashCommand in Media, added after Gallery so the
category stays together for the arrow keys, and left out when a plugin
defines its own video block.
@ascorbic ascorbic mentioned this pull request Oct 6, 2026
8 of 19 tasks
MA2153 added a commit that referenced this pull request Oct 12, 2026
The empty-blockquote placeholder test from #3690 expected the document
placeholder, but #3710 had already made an empty quote paragraph show
"Quote". Both merged cleanly, and the test has failed Browser Tests on
main since. Expect "Quote", which still proves that the blockquote
p::before rule does not hide the placeholder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants