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

Pog, IconButton: bugfix for rotated icons on iPhone #2730

Merged
merged 1 commit into from Mar 15, 2023

Conversation

dangerismycat
Copy link
Contributor

This is a weird one.

To support RTL languages, we rotate some icons by 180 rather than use a different SVG. On mobile Safari (device only!), this presents a problem:
Arabic

Apparently this is a known bug on mobile Safari going back to at least 2015 (!) and still not fixed. Actually, it's kind of a combination of two bugs:

Though it wouldn't be a shippable solution, I explored the "90° problem" by adjusting our rotation to 179°. The results are…not great:
image0
Screen Shot 2023-03-14 at 5 39 06 PM

It turns out the real solution is to add the CSS property perspective to the surrounding div — something usually used with 3-D objects ¯_(ツ)_/¯
image1
Screen Shot 2023-03-14 at 5 38 03 PM

Therefore adding this property to Pog should solve this issue for IconButton and (hopefully) all other places where it might arise.

Links

@dangerismycat dangerismycat added the patch release Patch release label Mar 15, 2023
@dangerismycat dangerismycat marked this pull request as ready for review March 15, 2023 01:01
@dangerismycat dangerismycat requested a review from a team as a code owner March 15, 2023 01:01
@netlify
Copy link

netlify bot commented Mar 15, 2023

Deploy Preview for gestalt ready!

Name Link
🔨 Latest commit aa280ea
🔍 Latest deploy log https://app.netlify.com/sites/gestalt/deploys/641118dc3faf540008ac44d7
😎 Deploy Preview https://deploy-preview-2730--gestalt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@dangerismycat dangerismycat merged commit 681447e into pinterest:master Mar 15, 2023
14 checks passed
@dangerismycat dangerismycat deleted the icon-button-bugfix branch March 15, 2023 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch release Patch release
Projects
None yet
1 participant