Skip to content

fix(admin): give list and card surfaces an explicit background - #958

Merged
ascorbic merged 2 commits into
mainfrom
fix/admin-panel-surfaces
May 8, 2026
Merged

ascorbic merged 2 commits into
mainfrom
fix/admin-panel-surfaces

Conversation

@ascorbic

@ascorbic ascorbic commented May 8, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Card containers across the admin used rounded-md/lg border without any bg-* class. The body's --color-kumo-elevated (#f0f0f1) showed straight through, so cards visually merged with the page background and any internal section strips (bg-kumo-tint/30 etc.) read as accidental shading rather than as headers.

This affected the posts/pages list, content types list, content type editor (Settings + Fields cards), media library list view, comments inbox & detail, users list & detail, and the device authorization page.

Changes:

  • Add bg-kumo-base to every list/info card surface.
  • In ContentTypeEditor, the SYSTEM FIELDS wrapper had bg-kumo-tint/30 on the whole section, which tinted the system field rows themselves. Move the tint to the header strip only and apply the same treatment to the CUSTOM FIELDS strip so they read as symmetric section headers (header tinted, rows not).
  • Fix SortableTh referencing a non-existent text-kumo-fg class, which silently rendered inactive sortable column labels in text-kumo-subtle (pale grey -- #787c82). The labels are now always text-kumo-default and the caret icon (CaretUpDown -> CaretUp/CaretDown) signals active sort state.

Closes #

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 (warning count unchanged from main baseline -- 28 pre-existing)
  • pnpm test passes (admin: 861/861)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable) -- visual changes verified manually; existing tests cover the components' behavior
  • User-visible strings in the admin UI are wrapped for translation -- no string changes
  • I have added a changeset
  • New features link to an approved Discussion -- n/a, bug fix

AI-generated code disclosure

  • This PR includes AI-generated code -- model/tool: Claude Opus 4.7 (OpenCode)

Screenshots / test output

Before -- the table card has no surface; rows blend into the page bg:

Posts list: header strip subtle, rows transparent on grey body
Content types list: same; "card" reads as a single bar
Content type editor: SYSTEM FIELDS rows tinted, CUSTOM FIELDS rows not (asymmetric); both Settings and Fields cards transparent

After -- white card surface, symmetric section headers, readable column labels:

Posts list: white card, dark Title/Status/Date headers, dark sort caret on active column
Content types list: clearly framed white card with rows on it
Content type editor: Settings (left) and Fields (right) on white surfaces; SYSTEM/CUSTOM strip headers both tinted, rows uniform white

Card containers across the admin (content lists, content type editor,
media library, comments, users, device auth) used `rounded-md/lg border`
without any `bg-*` class. The body's `--color-kumo-elevated` (#f0f0f1)
showed straight through, so cards visually merged with the page and
internal section strips read as accidental shading rather than headers.

- Add `bg-kumo-base` to every list/info card.
- In `ContentTypeEditor`, the SYSTEM FIELDS wrapper used `bg-kumo-tint/30`
  on the whole section, tinting the rows. Move the tint to the header
  strip only and apply the same treatment to the CUSTOM FIELDS strip
  for visual consistency.
- Fix `SortableTh` referring to a non-existent `text-kumo-fg` class,
  which silently rendered inactive sortable column labels in
  `text-kumo-subtle` (pale grey). Always use `text-kumo-default` and
  rely on the caret icon to signal active state.
Copilot AI review requested due to automatic review settings May 8, 2026 16:58
@changeset-bot

changeset-bot Bot commented May 8, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d88cc1b

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

This PR includes changesets to release 13 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@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 May 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-perf-coordinator d88cc1b May 08 2026, 05:13 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-i18n d88cc1b May 08 2026, 05:13 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs d88cc1b May 08 2026, 05:15 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache d88cc1b May 08 2026, 05:14 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground d88cc1b May 08 2026, 05:15 PM

@pkg-pr-new

pkg-pr-new Bot commented May 8, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

emdash

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

create-emdash

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

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

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

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: d88cc1b

Copilot AI 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.

Pull request overview

This PR fixes several admin UI surfaces (tables, lists, and info cards) that were rendering transparently against the page background by giving them an explicit bg-kumo-base background, improving visual separation and readability across multiple views in @emdash-cms/admin.

Changes:

  • Add bg-kumo-base to list/table wrappers and info-card containers across users, content, media, comments, and device authorization views.
  • Adjust ContentTypeEditor field sections so the tint applies to the section header strips (System/Custom) rather than tinting the rows.
  • Fix content list sortable header text styling by removing reliance on the non-existent text-kumo-fg class and using text-kumo-default consistently.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/admin/src/components/users/UserList.tsx Adds explicit base background to the user table surface and skeleton.
packages/admin/src/components/users/UserDetail.tsx Adds explicit base background to user detail info card surfaces and skeleton.
packages/admin/src/components/MediaLibrary.tsx Adds explicit base background to media list table surface.
packages/admin/src/components/DeviceAuthorizePage.tsx Adds explicit base background to the denied-state (and related) card surface.
packages/admin/src/components/ContentTypeList.tsx Adds explicit base background to content type list table surface.
packages/admin/src/components/ContentTypeEditor.tsx Adds explicit base background to editor cards; refines System/Custom field header strip tinting.
packages/admin/src/components/ContentList.tsx Adds explicit base background to content list/trash tables; fixes sortable header text class usage.
packages/admin/src/components/comments/CommentInbox.tsx Adds explicit base background to comment inbox table surface.
packages/admin/src/components/comments/CommentDetail.tsx Adds explicit base background to comment detail card surfaces.
.changeset/admin-panel-surfaces.md Adds a changeset documenting the admin surface/background and sortable header styling fixes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The list cards render `<table>` with a 1px outer border on the container,
and each tbody `<tr>` had `border-b` for inter-row separators. The last
row's bottom border stacked against the card's bottom border, producing
a visibly thicker line at the bottom -- especially obvious on
single-row lists like Pages with one entry.

Replace per-row `border-b` with `divide-y divide-kumo-line` on the
tbody. The divide utility only adds a top border to children after the
first, so there's nothing at the bottom to clash with the card border.
Same DOM for screen readers; cleaner CSS rule.

Applied to:

- ContentList (posts/pages tables, both 'all' and 'trash' tabs)
- ContentTypeList
- MediaLibrary list view
- UserList (and its loading skeleton, which had the same div-based
  pattern)
- CommentInbox
- WordPressImport feature comparison (was already using the
  `last:border-0` workaround)
- TaxonomyManager (recursive term rows)
@github-actions

github-actions Bot commented May 8, 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.

@ascorbic
ascorbic merged commit 7f6b6ea into main May 8, 2026
36 checks passed
@ascorbic
ascorbic deleted the fix/admin-panel-surfaces branch May 8, 2026 19:23
@emdashbot emdashbot Bot mentioned this pull request May 8, 2026
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.

2 participants