fix(admin): support heading levels 4 through 6#2200
Conversation
🦋 Changeset detectedLatest commit: 73ff76b The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 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/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.
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.
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
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.AI-generated code disclosure
Screenshots / test output
pnpm typecheckpnpm lintpnpm --filter @emdash-cms/admin exec vitest run(104 files, 1,238 tests passed)pnpm format