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

Header: Adjust layout styles for better responsiveness on mobile devices #68495

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

Conversation

yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Jan 6, 2025

What, Why and How?

On smaller screens with widths less than 335px, a UI inconsistency was observed in Firefox. The header settings container retained its width, causing it to overlap with the document tools.

To resolve this issue, a width: 100% property was applied exclusively to mobile devices. This adjustment ensured the header settings container adapted to the available screen width. Additionally, the justify-content: inherit rule was introduced to align the header settings tools correctly when the width became constrained. These changes effectively eliminated the overlap and restored the UI consistency.

Testing Instructions (Firefox)

  1. Create a post.
  2. Navigate to the post edit page.
  3. Open the page in mobile view.
  4. Set the width to anything lesser than or equal to 335px.
  5. Observe the overflowing icons.
  • Works as intended on chrome.

Screencast

Before After
before after

Closes: #68480

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review January 6, 2025 05:32
Copy link

github-actions bot commented Jan 6, 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 <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Infinite-Null <[email protected]>
Co-authored-by: jeherve <[email protected]>

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, can you please review this PR when you get a moment?

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.

Thanks for the PR!

I tested it on Windows OS, Chrome browser, and tried changing the width to 320px, but there was no visual change compared to trunk:

image

Was the screenshot you uploaded taken in Chrome?

Another concern is that when I look at your GIF image, the options dropdown on the right is invisible. Below is an excerpt from your GIF video:

image

I think this dropdown is very important and needs to be accessible at all times.

Either way, we'll need some design feedback as we need to clarify what should always be visible and what can be hidden.

cc @WordPress/gutenberg-design

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Package] Editor /packages/editor labels Jan 7, 2025
@yogeshbhutkar
Copy link
Contributor Author

Thanks for the review, @t-hamano.

The bug occurred only in Firefox browsers. I attempted to align the Firefox appearance to match Chrome's.

@t-hamano t-hamano added the Needs Design Feedback Needs general design feedback. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. [Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor: save and tree icons are superposed in i18n languages
2 participants