Skip to content
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 - Log in - Promo Colors are changing each time the user writes a new character for new password #5913

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

rushatgabhane
Copy link
Member

@rushatgabhane rushatgabhane commented Oct 16, 2021

Details

We were getting a random backgroundStyle everytime the component SignInPageLayout rendered.

const SignInPageLayoutWide = (props) => {
const backgroundStyles = [styles.backgroundBlue, styles.backgroundGreen, styles.backgroundOrange, styles.backgroundPink];
const backgroundStyle = backgroundStyles[_.random(0, 3)];
return (

So I just moved it outside of SignInPageLayoutWide function.

const backgroundStyles = [styles.backgroundBlue, styles.backgroundGreen, styles.backgroundOrange, styles.backgroundPink];
const backgroundStyle = backgroundStyles[_.random(0, 3)];
const SignInPageLayoutWide = props => (

Fixed Issues

$ #5912

Tests / QA

  1. Navigate to log in screen
  2. Enter a new email
  3. Look for the validation mail on email inbox
  4. Change link to localhost/setpassword/token/id
  5. Write some characters in password fields
  • Verify that the background color doesn't change on every keystroke.
  • Verify that the background color is random on refresh.

Tested On

  • Web
  • Desktop

Screenshots

Web

Did a refresh to demonstrate that the colors are random on refresh.

Screencast.from.16-10-21.01_17_06.PM.+03.mp4

Desktop

@rushatgabhane rushatgabhane requested a review from a team as a code owner October 16, 2021 10:25
@MelvinBot MelvinBot requested review from Jag96 and removed request for a team October 16, 2021 10:25
@rushatgabhane rushatgabhane changed the title fix random bg color for every re-render Fix - Log in - Promo Colors are changing each time the user writes a new character for new password Oct 16, 2021
@github-actions
Copy link
Contributor

⚠️ ⚠️ Heads up! This pull request has the CP Staging label. ⚠️ ⚠️
Merging it will cause it to be immediately deployed to staging, even if the open StagingDeployCash deploy checklist is locked.

Copy link
Contributor

@Jag96 Jag96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, adding CP Staging label to resolve deploy blocker

@Jag96 Jag96 merged commit ebf2c53 into Expensify:main Oct 18, 2021
github-actions bot pushed a commit that referenced this pull request Oct 18, 2021
Fix - Log in - Promo Colors are changing each time the user writes a new character for new password

(cherry picked from commit ebf2c53)
@OSBotify
Copy link
Contributor

🚀 Cherry-picked to staging by @Jag96 in version: 1.1.8-3 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 failure ❌
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.8-9 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @Jag96 in version: 1.1.8-10 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.10-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants