Skip to content

Content CSS Phase 7: remove the Plate media nodes from Aurora's presets - #215

Open
sneridagh wants to merge 2 commits into
b6-tablefrom
b7-media
Open

sneridagh wants to merge 2 commits into
b6-tablefrom
b7-media

Conversation

@sneridagh

Copy link
Copy Markdown
Member

Phase 7 of #200, changed to a removal: Aurora's presets no longer load Plate's media nodes, so there's nothing to convert. Same treatment as the native img node in #201.

Stacked on #214 (Phase 6). The base is b6-table. This PR's own change is only the last commit.

Why

The plan was to move the video, audio, file, media embed and caption styles to styles/content.css. But the media nodes can't be reached in Aurora:

  • No way to insert them: neither the slash menu nor the floating toolbar of the somersault-editor preset offers them. The fixed toolbar that does is only in the stock full preset.
  • Pasted iframes break silently: pasting HTML with an <iframe> made a media_embed. It showed in the editor, but the renderer kit has no component for it, so the public view didn't show the embed.
  • File drops have no backend: dropping or pasting non-image files went to Plate's upload placeholder, which needs an upload backend Aurora doesn't have. Image files are already taken over by PloneImageUploadPlugin, which makes Plone image blocks.

Aurora uses Plone blocks for media (image, video…).

Changes

  • BlockEditorKit and BlockBaseEditorKit (used by the somersault-* and block-* presets) no longer include MediaKit / BaseMediaKit. That removes the video, audio, file, media embed, upload placeholder and caption plugins.
  • config.blocks.plateBlocksConfig loses its video, audio, file and media_embed entries.
  • PloneImageUploadPlugin's comment says the media placeholder flow it takes over from only exists in other presets now.
  • Kept: the media components and kits. The stock full preset (EditorKit / BaseEditorKit) still uses them, so they stay on Tailwind. That's fine, since plate outside Aurora doesn't need the content contract.

Behavior changes

Action Before After
Paste HTML with <iframe> media_embed node; shown in the editor, missing in the public view The iframe is dropped; the surrounding text is kept
Paste HTML with <video> / <audio> Dropped Dropped (unchanged)
Drop or paste a non-image file Upload placeholder, then a failed upload Nothing is inserted
Drop or paste an image file Plone image block Plone image block (unchanged)

Nothing in Aurora could create video, audio or file nodes, so no stored content should have them. A media_embed saved from an earlier iframe paste would now render as an empty element in the editor too, as it already did publicly.

Tests

  • New: paste.test.ts › "Pasting HTML with embedded media keeps only its text": pastes a heading, paragraphs, an iframe, a video and an audio, and checks that only the heading and paragraphs remain.

Validation

  • CI=1 pnpm visual-test --retries=0: 24/24 pixel-identical.
  • pnpm acceptance-test: 177 passed, including the new paste test.
  • pnpm --filter @plone/plate test --run: 75 passed. pnpm --filter @plone/blocks test --run: 29 passed. check:ts (plate, blocks), eslint and prettier: clean.

Part of #200.

Nothing in Aurora's editor could insert them, pasted iframes became embeds the public view didn't render, and file drops needed an upload backend Aurora doesn't have. Aurora uses Plone blocks for media. The stock full preset keeps them.

Part of #200.
* b6-table:
  Move the table drag handle fragment to @plone/quanta
  Releasing @plone/aurora 1.0.0-alpha.16
  Release @plone/contents 1.0.0-alpha.3
  Release @plone/publicui 1.0.0-alpha.8
  Release @plone/cmsui 1.0.0-alpha.11
  Release @plone/agave 1.0.0-alpha.8
  Release @plone/theming 1.0.0-alpha.8
  Release @plone/layout 1.0.0-alpha.13
  Release @plone/blocks 1.0.0-alpha.17
  Release @plone/plate 1.0.0-alpha.22
  Release @plone/react-router 2.0.0-alpha.7
  Release @plone/helpers 2.0.0-alpha.9
  Release @plone/registry 4.0.0-alpha.4
  Release @plone/quanta 1.0.0-alpha.1
  Release @plone/components 5.0.0-alpha.5
  Release @plone/client 2.0.0-alpha.8
  Release @plone/icons 1.0.0-alpha.1
  Release @plone/types 3.0.0-alpha.7
  Split Quanta and icons out of @plone/components into @plone/quanta and @plone/icons (#212)

This branch has not been deployed

No deployments
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