Repository navigation
fix(admin): remove sticky editor header - #955
Conversation
The sticky save header had multiple compounding problems: - Backdrop-blur transparency let scrolled content show through, looking visually broken when columns scrolled at different rates - Fragile negative-margin trick (-mx-6 -mt-6) had to perfectly cancel parent padding; broke when ancestors changed - z-index conflicts with the app bar header above - ~85px of permanent vertical chrome on every editor page The save action is already reachable via the form's bottom Save button and the standard Cmd+S keyboard shortcut, so the sticky variant wasn't earning its cost. Drop it across ContentEditor, ContentTypeEditor, SectionEditor, and the settings sub-pages. Preserve the distraction-free mode hover-revealed overlay in ContentEditor (different use case: keep chrome out of the way while writing). Drops the EditorHeader `sticky` prop entirely. Updates the test to remove the now-irrelevant sticky-class assertions.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 92b069c | May 08 2026, 04:15 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 92b069c | May 08 2026, 04:14 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 92b069c | May 08 2026, 04:15 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | 92b069c | May 08 2026, 04:13 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | 92b069c | May 08 2026, 04:14 PM |
🦋 Changeset detectedLatest commit: 92b069c The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Pull request overview
This PR removes the “sticky” editor header pattern across the admin editor surfaces by making EditorHeader render as a normal (non-sticky) block and stripping sticky/backdrop styling from the content editor’s header (while keeping the distraction-free hover overlay behavior).
Changes:
- Remove the
stickyprop and all sticky/backdrop/negative-margin styling fromEditorHeader. - Make
ContentEditor’s normal-mode header non-sticky (distraction-free overlay remains). - Update
EditorHeadertests to drop sticky-class assertions and add a changeset documenting the behavior change.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/admin/tests/components/EditorHeader.test.tsx | Removes assertions tied to sticky header behavior that no longer exists. |
| packages/admin/src/components/EditorHeader.tsx | Drops sticky prop and sticky/backdrop styling; updates component-level documentation accordingly. |
| packages/admin/src/components/ContentEditor.tsx | Removes sticky/backdrop classes from the content editor header in normal mode; keeps distraction-free overlay header. |
| .changeset/sixty-wombats-itch.md | Adds a patch changeset describing the removal of sticky editor headers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address PR review feedback (#955): the previous commit claimed save was 'always reachable via in-form Save button + Cmd+S' but neither was true for ContentEditor or SectionEditor (header was the only Save button, no Cmd+S handler exists). - ContentEditor: add a bottom-of-form SaveButton (mirrors the header state, last interactive control in DOM order) - SectionEditor: add a bottom-of-form SaveButton (after the content editor, before the sidebar) - Update doc comments and changeset to describe what's actually true (bottom save button per editor; no Cmd+S claim) - Update ContentEditor.test.tsx queries to use .first() since there are now two Save buttons matching the same role/name (both submit the same form, so either works for the assertion)
The previous commit put the Save button at the absolute bottom of the form -- after both the main editing column AND the entire sidebar (Publish/Status/Taxonomies/SEO/Outline/Revisions). Visual testing showed users had to scroll past the whole sidebar to reach it; way too hidden to be discoverable. Move the bottom SaveButton inside the main column (lg:col-span-2 in ContentEditor, col-span-8 in SectionEditor) so it appears right after the body field, where users naturally land when they finish editing. SectionEditor was already correct -- just the ContentEditor placement was wrong.
…e two
Editor pages now render two SaveButtons (one in the header, one at the
bottom of the main column). Both submit the same form, so playwright's
strict-mode click can target either, but the unscoped queries
('button:has-text("Save")', 'getByRole("button", { name: "Save" })')
match both elements and fail.
- e2e/fixtures/admin.ts: clickSave() and waitForSaveComplete() now use
.first() on the Save / Saved button locators.
- e2e/tests/form-data-loss.spec.ts: 3 inline Save queries updated to
.first().
Other E2E save references are either dialog-scoped (redirects), text
'Save Changes' instead of 'Save' (content-types), or on bylines panel
which has only one save button -- those are unaffected.
What does this PR do?
Removes the sticky editor header from
ContentEditor,ContentTypeEditor,SectionEditor, and the settings sub-pages. The sticky implementation had multiple compounding problems:bg-kumo-base/95 supports-[backdrop-filter]:bg-kumo-base/80 backdrop-blurlet scrolled content show through. Looked particularly bad when columns scrolled at different rates (e.g. ContentTypeEditor's settings column scrolling while the fields column appeared static behind the blurred header).-mx-6 -mt-6trick canceling parent padding to make the header span edge-to-edge broke whenever an ancestor's padding changed.z-10, sticky hadz-30, but the surrounding scroll context made it inconsistent).The save action remains reachable via the form's bottom Save button (rendered after all fields, the natural keyboard tab order target) and the standard Cmd+S shortcut, so the sticky behavior wasn't earning its visual cost.
Changes
EditorHeader.tsx: drops thestickyprop entirely. Renders as a normal block. Component API still acceptsleading/actions/children.ContentEditor.tsx: removes the inline sticky/backdrop classes from its custom header. Preserves the distraction-free mode hover-revealed overlay — different use case (keeping chrome out of the way while writing rich text).EditorHeader.test.tsx: drops the two assertions about sticky classes; the rest of the test file (rendering, leading slot, actions slot, no-actions case) is unchanged.Visual verification
Captured before/after screenshots:
Tests: 859/859 passing.
Closes #
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (admin: 859/859)pnpm formathas been runsticky/top-0classes was deliberately removed since the behavior is gone)AI-generated code disclosure