Skip to content

fix(admin): support heading levels 4 through 6#2200

Open
masonjames wants to merge 1 commit into
emdash-cms:mainfrom
masonjames:codex/support-h4-h6
Open

fix(admin): support heading levels 4 through 6#2200
masonjames wants to merge 1 commit into
emdash-cms:mainfrom
masonjames:codex/support-h4-h6

Conversation

@masonjames

Copy link
Copy Markdown
Contributor

What does this PR do?

Enables heading levels 4 through 6 throughout the admin content editor. Stored H4–H6 blocks now load correctly, and authors can create them from the heading dropdown, slash commands, or the block transform menu with matching editor spacing.

Closes #2172

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). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: Not applicable; this is a maintainer-approved bug fix.

AI-generated code disclosure

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

Screenshots / test output

  • pnpm typecheck
  • pnpm lint
  • pnpm --filter @emdash-cms/admin exec vitest run (104 files, 1,238 tests passed)
  • pnpm format
  • New labels and descriptions use Lingui, logical alignment remains RTL-safe, and no catalog files are included.

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 73ff76b

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 Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/plugin-mcp-smoke 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 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

@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/auth-atproto

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

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

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

emdash

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

create-emdash

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

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

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

@emdash-cms/plugin-cli

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

@emdash-cms/plugin-types

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

@emdash-cms/registry-client

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

@emdash-cms/registry-lexicons

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

@emdash-cms/registry-verification

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

@emdash-cms/sandbox-workerd

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

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-field-kit

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

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: 73ff76b

@masonjames
masonjames marked this pull request as ready for review July 22, 2026 14:36
@github-actions github-actions Bot added the review/needs-review No maintainer or bot review yet label Jul 22, 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 the right fix for the reported issue, scoped to the admin editor UI. The backend serialization (packages/core/src/content/converters/*), frontend rendering (PortableText.astro), and the HeadingDropdownMenu component already understand heading levels 1–6. The only gaps were the TipTap StarterKit configuration limiting heading levels to [1, 2, 3], the toolbar passing levels={[1, 2, 3]}, and the slash / block-transform menus not exposing H4–H6. The PR removes those restrictions and adds the missing commands.

I checked the changed code and traces against the existing converters and schema: H4–H6 Portable Text blocks already load and save correctly, so enabling them in the editor is additive and backward-compatible. The new user-facing strings are wrapped with Lingui msg/t, the layout changes use block margins (not directional Tailwind, so RTL-safe), and there are no new queries or server-side changes.

The added tests cover loading an h6 block and exposing H4–H6 in the toolbar, slash menu, and block-transform menu. I did not run the test suite or build (per instructions), but the diff is internally consistent and follows project conventions. No blocking issues.

@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-review No maintainer or bot review yet labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/admin review/approved Approved; no new commits since size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin editor should have up to h6 (only has h3)

1 participant