Skip to content

Feat : Slotfill for Media Toolbar Dropdown#66865

Open
Vrishabhsk wants to merge 3 commits intoWordPress:trunkfrom
Vrishabhsk:add/slotfill-media-toolbar
Open

Feat : Slotfill for Media Toolbar Dropdown#66865
Vrishabhsk wants to merge 3 commits intoWordPress:trunkfrom
Vrishabhsk:add/slotfill-media-toolbar

Conversation

@Vrishabhsk
Copy link
Copy Markdown
Contributor

What?

  • Allows extensibility for the Media Toolbar Dropdown for Image and Cover Blocks

Why?

How?

  • Create a MenuItem Slotfill and inject its Slot into MediaReplaceFlow component
  • Allow Slotfill to be imported from @wordpress/block-editor

Testing Instructions

import { registerPlugin } from "@wordpress/plugins";
import { PluginMediaToolbar } from "@wordpress/block-editor";
import { share } from "@wordpress/icons";

const ExtendToolbar = () => (
	<PluginMediaToolbar icon={share} onClick={() => console.log("menu-extended")}>
		Extend Menu
	</PluginMediaToolbar>
);

registerPlugin("extend-toolbar-test", {
	render: ExtendToolbar,
});

Screenshots or screencast

Cover Block Image Block
Screenshot 2024-11-08 at 2 12 37 PM Screenshot 2024-11-08 at 2 12 28 PM

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 8, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Media & Text Affects the Media & Text Block labels Nov 8, 2024
@akasunil akasunil added the [Type] Enhancement A suggestion for improvement. label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Cover Affects the Cover Block - used to display content laid over a background image [Block] Media & Text Affects the Media & Text Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants