-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 styles for wallet money badge which is not center vertically #27137
Fix styles for wallet money badge which is not center vertically #27137
Conversation
@robertKozik Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@robertKozik But I also tested all devices without a specified line height What do you think about it ? |
Could you please provide a description of how the issue appears on Android? This would be very helpful for me to understand the problem in detail. |
@robertKozik |
src/styles/styles.js
Outdated
@@ -32,6 +33,8 @@ import Colors from './colors'; | |||
// touchCallout is an iOS safari only property that controls the display of the callout information when you touch and hold a target | |||
const touchCalloutNone = Browser.isMobileSafari() ? {WebkitTouchCallout: 'none'} : {}; | |||
|
|||
const lineHeightBadge = getPlatform() === CONST.PLATFORM.WEB ? {lineHeight: variables.lineHeightXSmall} : {lineHeight: variables.lineHeightNormal}; |
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.
Previously It was safari-specific (It causes issues on Android) as far as I remember. Why we are changing it to be web-only then? chrome has no problem with centering text 🤔
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.
Yes
I originally made changes for safari
But then I re-watched the video in ticket
And I noticed that the tester had chrome
But chrome works fine for me though.
So I decided it would be better to set these styles for the entire web.
One question, as I want to be sure why it's web-only rather than safari-only 😉 |
Reviewer Checklist
Screenshots/Videos |
@robertKozik Or if you also don't have the problem in chrome |
Sorry for keeping you waiting - I think you won't have to change anything. I'll come back today and fill the rest of the checklist |
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.
Looks OK. Let's push this forward
src/styles/styles.js
Outdated
@@ -31,6 +32,8 @@ import Colors from './colors'; | |||
// touchCallout is an iOS safari only property that controls the display of the callout information when you touch and hold a target | |||
const touchCalloutNone = Browser.isMobileSafari() ? {WebkitTouchCallout: 'none'} : {}; | |||
|
|||
const lineHeightBadge = getPlatform() === CONST.PLATFORM.WEB ? {lineHeight: variables.lineHeightXSmall} : {lineHeight: variables.lineHeightNormal}; |
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.
Can we add a comment here about why we are adding this line? Ideally we discourage platform specific code and so once this is fixed upstream we can ideally come back and remove these changes
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.
@thienlnam, done .
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.
As both @thienlnam and I agree that we should address the safari in specific (per accepted proposal) could you change this check to consist of Browser.isSafari
?
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.
@robertKozik, done)
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.71-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.71-12 🚀
|
Details
Since the lineHeight does not work correctly on safari, it was decided to replace it with a value equal to fontSize
Fixed Issues
$ #26308
PROPOSAL: #26308 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Chrome
Safari
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android