Skip to content

feat(admin): bring the editor sidebar to Quick Edit (NEWS-3646) - #347

Merged
thomasguillot merged 23 commits into
trunkfrom
feat/news-3646-quick-edit-sidebar
Nov 28, 2026
Merged

thomasguillot merged 23 commits into
trunkfrom
feat/news-3646-quick-edit-sidebar

Conversation

@thomasguillot

@thomasguillot thomasguillot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

NEWS-3646 asks to bring back the editor sidebar from #164 in Quick Edit, so an entry can be fixed and published without leaving the list. This replaces the compact layout from #183 for entries. The Summary keeps that compact layout on purpose.

What changes

Quick Edit on an entry now opens a full-screen editor with the sidebar, using the editor's own header controls.

With this change:

  • The sidebar has Entry and Block tabs. Block settings no longer open in a popover.
  • The Entry tab has the actions menu (the three dots), Status, Publish date, Authors (Co-Authors Plus or the core Author field), Push Notifications, and Categories and Tags.
  • Add Entry uses the same layout.
  • Save and Publish keep Quick Edit open, as in the post editor. The close button (×) closes it, and asks before discarding unsaved changes.
  • Cmd+S or Ctrl+S saves too. It saves with the status set in the Status row, so a draft stays a draft unless you change it there.
  • Clicking an entry's title opens Quick Edit. Quick Edit moves into the row's actions menu, so it is no longer a button on each row.
  • Quick Edit opens in about a second, down from about four on a site with real content.
  • The sidebar is white, and the title sits where it does in the post editor, with the theme's spacing below it.
  • On phones, Quick Edit fills the screen height and the sidebar opens over the editor.
  • Focus returns to the list after it reloads.
  • On block themes, the editor follows the theme's content width.
  • The Summary keeps its compact layout. Its title gets the same spacing as entries.

Closes NEWS-3646.

Screenshots

Classic theme

State Before After
Published entry Before: Quick Edit on a published entry, a compact modal with Cancel and Save After: Quick Edit on a published entry, full-screen editor with the Entry tab open in the sidebar
Block selected (before: gear popover, after: Block tab) Before: block settings in a gear popover over the editor After: block settings in the Block tab of the sidebar
Draft Before: Quick Edit on a draft entry, a compact modal After: Quick Edit on a draft entry with Status, Publish date, Push Notifications and Authors in the sidebar
Add Entry Before: Add Entry in the compact modal with Save Draft and Publish After: Add Entry in the full-screen editor with the sidebar
Summary (keeps the compact layout) Before: Summary Quick Edit with the title near the top of the canvas After: Summary Quick Edit with the title lower, matching the post editor
Phone Before: Quick Edit at phone width, a modal that leaves part of the page showing After: Quick Edit at phone width filling the screen
Phone, sidebar open N/A After: the sidebar open over the editor at phone width

Block theme

State Before After
Published entry Before: Quick Edit on a published entry, a compact modal with Cancel and Save After: the full-screen editor with the Entry tab open, the title and text on the theme's content width
Block selected (before: gear popover, after: Block tab) Before: block settings in a gear popover After: block settings in the Block tab of the sidebar
Draft Before: Quick Edit on a draft entry, a compact modal After: Quick Edit on a draft entry with Status, Publish date and Author in the sidebar
Add Entry Before: Add Entry in the compact modal After: Add Entry in the full-screen editor with the sidebar
Summary (keeps the compact layout) Before: Summary Quick Edit with the title against the top and offset from the text After: Summary Quick Edit with the title aligned with the text and the theme's space below it
Phone Before: Quick Edit at phone width, a sheet over the page After: Quick Edit at phone width filling the screen
Phone, sidebar open N/A After: the sidebar open over the editor at phone width

How to test

  1. Select a published entry's title. Quick Edit opens. Change the text and select Save. The change saves and Quick Edit stays open. Select ×. Quick Edit closes and the list shows the change.
  2. Open Quick Edit again and select a block. The Block tab opens with that block's settings. Select the Entry tab. The entry settings show again.
  3. Open a row's actions menu (the three dots). Quick Edit is the first item. Choose it on a draft and select Publish. The entry publishes and Quick Edit stays open.
  4. Make a change and select × without saving. A dialog asks whether to discard the changes. Select Cancel to keep editing, or Discard Changes to close.
  5. Open a draft, make a change, and press Cmd+S (Ctrl+S on Windows or Linux). The change saves, Quick Edit stays open, and the entry is still a draft.
  6. In the Entry tab, change Status and Publish date. Save. The list shows the new status and date.
  7. With Co-Authors Plus active, open Authors, add or remove an author, and save. The list shows the new authors. Without the plugin, the core Author field appears.
  8. On a draft, check the Push Notifications box. The Notify subscribers checkbox shows, with a notice when the liveblog has no canonical URL.
  9. Open the Categories panel in the Entry tab, tick a category, then add a tag in the Tags panel. Save, close Quick Edit and open it again. The category and tag are still set.
  10. Open the three dots menu in the Entry tab. Choose an action while there are unsaved changes. A "Save your changes first" message shows. Save, then choose the action again. It runs.
  11. Select Add Entry. The full-screen editor opens with the sidebar. Close it before saving. No empty entry appears in the list.
  12. Select Add Entry, write a title and text, and publish. The entry appears in the list.
  13. Select Add Summary. The compact layout still shows.
  14. Narrow the browser to phone width and open Quick Edit. It fills the screen. Open the sidebar with the panel button. It opens over the editor.
  15. On a block theme, open Quick Edit. The text width matches the theme's content width.
Technical details
  • Two layouts: QuickEditEditorLayout for entries and QuickEditCommentLayout for the Summary. The shared shell stays in quick-edit-modal.tsx.
  • The header is built from PostSavedState and PostPublishButton inside the EditorProvider sub-registry. Entries locked by archiving get a plain Save button as a fallback.
  • Reassign is left out of the actions menu. Its drawer opens behind the modal.
  • Categories and Tags are core's PostTaxonomiesPanel. They always start collapsed. A collapsed panel fetches no terms, so they add nothing to opening Quick Edit. The taxonomy list they need is preloaded with the rest of the editor data.
  • Header order: sidebar toggle, saved state, Save or Publish, then ×.
  • Opening speed: the editor waited on separate requests for the entry type and the active theme. Admin::preload_editor_data() now preloads them the way edit-form-blocks.php does for the post editor, and the create route returns the new draft so Add Entry skips a second request. One preloading middleware is registered once and serves each new entry. Measured cold opens: 4.1 s to about 1.0 s for an existing entry, 4.6 s to about 1.0 s for Add Entry.
  • The title wrapper matches the post editor's: both of core's classes, its 4rem top margin, and the theme's content width. The block theme styles the gap below the title on the legacy class only; fix(block-theme): target the current editor title wrapper class newspack-workspace#1705 moves it to the current one.
  • Cmd+S is registered by the layout. WordPress 7.1's EditorProvider handles core/editor/save but does not register the shortcut.
  • supportsLayout returns wp_theme_has_theme_json(), so only block themes get the theme's content width.
  • The Co-Authors Plus panel script is enqueued on the entries screen so the Authors panel can render.
  • After the list reloads, DataViews leaves it inert. Focus is restored once that clears.
  • Docs updated: src/admin/DEVELOPMENT.md, the coverage-follow README and DEVELOPMENT, the docs site add-entries and push-notifications pages, and a retaken Add Entry screenshot.
  • Checks run: ESLint, tsc, Stylelint, Jest (219 tests), PHPUnit (1558 tests), PHPCS.
  • Self-review: 6 rounds (Opus 5.5), 2 blockers fixed.

thomasguillot and others added 10 commits November 26, 2026 15:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thomasguillot

Copy link
Copy Markdown
Contributor Author

Self-review summary: three rounds on this branch before handoff.

Accepted:

  • 7edc0dc: Hardened Quick Edit's save and close paths. The plain Save (archived entries, or when another entity has edits) now saves those other edits with the entry, and waits while saving is locked. A save stopped by an editor.preSavePost filter or an editor.savePost action now keeps Quick Edit open with the error instead of reading as a success. Text typed while a closing save runs now keeps Quick Edit open instead of being dropped. The docs now say Cmd+S saves a Published status picked in the Status row, as the post editor does, and that a contributor gets no Publish row.
  • 0b07389: The Authors panel now checks that the user can set authors on entries specifically, as Co-Authors Plus does.
  • f485e44: The unsaved-changes dialog now matches the one in Access Control: no title bar or close button, "You have unsaved changes that will be lost. Discard changes?", Cancel and Discard Changes, with Cancel focused. It applies to both layouts.
  • 953e63b: The plain Save no longer saves edits on other entries. The page shares one undo history, so those edits could come from an Undo rather than from anything typed in this Quick Edit.
  • Round 3: no changes; confirmed the above holds.
Deferred (not blocking)
  • Dropped: the plain Save doesn't wait on the other entities' saves, so a failed one is silent. It needs a site-level block in an entry and a failed second request, and the edits stay unsaved rather than lost.
  • Dropped: after a failed request, a later save stopped by a filter can show the earlier error message. The save still reads as failed.
  • Dropped: discarding after a failed save leaves the editor's error notice on the list. Rare, and the message is accurate.
  • Dropped: the plain Save stays enabled when an Undo has reached another entry, and then re-saves an unchanged entry. I couldn't reproduce Undo reaching another entry, and nothing is written to it.

thomasguillot and others added 8 commits November 26, 2026 17:33
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thomasguillot

Copy link
Copy Markdown
Contributor Author

Self-review summary: three more rounds since the last summary, covering the speed, title click, header and spacing changes.

Accepted:

  • 8f24ec4: Adding an entry registered another preloading middleware each time, and the api-fetch WordPress loads can't remove one, so the chain grew for as long as the page stayed open. One middleware is now registered once, and each new entry replaces what it serves.
  • 93b3f70: The title-click comment now matches the code: the title opens Quick Edit on rows the user can edit that aren't trashed.
  • Round 5: no changes; confirmed the above holds, along with the white sidebar (c953fe0) and Quick Edit moving into the row menu (93b3f70).
  • Round 6: no changes; confirmed the Quick Edit title now matches the post editor. Its wrapper carries core's legacy class, so the Newspack Block Theme's gap below the title applies (5c70fdc), and it has core's 4rem top margin without is-layout-constrained (8beea92).

Declined:

  • Rewording the DEVELOPMENT.md sentence on the row menu. It already opens with the cause, that no entry action is primary.
  • Naming a WordPress version in the preload docblock. A version number would go stale.
Deferred (not blocking)
  • The title wrapper lacks core's contentEditable={false}. It predates these changes, and its effect, a selection across blocks reaching into the title, is inferred rather than reproduced.
  • A comment saying why the wrapper carries the legacy class. The pair is core's own markup, and the commit message records why.

@thomasguillot
thomasguillot marked this pull request as ready for review November 26, 2026 21:42
@thomasguillot

Copy link
Copy Markdown
Contributor Author

Hey @leogermani, this brings the editor sidebar back into Quick Edit as you asked in NEWS-3646. Could you check it matches what you had in mind?

The parts I'd most like your eye on:

  • Save and Publish keep Quick Edit open, as in the post editor, and × closes it (with a prompt if there are unsaved changes).
  • Clicking an entry's title opens Quick Edit. Quick Edit is also the first item in the row's ⋯ menu, next to Edit for the full editor.
  • The Summary keeps the compact layout.

@leogermani leogermani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving with questions:

It works as described. CoAuthors Plus selector also shows up.

Categories and Tags don't show up. I guess it's on purpose?

Looking at the code, it seems that we are recreating some panels and not simply loading the core panels, is that right? At least for the Status row and actions menu..

I guess that can be a good trade off, to keep it slim and really "quick"

Let's try it

thomasguillot and others added 3 commits November 28, 2026 12:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thomasguillot

Copy link
Copy Markdown
Contributor Author

Self-review summary: three more rounds since the last summary, covering Categories and Tags in Quick Edit.

Accepted:

  • 28281df: The Categories and Tags panels sit inside the same error boundary as the plugin panels, since other plugins can filter them, so a filter that throws drops the panels instead of closing Quick Edit. A category or tag created in Reassign now shows in Quick Edit's panels without a reload.
  • 2766861: DEVELOPMENT.md now says the panels always start collapsed. Quick Edit's preferences are kept in memory, so they don't follow the post editor's.
  • Round 9: read 2766861 without the engine (docs only). It makes the two doc corrections and nothing else.

Declined:

  • Preloading /wp/v2/taxonomies?context=view as well. The page only requests it once a panel is opened, so preloading it would add a query to every list load.

@thomasguillot

Copy link
Copy Markdown
Contributor Author

Thanks @leogermani.

I've added Categories and Tags. Core's Categories and Tags panels now sit in the Entry tab, below Authors. They start collapsed and only load terms once opened, so Quick Edit still opens in about a second. Reassign still edits them from the list, for one entry or several.

On the panels, partly. Publish, Author, Categories, Tags and the Co-Authors Plus panel are all core's. Two parts are our own because core doesn't export them:

  • The Status row is a trimmed copy of PostStatus: Draft, Pending, Private and Published, with no password or sticky.
  • The ⋮ menu reuses the list's own row actions, since PostActions is private.

Agreed on the trade-off. It keeps Quick Edit slim.

@thomasguillot
thomasguillot merged commit d8a357c into trunk Nov 28, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Hey @thomasguillot, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

@tiffehr

tiffehr commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

@thomasguillot & @leogermani Thank you both for the speed and functionality improvements here! This looks pretty good and I'm glad the right sidebar's panels are not the full set (but have room to expand).

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