-
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
fix: update height for text container #19653
Conversation
@amyevans @rushatgabhane One of you needs to 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] |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-05-30.at.21.23.08.movMobile Web - ChromeWhatsApp.Video.2023-05-30.at.21.28.57.mp4Mobile Web - SafariScreen.Recording.2023-05-30.at.21.24.26.moviOSScreen.Recording.2023-05-30.at.21.20.33.movAndroidWhatsApp.Video.2023-05-30.at.21.28.55.mp4 |
src/components/MagicCodeInput.js
Outdated
<View | ||
style={[ | ||
styles.textInputContainer, | ||
{height: styles.magicCodeInputContainer.minHeight - styles.textInputContainer.borderBottomWidth}, |
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.
@dukenv0307 inline styles are not allowed. Could you please create a util function for it.
Thanks!
App/contributingGuides/STYLING.md
Line 3 in 12d2f3c
## Where to Define Styles |
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.
@rushatgabhane Because this style only applies to a single-use component. So I think we should define it in component as the guideline
## When to Create a New Style
If we need some minimal set of styling rules applied to a single-use component then it's almost always better to use an array of helper styles rather than create an entirely new style if it will only be used once. Resist the urge to create a new style for every new element added to a screen. There is a very good chance the style we are adding is a "single-use" style.
// Bad - Since we only use this style once in this component
const TextWithPadding = props => (
<Text style={styles.textWithPadding}>
{props.children}
</Text>
);
// Good
const TextWithPadding = props => (
<Text
style={[
styles.p5,
styles.noWrap,
]}
>
{props.children}
</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.
@dukenv0307 good point! But it only applies when we're creating a custom style using the existing styles, and no math is involved.
But I'm suggesting to create a function that returns a style in StyleUtils
file
Because I don't think we do that anywhere in the code {height: x}
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.
@rushatgabhane Thanks, Just updated
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!
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.
@amyevans LGTM!
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.
Code looks good, test/QA steps look good, tests well 🚀
✋ 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/amyevans in version: 1.3.21-0 🚀
|
QA Steps
Devices:
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.21-2 🚀
|
Details
We need to make sure the dash is included in the TextInput height so that when the TextInput is fully visible, the dash will also be visible.
Fixed Issues
$ #19387
PROPOSAL: #19387 (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
Mobile Web - Chrome
348465459_6234288053355215_7671907135518787479_n.mp4
Mobile Web - Safari
Screen.Recording.2023-05-26.at.10.59.32.mov
Desktop
iOS
Uploading Screen-Recording-2023-05-26-at-10.55.57.mp4…
Android
Screen.Recording.2023-05-26.at.11.34.14.mov