-
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
Login container center issue fixed #10158
Conversation
I feel bad for the line length and the controls getting longer. This is how I made my first commit to stay true to my proposal.
function call :
|
@metehanozyurt Good call, I too thought the same. @sketchydroide If you feel otherwise let us know thanks. |
@metehanozyurt Any update? |
I updated the code. I thought I should wait for a second confirmation, sorry I misunderstood @Santhosh-Sellavel. |
src/styles/StyleUtils.js
Outdated
if (isSmallScreenWidth) { | ||
return styles.signInPageNarrowContentMargin; | ||
} | ||
if (!isMediumScreenWidth || (isMediumScreenWidth && windowHeight < variables.minHeightToShowGraphics)) { | ||
return styles.signInPageWideLeftContentMargin; | ||
} | ||
return {}; | ||
} |
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 seems like an error can you recheck it, please?
For isSmallScreenWidth
&& styles.signInPageWideLeftContentMargin
also should apply because !isMediumScreenWidth
can be isSmallScreenWidth = true
right?
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.
Ohh You are absolutely right. I'm editing it as a spread operator in case other style types may come in the future.
If you disagree with this opinion, I can use the assignment operator right away.
Thank you so much for your warning of my mistake 🙏 .
I retake videos and screenshots immediately.
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 you share both snippets for better understanding, 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.
version 1 :
let marginStyle = {};
if (isSmallScreenWidth) {
marginStyle = {...marginStyle, ...styles.signInPageNarrowContentMargin};
}
if (!isMediumScreenWidth || (isMediumScreenWidth && windowHeight < variables.minHeightToShowGraphics)) {
marginStyle = {...marginStyle, ...styles.signInPageWideLeftContentMargin};
}
return marginStyle;
version 2:
let marginStyle = {};
if (isSmallScreenWidth) {
marginStyle = styles.signInPageNarrowContentMargin;
}
if (!isMediumScreenWidth || (isMediumScreenWidth && windowHeight < variables.minHeightToShowGraphics)) {
marginStyle = styles.signInPageWideLeftContentMargin;
}
return marginStyle;
If there is a possibility of additional style information, I think the 1st method may be more useful in the future.
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.
Version 2 is still invalid
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'm not writing to say that version 2 is beautiful. Version 2 also works because it has one variable. I think version 1 is more consistent for the future, of course.
signInPageNarrowContentMargin: {
marginTop: '40%',
},
signInPageWideLeftContentMargin: {
marginTop: '44.5%',
},
@@ -55,8 +55,7 @@ const SignInPageContent = props => ( | |||
<LoginKeyboardAvoidingView | |||
behavior="position" | |||
contentContainerStyle={[ | |||
props.isSmallScreenWidth ? styles.signInPageNarrowContentMargin : {}, | |||
!props.isMediumScreenWidth ? styles.signInPageWideLeftContentMargin : {}, | |||
StyleUtils.getLoginContainerMarginStyles(props), |
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.
@metehanozyurt
On second thoughts, Let's revert the last two commits, just stick to the existing one itself.
props.isSmallScreenWidth ? styles.signInPageNarrowContentMargin : {},
!props.isMediumScreenWidth || (props.isMediumScreenWidth && props.windowHeight < variables.minHeightToShowGraphics) ? styles.signInPageWideLeftContentMargin : {},
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'm doing it right now. Thanks.
@metehanozyurt Can you resolve conflicts? |
PR Reviewer 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.
@metehanozyurt
Tests well waiting to resolve conflicts!
cc: @sketchydroide
I'll wait until you aprove as well @Santhosh-Sellavel and then we can merge 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.
LGTM! @sketchydroide
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Details
Login container center issue for small screen size fixed.
Fixed Issues
$ #9509
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
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** 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-login-container-Screen-Recording-2022-07-30-at-09.49.28.mp4
Mobile Web
Desktop
desktop-login-container-Screen-Recording-2022-07-30-at-09.52.08.mp4
iOS
Android