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

Fix Navigation link control overlapping issue #59065

Merged
merged 3 commits into from Feb 22, 2024

Conversation

akasunil
Copy link
Contributor

What?

Fixed #59054

Why?

There was overlapping in link control when "Show button text labels" enable from Preferences.
304975489-f165a62d-fb54-40be-b768-8a07104e08b9

How?

We are hiding URL from "copy link" button lable when "Show button text labels" enabled. So button text doesn't overlap each other.

Testing Instructions

  1. Go to gutenberg editor
  2. Add navigation block
  3. Enable "Show button text labels" in Preferences > Accessibility.
  4. Add new link in navigation block, it will display link control popover.

Testing Instructions for Keyboard

Screenshots or screencast

CleanShot 2024-02-15 at 15 39 57@2x

Copy link

github-actions bot commented Feb 15, 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: sunil25393 <sunil25393@git.wordpress.org>
Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
Co-authored-by: getdave <get_dave@git.wordpress.org>
Co-authored-by: draganescu <andraganescu@git.wordpress.org>
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>

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

@getdave getdave added [Type] Bug An existing feature does not function as intended [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels Feb 15, 2024

.block-editor-link-control__search-item-top {
.components-button.has-icon {
min-width: 50px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a min-width is width is set?

.components-button.has-icon {
min-width: 50px;
width: 50px;
padding: 0 5px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than adding padding on both sides, what do you think about adding a gap to the parent element? This means we don't add extra padding on the left and right of the buttons which makes a better use of the space IMO

Copy link
Contributor Author

@akasunil akasunil Feb 15, 2024

Choose a reason for hiding this comment

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

Thank you for suggestions, I have updated css to make better use of space.


.components-button.has-icon {
min-width: inherit;
width: min-content;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is much better for other languages, thank you

@getdave getdave changed the title Fix nagivation link control overlapping issue Fix Navigation link control overlapping issue Feb 20, 2024
@getdave getdave added the Backport to WP Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Feb 20, 2024
@getdave
Copy link
Contributor

getdave commented Feb 20, 2024

This will need to be included in the backports for Beta 3. I added the requisite label.

Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

This looks great let's bring it in.

@getdave getdave merged commit 5860993 into WordPress:trunk Feb 22, 2024
60 checks passed
@github-actions github-actions bot added this to the Gutenberg 17.9 milestone Feb 22, 2024
@akasunil akasunil deleted the fix-issue-59054 branch February 22, 2024 10:20
getdave pushed a commit that referenced this pull request Feb 27, 2024
* Fix nagivation link control overlapping issue

* Addressed feedback

* use variable insted fixed number in spacing
@getdave
Copy link
Contributor

getdave commented Feb 27, 2024

I just cherry-picked this PR to the cherry-pick-wp-6-5-beta-3 branch to get it included in the next release: 667797e

@getdave getdave added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Feb 27, 2024
getdave pushed a commit that referenced this pull request Feb 27, 2024
* Fix nagivation link control overlapping issue

* Addressed feedback

* use variable insted fixed number in spacing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Type] Bug An existing feature does not function as intended
Projects
Development

Successfully merging this pull request may close these issues.

URL input is broken when button text labels are enabled
4 participants