Skip to content

Remove the unused native Plate image node - #201

Merged
sneridagh merged 1 commit into
mainfrom
claude/competent-solomon-fc89d4
Oct 2, 2026
Merged

sneridagh merged 1 commit into
mainfrom
claude/competent-solomon-fc89d4

Conversation

@sneridagh

Copy link
Copy Markdown
Member

Aurora always inserts images as Plone image blocks (ploneBlock with @type: 'image', via plone-image-upload.tsx), so the native Plate img node and its UI were dead code.

Changes

@plone/plate

  • Deleted components/ui/media-image-node.tsx, media-image-node-static.tsx and media-preview-dialog.tsx (nothing imported them).
  • Dropped the commented-out ImagePlugin / BaseImagePlugin blocks in media-kit.tsx / media-base-kit.tsx and the commented KEYS.img insert in transforms.ts.
  • Removed the "Image" entries from insert-toolbar-button.tsx and fixed-toolbar-buttons.tsx (only reachable from the full preset) and the KEYS.img config in media-toolbar-button.tsx.
  • Removed the image branch and ImageProgress from media-placeholder-node.tsx; video, audio and file placeholders are unchanged.
  • Added a guard in the placeholder: Plate's PlaceholderPlugin still maps dropped image files to img placeholders by default, so in presets without PloneImageUploadPlugin (full, block-editor) the missing config would otherwise crash. Unknown media types now render an empty element.
  • Removed KEYS.img from the caption, align, indent and list target lists and from the block-suggestion.tsx labels.

@plone/blocks

  • Removed the img entry from config.blocks.plateBlocksConfig.

Validation

  • pnpm --filter @plone/plate test --run — 74 passed
  • pnpm --filter @plone/plate check:ts — clean
  • pnpm --filter @plone/blocks test --run — 29 passed
  • pnpm --filter @plone/blocks check:ts — clean

News fragments are marked internal since the package is experimental and none of the removed components were wired into a preset.

Aurora always inserts images as Plone image blocks (`ploneBlock` with
`@type: 'image'`), so the native Plate `img` node was dead code.

- Delete `media-image-node.tsx`, `media-image-node-static.tsx` and
  `media-preview-dialog.tsx`.
- Drop the commented-out `ImagePlugin`/`BaseImagePlugin` blocks and the
  commented `KEYS.img` insert transform.
- Remove the Image entries from the insert and fixed toolbars (`full`
  preset only) and from `MediaToolbarButton`.
- Remove the image branch and `ImageProgress` from the media
  placeholder, and guard against media types without placeholder config
  so an image drop in presets without `PloneImageUploadPlugin` does not
  crash.
- Remove `KEYS.img` from the caption, align, indent and list targets and
  from the block suggestion labels.
- Remove the `img` entry from `config.blocks.plateBlocksConfig`.
@sneridagh
sneridagh merged commit d739952 into main Oct 2, 2026
35 checks passed
@sneridagh
sneridagh deleted the claude/competent-solomon-fc89d4 branch October 2, 2026 14:16
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