Add image editor extension panels#77932
Draft
ramonjd wants to merge 1 commit intoupdate/session-image-statefrom
Draft
Add image editor extension panels#77932ramonjd wants to merge 1 commit intoupdate/session-image-statefrom
ramonjd wants to merge 1 commit intoupdate/session-image-statefrom
Conversation
42 tasks
|
Size Change: +348 B (0%) Total Size: 7.91 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in dcb3d74. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25361373668
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds a constrained image editor extension panel registry.
Extensions can register sidebar panel definitions with a unique
name,title, optionalorder, and a React component. The media editor modal renders registered panels as image-only tabs between Crop and Details, and each panel component receives the current image editing session.The registration function is exposed through media editor private APIs while the feature is still internal.
This is a stacked follow-up to #77929.
Why
This establishes the first UI extension point without expanding the editor shell. Core still owns the modal layout, tab placement, Save/Cancel, dirty state, undo/redo, and persistence. The initial slot is intentionally limited to sidebar panels so later adjustments, filters, or AI tools can exercise the session API without adding toolbar or canvas overlay extension surfaces yet.
Validation
npm run test:unit packages/media-editor/src/components/image-editor-extension-registry/test/index.tsx -- --runInBandnpm run test:unit packages/media-editor/src/components/image-editing-session/test/index.tsx -- --runInBandnpm run test:unit packages/media-editor/src/image-editor/react/hooks/test/use-cropper-state.ts -- --runInBandnpm exec -- prettier --check packages/media-editor/src/components/image-editor-extension-registry/index.ts packages/media-editor/src/components/image-editor-extension-registry/test/index.tsx packages/media-editor/src/components/media-editor-modal/index.tsx packages/media-editor/src/private-apis.tsnpm run lint:js packages/media-editor/src/components/image-editor-extension-registry/index.ts packages/media-editor/src/components/image-editor-extension-registry/test/index.tsx packages/media-editor/src/components/media-editor-modal/index.tsx packages/media-editor/src/private-apis.tsgit diff --check