Fix mobile home background SVG opacity#21745
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@Julesssss looks like this was your issue, added you as a reviewer. Let me know if you need me to review instead and I'll reassign! |
|
@waterim Can you please add screenshots for ALL the platforms? Also, can you please update the test section to mention that the user should open the login screen? |
|
@allroundexperts Comment updated. |
According to our guidelines, the screenshots for all the platforms are required. |
|
@allroundexperts After verifying mobile Safari I found that opacity is not applying from updated SVG. With a new commit I added Platform specific check to display updated SVG only on Android. All platforms are accepting opacity in the same way except Android. |
| scrollViewRef.current.scrollTo({y: 0, animated}); | ||
| }; | ||
|
|
||
| const MobileBackgroundImage = Platform.OS === 'android' ? SignInHeroBackgroundImageMobileAndroid : SignInHeroBackgroundImageMobile; |
There was a problem hiding this comment.
@waterim We never add platform specific code inline like this. We always create a separate file which gets loaded during the build process. You can easily find examples of such files if you search the code.
There was a problem hiding this comment.
@allroundexperts Okay, will change it, thank you
There was a problem hiding this comment.
@allroundexperts Do you mean to create a separate component with 2 files, one is default and one with .android extension and move there this backgroundImage?
There was a problem hiding this comment.
Instead of creating an android specific file for this whole component, I think we can create a file that just re-exports the svg and use that in this component. This way, we will avoid the component code duplication.
There was a problem hiding this comment.
Agree with the above. Also, is there a reason we can't use the new SVG for all platforms?
There was a problem hiding this comment.
@Julesssss on web mobile safari new SVG is working wrong, same as Android before changes, unfortunately
There was a problem hiding this comment.
Accidentally added only podfile.lock. Reverted that commit.
|
@allroundexperts Everything is ready for a review. |
| import themeColors from '../../../styles/themes/default'; | ||
| import SignInHeroBackgroundImage from '../../../../assets/images/home-background--desktop.svg'; | ||
| import SignInHeroBackgroundImageMobile from '../../../../assets/images/home-background--mobile.svg'; | ||
| import MobileBackgroundImage from './MobileBackgroundImage'; |
There was a problem hiding this comment.
I think we can improve this further. In the src/pages/signin/SignInPageLayout/MobileBackgroundImage/index.js we can return the correct image based on the screen width. This way, we'll have to import a single file in this component that will work on all screen sizes and platforms.
| <View style={styles.signInPageHeroCenter}> | ||
| <SignInHeroBackgroundImage | ||
| <BackgroundImage | ||
| isSmallScreen={props.isSmallScreenWidth} |
There was a problem hiding this comment.
I think we're already checking for small screen above. As such, we can just add the following:
<BackgroundImage
isSmallScreen
.
.
/>
| <View style={[styles.flex1, styles.flexColumn, StyleUtils.getMinimumHeight(Math.max(variables.signInContentMinHeight, containerHeight))]}> | ||
| <SignInHeroBackgroundImageMobile | ||
| <BackgroundImage | ||
| isSmallScreen={props.isSmallScreenWidth} |
There was a problem hiding this comment.
Just add isSmallScreen={false}
|
Solid work @waterim 🙌 🙌 |
Reviewer Checklist
Screenshots/VideosDesktopScreen.Recording.2023-06-30.at.12.31.19.AM.mov |
|
@allroundexperts Updated prop, thank you |
|
@waterim Can you please make sure that you have put in your proposal link correctly in the PR description? That is important for our automation to work. Normally, if they are entered correctly, the related reviewers are automatically assigned. Here's how a correct link should look like: Please update your description such that it matches our standard way. |
allroundexperts
left a comment
There was a problem hiding this comment.
Looks good and 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/Julesssss in version: 1.3.36-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.36-5 🚀
|
| <DesktopBackgroundImage | ||
| pointerEvents={props.pointerEvents} | ||
| width={props.width} | ||
| /> |
There was a problem hiding this comment.
Hi, this PR caused a bug - #23137 (comment)
We should have passed styles as a prop for desktop too






Details
Fixed Issues
$ #20829
PROPOSAL: #20829 (comment)
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web - Chrome
Web - Safari
Mobile Web - Chrome
Mobile Web - Safari
iOS
Android
Desktop