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 coming soon page mobile UI issues #47491

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

chihsuan
Copy link
Member

@chihsuan chihsuan commented May 15, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

p1715675706047389-slack-C01SFMVEYAK

Fix coming soon page not displaying correctly on mobile view

  • Add min-width to body tag to prevent the page from being too small on mobile view
  • Adjust padding for smaller screens
  • Update font size and text wrapping for banner. Even after adding text-wrap: balance or  , the window issue still exists with the banner text with Samsung Galaxy S8+ because the font size was really too large. So, I referred to the editor and made the necessary changes (use clamp()) to the font size to make it look better on mobile view.

Both text-wrap: balance and   should work for the banner text. But I used text-wrap: balance in the PR because I found we used text-wrap in WordPress.com p7H4VZ-4Hm-p2#comment-11820 and seems it's a better way to handle the text wrapping issue. Besides, I think that would still prevent the text from being cut off if users change the banner text

Before:

Samsung Galaxy S8+ - without font size adjustment

Screenshot 2024-05-15 at 11 33 11

Samsung Galaxy S8+ - with font size adjustment

Screenshot 2024-05-15 at 11 58 42

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Create a fresh site with launch-your-store feature flag enabled.
  2. Skip the setup wizard
  3. Go to frontend in incognito mode
  4. Check the coming soon page looks good on mobile view
Screen.Recording.2024-05-15.at.11.43.32.mov

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

- Add min-width to container for better responsiveness
- Adjust padding for smaller screens
- Update font size and text wrapping for banner
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label May 15, 2024
@@ -129,7 +135,7 @@ export const generateStyles = ( color = '#bea0f2' ) => {
height: 40px;
}
.woocommerce-coming-soon-banner {
font-size: 48px;
font-size: clamp(27.894px, 1.743rem + ((1vw - 3.2px) * 2.094), 48px);
Copy link
Member Author

Choose a reason for hiding this comment

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

I set the font size to 48px in the site editor and copied-pasted this value from the applied CSS.

The syntax for clamp() is:

clamp(minimum, preferred, maximum)
  • Minimum Value: 27.894px
  • Preferred Value: 1.743rem + ((1vw - 3.2px) * 2.094)
  • Maximum Value: 48px

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: It sounds like you copied the values out of the editor, but perhaps we should round the numbers to ease readability 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good! Thanks for the suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in f6bd20e

Copy link
Contributor

github-actions bot commented May 15, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

@chihsuan chihsuan requested review from a team, adrianduffell and rjchow May 15, 2024 04:14
Copy link
Contributor

Hi @adrianduffell, @rjchow, @woocommerce/ghidorah

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

@adrianduffell adrianduffell left a comment

Choose a reason for hiding this comment

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

Thanks @chihsuan, this is testing great and LGTM. I tried it in various different mobile and tablet sizes. I just left a nitpick but feel free to ignore 🚀

@@ -129,7 +135,7 @@ export const generateStyles = ( color = '#bea0f2' ) => {
height: 40px;
}
.woocommerce-coming-soon-banner {
font-size: 48px;
font-size: clamp(27.894px, 1.743rem + ((1vw - 3.2px) * 2.094), 48px);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: It sounds like you copied the values out of the editor, but perhaps we should round the numbers to ease readability 🤔

Copy link
Contributor

@ilyasfoo ilyasfoo left a comment

Choose a reason for hiding this comment

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

Tests well, LGTM! 🚢

@chihsuan chihsuan merged commit a120b99 into trunk May 16, 2024
37 checks passed
@chihsuan chihsuan deleted the fix/coming-soon-mobile-ui branch May 16, 2024 04:46
@github-actions github-actions bot added this to the 9.0.0 milestone May 16, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label May 16, 2024
@rodelgc rodelgc added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants