-
Notifications
You must be signed in to change notification settings - Fork 217
feat(fxa-settings): setup signin_bounced in React #15128
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
Conversation
| ); | ||
| } | ||
|
|
||
| async getAccountStatusByEmail(email: string): Promise<any> { |
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.
Originally in Backbone, we would check to make sure the account associated with the email existed. While I opted to simplify the page by omitting this per discussion with @vbudhram, we will need this method.
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.
nit: Does this need to be any or can it be more specific?
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.
Hmmmm I think it can be a boolean actually, checking!
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.
Fixed!
|
|
||
| if (currentUser) { | ||
| setEmail(currentUser.email); | ||
| } else { |
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.
✂️
| ); | ||
| } | ||
|
|
||
| async getAccountStatusByEmail(email: string): Promise<any> { |
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.
nit: Does this need to be any or can it be more specific?
| <SigninBounced email={props.email} canGoBack={props.canGoBack} /> | ||
| </AppLayout> | ||
| <SigninBounced | ||
| emailLookupComplete={true} |
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.
nit: I think we can drop the {true} for boolean props.
Meh, it's a *.stories.* file, maybe we don't care too much. 🤷
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'll clean it up!
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.
fixed!
| canGoBack={true} | ||
| emailLookupComplete={true} |
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.
nit: same here re: {true} boolean props (although this was already using {true} before), per https://arcticicestudio.github.io/styleguide-javascript/rules/react/props.html#boolean-attributes-notation
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.
fixed!
| renderWithRouter( | ||
| <SigninBounced | ||
| email={MOCK_ACCOUNT.primaryEmail.email} | ||
| canGoBack={true} |
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.
nit: can omit {true}, although it is a *.test.* file. 🤷
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.
Fixed!
123e5b5 to
d3599be
Compare
d3599be to
44f05dd
Compare
c322f77 to
36d0d38
Compare
vpomerleau
left a comment
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! 🎉 I've checked out the branch and tested that I do see the React SigninBounced page when navigating to http://localhost:3030/signin_bounced?showReactApp=true after initiating signin, and get redirected to /signup when trying to hit this route after clearing local storage.
I am right in assuming that the actual check of whether an email has bounced will be happening somewhere else? And if so, is there an existing ticket to implement that? I recall that checking for bounced email was marked as a to-do for some pages.
| // clear the session | ||
| // clear the form prefill | ||
| navigate('/signup'); | ||
| logViewEvent(viewName, 'link.create-account', REACT_ENTRYPOINT); |
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 think this is a separate issue (because I've spotted this in other pages while working on FXA-7100), but the emitted metrics event doesn't have a payload.
What I've understood from going through the code is that the user is redirected to the |
| # linkExternal is a link to a mozilla support | ||
| signin-bounced-help = If this is a valid email address, <linkExternal>let us know</linkExternal> and we can help unlock your account. | ||
| # supportButton is button which logs the user's action and navigates them to mozilla support | ||
| signin-bounced-help = If this is a valid email address, <supportButton>let us know</supportButton> and we can help unlock your account. |
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.
Is it necessary to change <linkExternal> here? If so, we'll need to update the ID for signin-bounced-help to trigger updates for the tag change.
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.
ohhh I see -- the HTML component which is being used had to be changed, so I changed the name to be reflective of that, but I can leave it as it was (it does still function as if it were an external link, it just also logs some metrics before redirecting the user.) Does changing the HTML component need to trigger changes (if we don't change the variable?)
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.
The short answer is, if its purely a change on the backend and on the there doesn't appear to be any change to the end user, then we wouldn't need to update the string.
If the context as it appears to the end-user doesn't change - as in <linkExternal>/<supportButton> essentially look/function the same on the surface, then we wouldn't need to trigger changes. However, if for example the change here makes the text look like a button instead of a link, then perhaps it would be wise to update the variable and ID.
Variable name changes for existing strings end up requiring a new translation (but text is essentially the same as before), though likely a fairly simple update it still ends up requiring a translator to look at. For some locales, it could ultimately end up in fallback text appearing for some time until a team has the bandwidth to look at it.
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'll just set the var back to what it was in that case -- there will be no change to the appearance of the component on the page
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.
Thank you @bcolsson !
Because: * We're moving the React components to their real routes and wiring them up to receive data This commit: * Adds signin_bounced into the React app Closes #FXA-6489
36d0d38 to
9ef8616
Compare
Because:
This commit:
Closes #FXA-6489
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Other information (Optional)
Still needs metrics!!