티스토리 수익 글 보기
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add toolbar block appender to the navigation block #74263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
5909ebd to
9f93522
Compare
|
Size Change: +162 B (+0.01%) Total Size: 2.59 MB
ℹ️ View Unchanged
|
5022b07 to
10a55a5
Compare
f7b6614 to
d593f48
Compare
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don’t worry if you don’t have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
|
||
| _Note:_ | ||
|
|
||
| ## Props |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: update
| import Inserter from '../inserter'; | ||
|
|
||
| function ToolbarBlockAppender( { | ||
| defaultBlock = { name: 'core/paragraph', attributes: {} }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of hardcoding paragraph here, should pull dynamically current default block for the current block.


Resolves #73647
Alternative to #73648
Introduce a toolbar-based [+] inserter for the Navigation block, replacing the in-canvas inserter.
Why
The inline inserter inside the Navigation block often leads to:
A toolbar-based inserter provides:
How
ToolbarBlockAppendercomponent, similar toButtonBlockAppender:[ + ]iconInsertercomponent withtogglePropsfor consistencyBlockToolbarLastItemdefaultBlockpropQuestions/thoughts
Should open the dropdown to select a block by default, or always directly insert a block?

Should check if block allows inner blocks before adding itself to the toolbar?
Should pull the default inner block from the block where this is used, thus not requiring passing the default block to the component?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2025-12-30.at.15.52.21.mov
Screen.Recording.2025-12-30.at.15.52.41.mov