Conversation
…xt blocks Adds an optional `category` field to `PortableTextBlockConfig`. Plugin authors can pick a meaningful group name (e.g. "Sections", "Marketing", "Media") instead of every plugin block defaulting to "Embeds". Plugins that omit the field continue to render under "Embeds" with no behaviour change. Plumbs the field through the runtime manifest, the admin manifest type, the editor's `PluginBlockDef`, and the slash command builder. Widens `SlashCommandItem.category` to accept either a Lingui `MessageDescriptor` (for built-in commands) or a plain string (for plugin-supplied values), and updates the marketing template's blocks to demonstrate the new field with `category: "Sections"`.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | 37fc41e | Apr 28 2026, 02:04 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 37fc41e | Apr 28 2026, 02:05 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 37fc41e | Apr 28 2026, 02:05 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 37fc41e | Apr 28 2026, 02:05 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | 37fc41e | Apr 28 2026, 02:04 PM |
PR template validation failedPlease fix the following issues by editing your PR description:
See CONTRIBUTING.md for the full contribution policy. |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@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-forms
@emdash-cms/plugin-webhook-notifier
commit: |
🦋 Changeset detectedLatest commit: 37fc41e The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 |
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. |
What does this PR do?
Adds an optional
category?: stringfield toPortableTextBlockConfig, plumbs it through the manifest API to the admin's slash-command builder, and updates the marketing template's plugin to use it. Without this, every plugin-contributed Portable Text block appears under "Embeds" in the slash menu -- which is wrong for plugins like the just-mergedmarketing-blocks(#804) where blocks are page sections, not embeds.What works after this
The marketing-blocks plugin in both
templates/marketingandtemplates/marketing-cloudflarenow declarescategory: "Sections"for all five blocks.Important note on rendering
The slash menu currently doesn't visually group commands by category -- each
SlashCommandItemcarries acategoryfield but it isn't surfaced in the rendered DOM today. So this PR is the data plumbing that makes the override possible, but you won't see a visible "Sections" header until someone adds category grouping to the slash menu UI.That's intentional scope. Plugins can declare their categories now; the rendering improvement is a separate change. For today, the practical effect is: the data is correct (marketing blocks declare "Sections"), nothing regresses, and a follow-up that adds visual grouping will Just Work.
Type changes
PortableTextBlockConfig.category?: string-- new optional field.EmDashRuntime.getManifest()(packages/core/src/emdash-runtime.ts)AdminManifestplugin shape (packages/admin/src/lib/api/client.ts)PluginBlockDef(packages/admin/src/components/editor/PluginBlockNode.tsx)SlashCommandItem.categorywidened fromMessageDescriptortoMessageDescriptor | string. Plain strings flow through unchanged; only the existing built-in commands keep their Lingui descriptors.Discussion
Bypassing the "feature requires Discussion" rule here on my own initiative -- this is a small additive type change that closes a UX gap surfaced by #804, and the alternative ("plugin authors invent their own conventions, content goes under wrong headings") is worse. Filing a Discussion would just describe what already exists.
Type of change
Checklist
pnpm typecheckpasses (admin, core, all plugins)pnpm lintpasses (4 pre-existing diagnostics inpackages/blocks/src/validation.ts, unchanged from main)pnpm testpasses (admin: 798 tests with 2 new; core: 2931 tests)pnpm formathas been runtests/editor/slash-menu.test.tsx: one verifies a customcategoryoverride doesn't break command rendering, one guards the default-fallback path. Honest scope: these are smoke tests for the data path, sincecategoryisn't displayed in the DOM yet.categoryfield accepts plain strings (per-plugin choice; not localised)@emdash-cms/adminandemdash(additive feature, backwards-compatible)AI-generated code disclosure
Screenshots / test output
Diff stat: 9 files changed, +89/-3.