fix(admin): refine sidebar, loading, and editor UI#2127
fix(admin): refine sidebar, loading, and editor UI#2127khoinguyenpham04 wants to merge 13 commits into
Conversation
🦋 Changeset detectedLatest commit: 6600b60 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 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 |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 6600b60 | Jul 19 2026, 02:46 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 6600b60 | Jul 19 2026, 02:46 PM |
Scope checkThis PR changes 767 lines across 27 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. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 6600b60 | Jul 19 2026, 02:45 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@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-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Approach judgment
This PR is a focused UI refinement: it moves the desktop sidebar collapse trigger to the footer, tightens editor heading/field spacing, gives the loader a theme-aware, centered hand-off between Astro and React, and keeps the Portable Text writing surface visually distinct. The changes stay inside the admin package (plus one small Astro boot shell change in emdash), don't touch APIs/auth/database, and are consistent with the existing Kumo + Lingui architecture. The approach is sound.
What I checked
- Read the full diff and the changed component files (
ContentEditor,ContentSettingsPanel,Sidebar,Header,PortableTextEditor,ImageFieldRenderer,FieldHelpLabel,Shell,ThemeProvider,admin.astro, plus new/updated tests). - Verified Lingui wrapping for all new user-visible strings (
Loading configuration…,Publish ${label},Unpublish ${label}, etc.), RTL-safe Tailwind (me-auto,ps-2.5,rtl:rotate-180transforms), and logical padding/margin usage. - Confirmed the Astro boot script and
ThemeProvideruse the sameemdash-themelocalStorage key and the samedata-moderesolution logic, so the no-flash boot hand-off works. - Cross-checked changed test expectations against the code, and traced the new
data-emdash-inline-bubble-menuselector back to theBubbleMenucomponent.
Headline conclusion
The code is close to clean, but I found two small issues where the new tests and the implementation have drifted:
- The Portable Text field label now renders a bare
<Label>while the new test expects the sametext-base font-mediumstyling applied to the image field label. - One new test uses
toHaveLengthon aSet, which will fail becauseSethas.size, not.length.
Both are easy fixes. I did not run the test suite or linter, so I report these as statically-identified discrepancies rather than confirmed CI failures.
There was a problem hiding this comment.
Re-review: approach and headline
This PR is still a focused, well-scoped UI refinement: it moves the desktop sidebar collapse control into the footer, aligns editor surfaces, headings, and spacing, makes publishing actions consistent with the collection label, and prevents boot-time theme flashing by syncing the Astro boot script with the React ThemeProvider. All changes stay inside the admin package (plus the Astro shell), with no API/auth/database/content-model work. The approach remains sound and fits the Kumo + Lingui architecture.
What I checked
- Re-read the full diff and the current versions of the changed component files (
ContentEditor,ContentSettingsPanel,FieldHelpLabel,ImageFieldRenderer,Header,PortableTextEditor,Shell,Sidebar,router, styles, and updated tests). - Verified the two issues flagged in the previous review are still present in the PR head.
- Spot-checked RTL-safe Tailwind (
me-auto,ps-2.5,rtl:rotate-180, logical padding/margins) and Lingui wrapping for new strings (Publish ${label},Unpublish ${label},Loading configuration…). - Confirmed the Astro boot script and
ThemeProviderstill agree on theemdash-themekey anddata-moderesolution, so the no-flash hand-off remains intact. - Reviewed the new/updated test expectations against the implementation; most align, but two still do not.
Headline conclusion
The code is close to clean, but the two statically-identified discrepancies from the prior review are still unresolved. Both will cause test failures rather than production bugs, but they block a green test run:
- The Portable Text field label uses a bare
<Label>while the new test asserts the sametext-base font-mediumstyling applied to the featured-image label. - One new test still calls
.toHaveLengthon aSet, whichSetdoes not have.
Both are small fixes.
(As before, I did not run the test suite or linter, so I report these as static discrepancies, not confirmed CI failures.)
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 6600b60 | Jul 19 2026, 02:45 PM |
What does this PR do?
Polishes admin navigation, startup, and content editing:
No API, authentication, authorization, database, storage, or content-model changes.
Closes: N/A
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs; catalogs are extracted after merge.AI-generated code disclosure
Screenshots / test output
Use the playground preview and these admin routes:
/_emdash/admin/_emdash/admin/content/posts/post-1Unpublish PostandPublish updates; narrow settings sheet; distraction-free mode/_emdash/admin/content/posts/post-draftPublish PostactionTested with
pnpm typecheck,pnpm lint,pnpm format:check, 179 targeted admin tests, 7 boot-theme tests, and E2E shard 2/8 (26 tests).Try this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
ui/admin-refinement. Updated automatically when the playground redeploys.