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

Fixed the focus cutoff of the editor buttons in the widgets editor #65395

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

dhruvang21
Copy link
Contributor

What?

I found that the focus ring of the editor buttons in the header is cut off in the widgets editor.

Why?

This PR resolves the issue:- #65393

How?

Removed the CSS property overflow:hidden to resolve the issue.

Testing Instructions

  1. Activate the Twenty Twenty one theme
  2. Then navigate to the widgets under appearance section
  3. move the cursor to the editor buttons as shown in screenshot
  4. you could see that the focus box is not cutting off

outline-issue

Copy link

github-actions bot commented Sep 17, 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: dhruvang21 <dhruvang21@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@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
Copy link
Contributor

@dhruvang21 Thanks for the PR!

If we remove overflow:hidden, the scrollbar will not be displayed if the Top Toolbar is enabled:

Trunk

image

This PR

image

Therefore, I think a different approach is needed. I would like to consider what approach is needed.

@dhruvang21
Copy link
Contributor Author

Hi @t-hamano,

You’re right that we cannot remove the overflow: hidden; property since it's necessary for the scroll bar. To resolve this issue, I’ve taken a different approach. While investigating, I noticed that the focus boxes appear correctly when the top toolbar is enabled, but not when it's disabled.

It seems the issue is related to the height difference: when the top toolbar is active, the height is set to 60px, but when it’s disabled, it reverts to 32px. I’ve attached a video demonstrating the issue and the solution, which involves setting a minimum height of 60px.

What do you think of this approach? If it seems appropriate, I’d be happy to commit the code.

Thanks!

focus-box-issue.webm

@t-hamano
Copy link
Contributor

@dhruvang21 Thanks for investigating. I also looked into it, and it would be a good idea to apply height. However, since the header is not expected to be more than 60px tall, it would be better to use height instead of min-height.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Package] Edit Widgets /packages/edit-widgets labels Sep 19, 2024
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
@t-hamano t-hamano self-requested a review September 23, 2024 12:48
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix 👍

@t-hamano t-hamano merged commit 4a91d32 into WordPress:trunk Sep 23, 2024
61 checks passed
@github-actions github-actions bot added this to the Gutenberg 19.4 milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Edit Widgets /packages/edit-widgets [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants