-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Conversation
- Add min-width to container for better responsiveness - Adjust padding for smaller screens - Update font size and text wrapping for banner
@@ -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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in f6bd20e
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. 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. |
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: |
There was a problem hiding this 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); |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests well, LGTM! 🚢
Submission Review Guidelines:
Changes proposed in this Pull Request:
p1715675706047389-slack-C01SFMVEYAK
Fix coming soon page not displaying correctly on mobile view
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 usedtext-wrap: balance
in the PR because I found we usedtext-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 textBefore:
Samsung Galaxy S8+ - without font size adjustment
Samsung Galaxy S8+ - with font size adjustment
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
launch-your-store
feature flag enabled.Screen.Recording.2024-05-15.at.11.43.32.mov
Changelog entry
Significance
Type
Message
Comment