Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 4b6b7ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 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-test
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-loader
@emdash-cms/registry-moderation
@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 a focused, additive feature that solves the right problem: letting visible collections opt out of the dashboard “new entry” quick action without being hidden. The approach fits EmDash’s existing model (JSON admin_config, admin manifest opt-in flags, schema API replace semantics) and does not add queries or touch logged-out routes.
I checked:
- Content type editor — new
quickCreateswitch state is correctly defaulted totrue, included inhasChanges, disabled for code-defined collections, and merged over existingadmin.listColumnson update. - Schema/registry —
admin.quickCreateis persisted as a boolean inadmin_config, parsed safely, and returned through the schema API response shape. - Validation — Zod API schemas and seed validation both reject non-boolean
quickCreate; seed export already serializescollection.admin, so the new field round-trips. - Manifest —
quickCreate: falseis published only when opt-out is set; the dashboard filters quick actions withquickCreate !== false, preserving the default visible behavior. - Tests — New cases cover create-with-opt-out, preserving existing
listColumns, dashboard filtering, seed validation, and manifest publishing. - Documentation/changeset — The seed-files table and the changeset accurately describe the new setting and the schema API replace semantics.
No blocking issues, logic bugs, or AGENTS.md convention violations found.
There was a problem hiding this comment.
This is a small, self-contained additive feature that lets collections opt out of the dashboard "new entry" quick action via admin.quickCreate. The implementation follows EmDash conventions and keeps the default behavior intact.
What I checked:
- Approach: The setting lives in the existing JSON
admin_configcolumn, so no migration is needed. It is wired through seed files, the schema API, the admin manifest, and the content type editor. This is the right surface for the feature. - Logic:
quickCreate === falseomits the quick action;undefinedkeeps the current default (show the action). The editor only sendsadminwhen the switch changed, and merges it over existing config solistColumnssurvives the full-object update performed by the registry. The manifest only publishes the property when it isfalse. - AGENTS.md conventions:
- Localization: New UI strings in
ContentTypeEditorare wrapped for Lingui. - RTL-safe Tailwind: The new switch uses semantic tokens and no directional physical classes.
- Logged-out query counts: No new queries; the manifest already reads
admin_config. - Comments: No problematic comments were added.
- Localization: New UI strings in
- Tests: New tests cover the editor toggle (create and update), dashboard filtering, seed validation, and manifest serialization. They assert observable behavior rather than implementation details.
- Documentation/changeset: The seed docs row is accurate, and the changeset explains the capability, usage paths, and the
adminobject replacement caveat.
I found no bugs, regressions, or convention violations. The PR is ready to merge as-is.
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. |
|
Closing this as superseded: #3440 (collection navigation settings) shipped the same |
What does this PR do?
Adds an
admin.quickCreatecollection setting. When it isfalse, the admin dashboard does not show that collection's "new entry" quick action. Hidden collections already lose their quick action; this covers collections that stay in the sidebar but should not be created from the dashboard (settings-like singletons, sync logs, imported records).The setting lives in the existing
admin_configJSON next tolistColumns, so there is no migration. It is wired through:collections[].admin.quickCreate, validated as a boolean) and seed exportfalse)The schema API replaces the whole
adminobject on update. The editor therefore sendsadminonly when the switch changed, and merges it over the existing config solistColumnsis kept. The changeset tells API callers to do the same.No queries are added: the manifest reads the column it already selects, and nothing runs on logged-out routes.
This is a small feature opened directly by a maintainer, without a separate Discussion.
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
The new switch in the content type editor's Navigation section:
After turning the switch off for Posts and saving, the dashboard header offers only "Page" and "Upload Media":
Targeted tests:
ContentTypeEditor.test.tsx+Dashboard.test.tsx(57 passed),seed/validate.test.ts+runtime/manifest-build.test.ts(86 passed).