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

Add block button overlap fixed #39304 #39338

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

HILAYTRIVEDI
Copy link
Contributor

What?

This PR will fix the overlapping issue of the add button.

Why?

It will add a few lines of new CSS which sets the proper alignment of the add button of the header menu.

How?

When the alignment is set the add button is positioned according to the text and alignment.

Testing Instructions

To test this follow the below steps:

  1. Go to the page editor
  2. Selecting mobile view using the preview button
  3. On a mobile device click on the hamburger button and slide-out navigation
  4. Click on menus to add a new menu and also same time selection navigation block alignment in the center and right end at the time add block button will not overlap.

Screenshots or screencast

Here is the video showing solution.

https://www.loom.com/share/d68b687267a74b47840364d578467415

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @HILAYTRIVEDI! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 10, 2022
@talldan talldan added [Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended labels Mar 10, 2022
@talldan talldan changed the title App button over lap fixed #39304 Add block button overlap fixed #39304 Mar 10, 2022
@talldan talldan requested a review from jasmussen March 10, 2022 06:48
@jasmussen
Copy link
Contributor

Thank you for the PR!

I took it for a spin, but it's a little hard for me to understand the problem it's meant to solve. Best I can tell, it's that the black plus overlaps right aligned menu items in the open overlay:

Screenshot 2022-03-10 at 08 51 34

I understand this isn't ideal, but it's an intentional tradeoff to have the button be fixed position, even if it ends up overlapping. Ticket #39076 deals with the problem and #39076 (comment) offers some ideas for how we can improve this in the future. In the meantime, I'm not sure we should add CSS to tackle edgecases in the appender component, as the goal is to make those edgecases redundant in the future.

Alternately, we could add some edgecases temporarily in this part of the code. What do you think?

@HILAYTRIVEDI
Copy link
Contributor Author

Hello @jasmussen

Thanks for your reply!

I took it for a spin, but it's a little hard for me to understand the problem it's meant to solve. The best I can tell, it's that the black plus overlaps right-aligned menu items in the open overlay:

It addresses the overlapping issue of the add block button on the text. To resolve this I added the CSS so that the button will align with the text according to its with i.e 25px width + 5px spacing.

I understand this isn't ideal, but it's an intentional tradeoff to have the button be fixed position, even if it ends up overlapping.

I think it becomes wierd for the user as it appears to be a design issue instead of a trade-off.

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 First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In wordpress 5.9.1 add block button overlap with navigation menu in mobile device
3 participants