Skip to content

feat(studio): publish confirm, hide releases, desk icons, slug uniqueness#419

Open
ignmandagaran wants to merge 2 commits into
mainfrom
ignmandagaran/pagebuilder-feature-plan
Open

feat(studio): publish confirm, hide releases, desk icons, slug uniqueness#419
ignmandagaran wants to merge 2 commits into
mainfrom
ignmandagaran/pagebuilder-feature-plan

Conversation

@ignmandagaran

@ignmandagaran ignmandagaran commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

Ports a set of Sanity Studio editor-experience features from the basement-cli
page-builder template, adapted to this project's existing content model
(curated singletons + flat collections — no generic page-builder).

What's included (Phase 1)

  • Publish confirmation dialog — the Publish action is wrapped in a
    critical confirm ("This will make these changes live on the production site
    immediately. Continue?"). Production only (NODE_ENV === "production");
    dev/preview publishing stays frictionless. Layered on top of the existing
    singleton-action filter.
  • Releases tab hiddenreleases: { enabled: false } removes the
    Content Releases entry from the Studio navbar (unused here).
  • Desk icons — Phosphor icons (@phosphor-icons/react) on every desk group
    and item for clearer navigation.
  • Slug uniqueness — per-type uniqueness enforced on post, project and
    openPosition via a shared isUnique helper; Sanity's built-in slug
    validator blocks publish on a duplicate.

New files

  • sanity/studio/confirm-publish-action.ts
  • sanity/schemas/utils/unique-slug.ts

Deferred (not in this PR)

  • Phase 2 — custom page-tree pane. The template's tree is built around a
    hierarchical page/pageFolder model this project doesn't use; for flat
    collections Sanity's built-in lists already provide search + draft
    indicators, so the marginal value is low. Held pending a decision.

Test Plan

  • pnpm dev/studio: editing a singleton publishes with no dialog (dev).
  • Production build/serve (or NODE_ENV=production): Publish shows the
    critical confirm; Cancel aborts, Confirm publishes. discardChanges /
    restore unaffected.
  • /studio navbar no longer shows the Releases tab.
  • Desk shows Phosphor icons on every group/item.
  • Two post docs with the same slug → second blocks with a uniqueness error.
  • Presentation/preview + draft-mode toggle still work.

… uniqueness

- Wrap the Publish action in a production-only critical confirm dialog so
  changes can't go live by accident (sanity/studio/confirm-publish-action.ts).
- Disable the Releases navbar tab (releases.enabled: false).
- Add Phosphor icons to every desk group/item.
- Enforce per-type slug uniqueness on post, project and openPosition via a
  shared isUnique helper (sanity/schemas/utils/unique-slug.ts).
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website-2k25 Ready Ready Preview, Comment Jun 25, 2026 7:04pm

releases.enabled: false hides Content Releases but not the separate
Scheduled Drafts tool; disable that too with scheduledDrafts.enabled: false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant