feat(blocks): add accordion block for collapsible nested content#790
Merged
ascorbic merged 1 commit intoemdash-cms:mainfrom Apr 28, 2026
Merged
feat(blocks): add accordion block for collapsible nested content#790ascorbic merged 1 commit intoemdash-cms:mainfrom
ascorbic merged 1 commit intoemdash-cms:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 7439fe6 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 |
@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: |
Collaborator
|
/review |
Contributor
|
LGTM! |
Contributor
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. |
Collaborator
|
@all3f0r1 the conflicts are all just with your other PR I think, and should be quite easy to resolve |
Wraps Kumo Collapsible with the Block Kit pattern: a labeled trigger hides nested blocks until opened, with an optional `default_open`. Open/closed state is local — no round-trip to the plugin.
a8cc724 to
7439fe6
Compare
Contributor
Author
|
Mergeable now. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new
accordionBlock Kit block that wraps nested blocks under a labeled, expandable trigger. Maps directly to Kumo'sCollapsiblecomponent. Plugin admin pages can now hide secondary content (advanced settings, FAQs, auxiliary panels) without paginating or round-tripping throughblock_action.Open/closed state is local to the rendered React component (with optional
default_open) — no new interaction type needed.Discussion: #789
Type of change
Checklist
pnpm typecheckpasses (for@emdash-cms/blocks— the only package touched. A pre-existing typecheck failure in@emdash-cms/admin/src/components/PortableTextEditor.tsxexists onmainand is unrelated to this PR.)pnpm lintpasses (lint:json diagnostic count unchanged from baseline)pnpm testpasses (@emdash-cms/blocks: 75 tests, all green)pnpm formathas been runonActionpropagation)@emdash-cms/blocksminor — additive)AI-generated code disclosure
Screenshots / test output
Design notes
accordionovercollapsible(the Kumo component name) because plugins typically stack several of them — "accordion" is the more familiar UX term. Easy to flip if maintainers prefer the Kumo name.default_opencovers the "should this start expanded" case; rejected ablock_action-based reactive variant as adding round-trips per toggle for negligible benefit.blocksallowed: mirrors how an emptysectionis allowed; no minimum length enforced.blocks[0].blocks[2].text).