Skip to content

fix(visual-editing): don’t open admin for portableText; simplify starter PT markup - #40

Merged
ascorbic merged 6 commits into
emdash-cms:mainfrom
hasansmadix:pr/visual-editing-core-only
Apr 6, 2026
Merged

ascorbic merged 6 commits into
emdash-cms:mainfrom
hasansmadix:pr/visual-editing-core-only

Conversation

@hasansmadix

@hasansmadix hasansmadix commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR fixes an issue where PortableText fields incorrectly open the admin panel in edit mode. It ensures inline editing works as expected without triggering the global admin handler. It also simplifies the starter PortableText markup to prevent click interception issues.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read CONTRIBUTING.md

Additional context

  • Inline PortableText editing now works correctly without opening admin.
  • Removed unnecessary wrapper around <PortableText /> in starter templates.
  • Ensures proper click handling and DOM traversal behavior.

Test plan

  • Toggle edit mode and click PortableText content → should edit inline, not open admin.
  • Ran:
    • pnpm typecheck
    • pnpm --silent lint:json
    • pnpm --filter emdash exec vitest run tests/unit/visual-editing/toolbar.test.ts

@changeset-bot

changeset-bot Bot commented Apr 4, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 258162d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Apr 4, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@pkg-pr-new

pkg-pr-new Bot commented Apr 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@40

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@40

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@40

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@40

emdash

npm i https://pkg.pr.new/emdash@40

create-emdash

npm i https://pkg.pr.new/create-emdash@40

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@40

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@40

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@40

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@40

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@40

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@40

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@40

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@40

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@40

commit: 258162d

@hasansmadix

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Apr 4, 2026
@ascorbic

ascorbic commented Apr 5, 2026

Copy link
Copy Markdown
Member

recheck

@github-actions

github-actions Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Overlapping PRs

This PR modifies files that are also changed by other open PRs:

This may cause merge conflicts or duplicated work. A maintainer will coordinate.

@ascorbic
ascorbic enabled auto-merge (squash) April 6, 2026 20:01
@ascorbic
ascorbic merged commit dbaf8c6 into emdash-cms:main Apr 6, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants