Skip to content
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

Navigation Block: replace button block appender with dropdown appender #66193

Open
t-hamano opened this issue Oct 17, 2024 · 2 comments
Open
Labels
[Block] Navigation Affects the Navigation Block [Type] Code Quality Issues or PRs that relate to code quality

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Oct 17, 2024

Related issue/PR:

The current Navigation block uses a button block appender and has some override CSS in order to show the block appender even when a child is selected.

But as seen in this comment, we should use a dropdown appender instead of a button block appender as it's only a temporary fix.

That way you should be able to remove a lot of the hacky CSS.

@t-hamano t-hamano added [Block] Navigation Affects the Navigation Block [Type] Code Quality Issues or PRs that relate to code quality labels Oct 17, 2024
@t-hamano t-hamano changed the title Navigation Block: Navigation Block: replace button block appender with dropdown appender Oct 17, 2024
@im3dabasia
Copy link
Contributor

@t-hamano ,

I noticed that the Group block also uses a button block appender, similar to the Navigation block. Am I missing something here? It seems the goal is to move away from the button block appender, but it looks like the Group block isn't currently using the dropdown appender.

Navigation

parentOrChildHasSelection
? InnerBlocks.ButtonBlockAppender
: false,

Group

// use the larger button appender.
renderAppender = InnerBlocks.ButtonBlockAppender;
}

@t-hamano
Copy link
Contributor Author

t-hamano commented Jan 2, 2025

I noticed that the Group block also uses a button block appended

This is only rendered when the Group block does not have any child blocks:

Image

If child blocks exist, rendered as a drop-down appender:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

2 participants