-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove clipped texts throughout the app when device font size is increased #10312
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Bug: Screen.Recording.2022-08-10.at.9.34.06.PM.mov |
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.
Bug has been found while testing
Signed-off-by: osama256 <51829206+osama256@users.noreply.github.com>
@osama256 Still the text |
@osama256 bump |
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.
Seems conflicts again @osama256 |
Bug: Drop down arrow is not centered for larger text in iOS & Android |
This is the PR that I've been testing for a longer period, every time I am ready to approve I am running into a new bug which is the reason this PR is tested for a longer period. I requesting that this PR should be treated as a feature rather than a bug. I believe there will be no deploy blocker, but there is the slightest chance there may be a breakage which should be treated as new bugs. Because this PR more or less has an impact on the whole app, which require more time as more eyes notice small bugs because these bugs are really easy to miss! Once the last found bug here is fixed let's proceed with merging this one after testing a bit. Please share your thoughts, thanks! |
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.
@Santhosh-Sellavel sorry for the delay, I'm working on it. |
src/styles/styles.js
Outdated
@@ -804,7 +804,7 @@ const styles = { | |||
}, | |||
picker: (disabled = false, error = false, focused = false) => ({ | |||
iconContainer: { | |||
top: variables.pickerIconTop, | |||
top: Math.round(variables.inputHeight * 0.5) - 10, |
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.
This is weird, care to explain this?
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.
TO vertically center a child in its parent we need padding top = half parent height - half child height, in our case half input height = 26 and half icon height = 10 so we need padding top = 16, but because the input height increases when the device font size increases so instead of using a hard coded value we can make it dynamic.
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.
This calculation, itself seems off can we move the computation variables at least?
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.
Do you mean keeping top: variables.pickerIconTop
in styles.js
and in variables.js file using this pickerIconTop: (getValueUsingPixelRatio(52, 72) * 0.5) - 10
?
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariScreen.Recording.2022-12-12.at.12.26.28.AM.movDesktopScreen.Recording.2022-12-12.at.12.20.43.AM.moviOSScreen.Recording.2022-12-12.at.12.04.54.AM.movAndroidScreen.Recording.2022-12-12.at.12.03.26.AM.mov |
I find these two bugs while testing now On Normal size, g is getting clipped here (I feel this could be not related to this but looks like well within scope too)MainScreen.Recording.2022-12-02.at.11.34.35.PM.movOn this branchScreen.Recording.2022-12-02.at.11.35.13.PM.movSearch placeholder is not centered properly in larger sizesOkay this issue exists for normal font size too I will report it if not reported. Report here |
@pecanoro what should we do with the first issue, should we expect to solve it here? As I see It's not related to what we are solving here, as the issue occurs only when the field has focus. So it might be irrelevant too, but I want to hear your thoughts too. Thanks! |
Let me retest that, does it happen in all platforms or only iOS? |
The first issue iOS only occurs on the main branch also for normal font size and the second issue is on all platforms I reported already in slack. |
That happens even on the main branch, so I would say pretty unrelated. Also, I feel that is a regression of something else. |
Ok, I am making the decision of merging since those bugs were not introduced by this PR and it's out of scope, this one is handling an increase or decrease in size. @Santhosh-Sellavel If you can complete the list with videos it would be great even though @luacmartins already did it. If we wait longer, this PR will never get merged since we tend to get conflicts. |
I'll definitely do that, note story book is failing Rajat already reported in slack. Technically it would not have any effect, as this PR mainly for Native devices |
✋ 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 production by @chiragsalian in version: 1.2.38-6 🚀
|
There are a couple of inconsistencies in this PR which seems to have caused two issues.
This PR should have been reviewed by the Design team. normal line height is 18 in our app, not 16. |
@parasharrajat Thanks for mentioning these issues here, but it seems these issues are not produced by this PR, and here is why.
And we used |
👋 Hi all, we've identified this PR as at least part of the cause for #13336. Since this modified styles for generic components, more detailed steps than "Verify there is no Text clipping throughout the app" would've been good to prevent bugs from slipping through. Discussion on steps to be taken to ensure these bugs don't slip through can be found here cc: @mollfpr |
|
@osama256 Have you join |
@NikkiWines We discussed the clipped g here, I don't think it is a regression 😅 it was already on main before we merged the PR as @Santhosh-Sellavel pointed out here. |
Though the emoji problem getting clipped on the top part could be coming from this one, but I haven't double checked. |
@pecanoro Where is it? |
Details
This PR gives you the ability to increase or decrease the device font size without seeing clipped texts throughout the app.
the App behavior will be :
PixelRatio.getFontScale() * default value > max value ? max value : default value * PixelRatio.getFontScale()
the App font size will not increase because any increasing above this level will show clipped texts throughout the app.Fixed Issues
$ #7541
Tests
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
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)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
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)QA Steps
Screenshots
Web
web.mov
Mobile Web
mweb.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov