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

email confirmation message banner #3576

Merged
merged 3 commits into from
May 21, 2020

Conversation

erikdstock
Copy link
Contributor

@erikdstock erikdstock commented May 20, 2020

Related 🔒 Jira Ticket

Low-risk code, so I will merge with one approving review.
This PR adds a simple confirmation message banner for use based on a query parameter in the url on force. Messages are currently hardcoded based on the incoming param - no reliance on the user being present.

Paired with @bhoggard with some input from @yuki24 on this.

Example linked into force (artsy/force#5620):
image

@erikdstock erikdstock requested a review from mzikherman May 20, 2020 22:13
@artsy-peril artsy-peril bot added the Version: Patch Indicates that this PR should have a patch deploy, usually for bug fixes label May 20, 2020
@dleve123
Copy link
Contributor

@erikdstock in the future, let's always request review from at least some members of product-auctions so that there's shared visibility on our team's work. I'll review now; also requesting review from @yuki24

Copy link
Contributor

@dleve123 dleve123 left a comment

Choose a reason for hiding this comment

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

Requesting changes b/c I believe (could be wrong) that we need to update this to handle the other error cases encoded in the Gravity URL parameter (confirmation_message soon to be flashMessage).

src/Components/FlashBanner.tsx Outdated Show resolved Hide resolved
src/Components/FlashBanner.tsx Outdated Show resolved Hide resolved
src/Components/FlashBanner.tsx Outdated Show resolved Hide resolved
@erikdstock erikdstock requested review from dleve123 and yuki24 and removed request for mzikherman May 21, 2020 19:21
already_confirmed: "You have already confirmed your email.",
invalid_token: "Your token is invalid. Please try again.",
blank_token: "No token found. Please try again.",
expired_token: "An error has occurred. Please try again.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be something about how their confirmation token expired, not the general message? Or are we planning to come back to this once we allow people to request the email?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copied these from the eigen pr- happy to change but also wonder if these are meant to be final - in most cases for example 'try again' is not going to be actionable unless there is a 'resend email' button.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed – would much rather tell people to "Contact support@artsymail.com"

name="close"
color={this.props.textColor}
fontSize="16px"
style={{ cursor: "pointer" }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This and the other change to the CtaBanner story were minor bugfixes left over from early explorations. It's possible we don't even use this and/or should remove the changes from the PR but for now I'm thinking we want to prioritize upcoming reaction migration work so am not addressing unless you think it is neccessary @damassi

/* email confirmation token was expired */
| "expired_token"

type BannerMessage = string | React.FC
Copy link
Contributor

Choose a reason for hiding this comment

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

why the union type here? Seems like these are all strings?

Message && (
<Banner dismissable backgroundColor="black100">
<Sans color="white100" size="3" lineHeight={1} weight="medium">
{typeof Message === "string" ? Message : <Message />}
Copy link
Contributor

Choose a reason for hiding this comment

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

very well could be missing something, but these seem to always be strings...

@dleve123
Copy link
Contributor

approving to unblock merge, but still not sure what's up with the type complexity.

@erikdstock erikdstock merged commit 7f6e018 into artsy:master May 21, 2020
@artsyit
Copy link
Contributor

artsyit commented May 21, 2020

🚀 PR was released in v26.49.1 🚀

damassi added a commit to damassi/force that referenced this pull request May 22, 2020
damassi added a commit to artsy/force that referenced this pull request May 22, 2020
…to retire-reaction

* 'retire-reaction' of https://github.com/damassi/force: (23 commits)
  Disable codecov for jest for now
  [Migration] Comment out experiment viewed
  [Migration] Fix tracking event invocation
  Move artsy/reaction#3590
  [Migration] Update coffeescript /v2 paths to relative
  Move artsy/reaction#3587
  Move artsy/reaction#3589
  Move artsy/reaction#3576
  Move artsy/reaction#3572
  Rename .babelrc to babel.config.js
  [Migration] Finish migration
  [Migration] Migrate tests
  [Migration] Rename v2/*.test to .jest
  [Migration] Delete publishing folder
  [Migration] Update import paths
  [Migration] Enable incremental type-checking
  [Migration] Temporarily disable @types for relay
  [Migration] Storybooks
  [Migration] Add relay
  Fix type-check errors in force
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Version: Patch Indicates that this PR should have a patch deploy, usually for bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants