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

Color Gradients: Adjust max-width for color gradient swatch to accommodate reset button size #68626

Merged

Conversation

yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Jan 13, 2025

What, Why & How?

This PR addresses an issue in the Navigation block's Submenu & Overlay Background color setting, where the text label becomes excessively large (in width). As a result, the Reset button overlaps with the text, disrupting the layout and negatively impacting usability. This overlap makes it difficult for users to interact with the controls effectively.

Testing Instructions

  1. Navigate to the Navigation block.
  2. Provide a Submenu & Overlay Background color.
  3. Notice the Submenu & Overlay Background setting's text under Color settings does not overlap with the reset button.

Screenshots

Before After
Screenshot 2025-01-13 at 2 19 00 PM Screenshot 2025-01-13 at 2 14 43 PM

Closes: #68625

@yogeshbhutkar yogeshbhutkar changed the title Style: Adjust max-width for color gradient swatch to accommodate reset button size Color Gradients: Adjust max-width for color gradient swatch to accommodate reset button size Jan 13, 2025
@yogeshbhutkar
Copy link
Contributor Author

Alternatively, we can adopt this approach as well:
Approach-2

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review January 13, 2025 09:27
Copy link

github-actions bot commented Jan 13, 2025

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: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

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

@yogeshbhutkar
Copy link
Contributor Author

Hi @t-hamano,

Following our discussion here, I've created this PR to address the issue. When you have a moment, I’d appreciate it if you could review it and share your feedback. Thank you!

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Feature] Colors Color management labels Jan 13, 2025
@Mamaduka
Copy link
Member

Thanks, @yogeshbhutkar!

The fix looks good, but I wonder if we should add some space between the label and the "Reset" button. Otherwise, it looks a bit crammed.

@yogeshbhutkar
Copy link
Contributor Author

Thank you for the review, @Mamaduka! 🙌

The space between the label and the reset button has been increased by 4px. Further expanding the spacing would compress the label, affecting its readability.

Demo

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thanks, @yogeshbhutkar!

@Mamaduka Mamaduka merged commit 041ca27 into WordPress:trunk Jan 14, 2025
63 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.1 milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Colors Color management [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation: Reset button overlaps on the text when the text is long
2 participants