Skip to content

feat(editor): make Portable Text tables complete and responsive - #2934

Merged
ascorbic merged 23 commits into
mainfrom
feat/portable-text-table-editor-refinement
Sep 11, 2026
Merged

ascorbic merged 23 commits into
mainfrom
feat/portable-text-table-editor-refinement

Conversation

@khoinguyenpham04

@khoinguyenpham04 khoinguyenpham04 commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Refines Portable Text tables across the admin editor, saved content, and published pages.

  • Preserve table, row, and cell identity, headers, merged cells, alignment, and column widths through conversion, save/reload, and rendering. Keep legacy string-cell tables compatible and preserve tables in the read-only inline editor.
  • Add a shared size picker, complete grouped Table menu, compact contextual controls, merge/split, column-width tools, and bounded HTML/TSV clipboard workflows.
  • Contain wide tables in their own scroller, improve resize and selection feedback, and support keyboard, touch, and RTL interactions.
  • Fix light-mode hover visibility, header-checkmark alignment, and menu height. Backspace/Delete removes selected whole rows or columns with undo/redo.

Custom ProseMirror schemas consuming portableTextToProsemirror() table output must register the TipTap table extensions. The changeset documents this requirement.

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). No messages.po changes are included.
  • I have added and reviewed the user-facing changeset (if this PR changes a published package)
  • New features link to an approved Discussion: not applicable to this maintainer-authored PR under the repository's compliance policy.
  • I have included screenshots below if this PR changes the UI.

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: OpenAI Codex (GPT-6-Astra)

Screenshots / test output

Product screenshots

Captured from the local product using illustrative draft content. These are product screenshots, not accepted Linux visual-regression baselines.

EmDash post editor with a populated four-column product launch table

Table size picker

Table insertion picker with a 4 by 4 selection and the header row enabled

Compact table action menu

Scrollable Table menu with grouped selection, row, and column actions and a highlighted Add row below action

Header controls

Header row and header column controls enabled, with checkmarks aligned beside their labels

Dark mode and row selection

Dark-mode editor with a complete table row selected using both tint and outlines

Mobile layout

375-pixel-wide editor with a wide table contained in its horizontal scrolling area

CI follow-ups restore wide D1 entry loading and stabilize save-conflict, Social Settings, and scheduling test synchronization. The Social Settings race was reproduced with controlled animation timing; the fix then passed 10 shuffled runs (70 cases). The clean-unschedule sequence passed 10 repetitions. No sleeps, extra retries, or animation changes are shipped.

Local verification:

  • Final CI follow-up verification: 2,223 admin tests; 28 real-D1 tests; 45 focused SQLite/PostgreSQL loader and hydration tests using Postgres.app. Earlier converter/inline and Astro renderer checks also passed.
  • After merging main: Chromium 10 table workflows; Firefox and WebKit 4 each, all without retries. The opt-in performance case was skipped. These workflows ran before the loader/test-only CI follow-ups.
  • Picker accessibility scans, responsive/RTL checks, keyboard deletion and history, and popup scrolling/alignment checks pass.
  • Build, typecheck, type-aware lint, formatting, changeset validation, and diff checks pass.
  • SQLite and D1 public-route query counts remain unchanged after the wide-entry loader fix. SQL-text snapshots reflect grouping the existing metadata into one result column.

Package-check caveat: publint passed. The standard ATTW CLI hit an existing gzip-ingestion failure before analysis; equivalent analysis through its public API passed before the final UI follow-up. No dependency or workaround configuration is included.

@changeset-bot

changeset-bot Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 79e6e76

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

This PR includes changesets to release 17 packages
Name Type
@emdash-cms/admin Minor
emdash Minor
@emdash-cms/cloudflare Minor
@emdash-cms/sandbox-workerd Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site 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/release-service 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

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 10,687 lines across 40 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.

@github-actions github-actions Bot added the review/needs-review No maintainer or bot review yet label Sep 7, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/auth-atproto

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

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

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

emdash

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

create-emdash

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

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

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

@emdash-cms/plugin-cli

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

@emdash-cms/plugin-types

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

@emdash-cms/registry-client

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

@emdash-cms/registry-lexicons

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

@emdash-cms/registry-moderation

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

@emdash-cms/registry-verification

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

@emdash-cms/sandbox-workerd

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

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-field-kit

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

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: 79e6e76

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-portable-text-table-editor-refinement.try.emdashcms.com, https://feat-portable-text-table-editor-refinement-emdash-playground.emdash-cms.workers.dev (commit 79e6e76)

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://f48b70c0.try.emdashcms.com, https://f48b70c0-emdash-playground.emdash-cms.workers.dev 79e6e76 2026-09-11T10:39:40.080Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8d3bae3e.try.emdashcms.com, https://8d3bae3e-emdash-playground.emdash-cms.workers.dev 45b53bd 2026-09-11T08:51:29.672Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e6acc1a9.try.emdashcms.com, https://e6acc1a9-emdash-playground.emdash-cms.workers.dev 36d0350 2026-09-10T21:31:22.184Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://4198702d.try.emdashcms.com, https://4198702d-emdash-playground.emdash-cms.workers.dev 8f6bc5d 2026-09-10T20:13:23.983Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9f1a310c.try.emdashcms.com, https://9f1a310c-emdash-playground.emdash-cms.workers.dev 349e202 2026-09-10T13:55:14.692Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://45b8dee5.try.emdashcms.com, https://45b8dee5-emdash-playground.emdash-cms.workers.dev fdb792d 2026-09-10T12:39:25.500Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://910f6f4f.try.emdashcms.com, https://910f6f4f-emdash-playground.emdash-cms.workers.dev 5df463b 2026-09-10T12:14:14.205Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://aaacf9e6.try.emdashcms.com, https://aaacf9e6-emdash-playground.emdash-cms.workers.dev 03cd2a0 2026-09-10T11:56:24.271Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e6fb7801.try.emdashcms.com, https://e6fb7801-emdash-playground.emdash-cms.workers.dev cf7458c 2026-09-10T11:41:05.399Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1f2dce98.try.emdashcms.com, https://1f2dce98-emdash-playground.emdash-cms.workers.dev bb66635 2026-09-10T11:16:02.310Z Visit the dashboard ↗

View all previews: View all previews ↗

github-actions Bot pushed a commit that referenced this pull request Sep 7, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 7, 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 45b53bd Sep 11 2026, 08:50 AM

@khoinguyenpham04 khoinguyenpham04 added the bot:review Trigger an emdashbot code review on this PR label Sep 7, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 7, 2026

@emdashbot emdashbot Bot 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.

This is a maintainer-authored feature PR that refines Portable Text tables across the admin editor, saved content, and published pages. The approach is sound: a shared @emdash-cms/admin/portable-text-table normalization module, real TipTap/ProseMirror table nodes in the admin editor, bounded clipboard parsing, responsive scroller + column resizing (with RTL handling), and comprehensive E2E/unit/render tests. It fits EmDash's architecture and preserves legacy string-cell tables.

I checked the core converters (portable-text-to-prosemirror.ts, prosemirror-to-portable-text.ts), the admin table extensions/actions/resize/clipboard/menu code, the Astro Table.astro renderer, the inline visual editor preservation path, the changeset, CI additions, and the test suite. The implementation is careful about key stability, ProseMirror identity repair, XSS-safe fallback rendering, and RTL-safe Tailwind/logical CSS. The query surface is unchanged.

The only clear finding is a new user-facing placeholder in the inline editor that is not wrapped for translation. The file already uses hardcoded English (and an Arabic hardcoded branch) for other placeholders/guidance, so this extends an existing gap rather than introducing a new class of problem, but the new table placeholder should still be addressed.

@emdashbot emdashbot Bot removed the bot:review Trigger an emdashbot code review on this PR label Sep 7, 2026
@github-actions github-actions Bot added review/needs-rereview New commits since the last review and removed review/needs-review No maintainer or bot review yet labels Sep 7, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
@khoinguyenpham04

Copy link
Copy Markdown
Collaborator Author

/accept-baselines

@github-actions

Copy link
Copy Markdown
Contributor

The Visual Regression run for the current head (36d0350) is still in progress. Wait for it to finish, then comment /accept-baselines again.

github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 11, 2026
@ascorbic

Copy link
Copy Markdown
Member

/accept-baselines

@github-actions

Copy link
Copy Markdown
Contributor

✅ Baselines accepted by @ascorbic and committed to this PR.

@ascorbic
ascorbic enabled auto-merge (squash) September 11, 2026 10:36
@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 Sep 11, 2026
@ascorbic
ascorbic merged commit 91a4aef into main Sep 11, 2026
56 checks passed
@ascorbic
ascorbic deleted the feat/portable-text-table-editor-refinement branch September 11, 2026 11:26
@emdashbot emdashbot Bot mentioned this pull request Sep 11, 2026
danielmlr added a commit to danielmlr/emdash that referenced this pull request Sep 13, 2026
Picks up emdash-cms#2934, which fixed the publication-date label assertion in
e2e/tests/content-actions.spec.ts that failed E2E shard 2/8 on the
previous head.
danielmlr added a commit to danielmlr/emdash that referenced this pull request Sep 13, 2026
Resolves the conflict in concepts/collections.mdx by taking main's page:
emdash-cms#3045 rewrote it and removed the FieldValidation section our editor
paragraph sat under. The per-type editor behaviour stays documented in
reference/field-types.mdx.

Also picks up emdash-cms#2934, which fixed the publication-date label assertion
that failed E2E shard 2/8 on the previous head.
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