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

feat: remove contact information step from SWA flow #10155

Merged
merged 2 commits into from May 2, 2024

Conversation

MounirDhahri
Copy link
Member

@MounirDhahri MounirDhahri commented Apr 25, 2024

This PR resolves ONYX-901

Description

This PR removes the contact information as step 1 from the SWA flow.

Fixing those tests was really painful.

Screen.Recording.2024-04-25.at.16.05.23.mov

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • remove contact information from SWA flow - mounir

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

}, 100)
stepsRefs[indexToExpand].expand(() => scrollToStep())
},
__TEST__ ? 0 : 100
Copy link
Member Author

Choose a reason for hiding this comment

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

i prefer to use jest.useFaketimers usually but in this case, there were many components that have time logic and I couldn't pin point them all so I am just setting this to 0 to make sure it happens fast and not need to wait

@ArtsyOpenSource
Copy link
Contributor

ArtsyOpenSource commented Apr 25, 2024

This PR contains the following changes:

  • Cross-platform user-facing changes (remove contact information from SWA flow - mounir)

Generated by 🚫 dangerJS against 2c2fcf0

Copy link
Contributor

@olerichter00 olerichter00 left a comment

Choose a reason for hiding this comment

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

Looks great! 👍

@@ -55,6 +55,7 @@ export const ArtistAutosuggest: React.FC<ArtistAutosuggestProps> = ({
icon={<SearchIcon width={18} height={18} />}
onChangeText={onArtistSearchTextChange}
value={artist}
autoCorrect={false}
Copy link
Contributor

Choose a reason for hiding this comment

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

👏

// and when they do we want to continue the tracking with the new email
const [desiredEmail, setDesiredEmail] = useState(userEmail)
useEffect(() => {
fetchUserContactInformation().then((me) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use useFragment here instead? I believe this would make the code easier, and we could get rid of the extra state (const [userEmail, setUserEmail] = useState("")) and the effect useEffect(() => {.

Copy link
Contributor

Choose a reason for hiding this comment

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

And I wonder if we should remove the contact information entirely from the submission in a next step. If we take the contact information directly from the user from Gravity, we don't need this duplication...

Copy link
Member Author

Choose a reason for hiding this comment

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

Could we use useFragment here instead? I believe this would make the code easier, and we could get rid of the extra state (const [userEmail, setUserEmail] = useState("")) and the effect useEffect(() => {.

I should have probably explained why I did that here. My main rationale was to avoid any loading time in the submit flow and immediately get the users to start typing without giving them a reason to quit. I don't know if those 200/300ms would have made a big difference, but since it's avoidable - and we won't require any data visible for the UI, I figured out why not fetch the data separately.

Copy link
Member Author

Choose a reason for hiding this comment

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

And I wonder if we should remove the contact information entirely from the submission in a next step. If we take the contact information directly from the user from Gravity, we don't need this duplication...

Smart, this will be definitely our best course of action in the future. I will create a ticket to update Convection UI to pull the data from Gravity instead. https://artsyproduct.atlassian.net/browse/ONYX-937

dariakoko
dariakoko previously approved these changes May 2, 2024
…orkDetails.tsx

Co-authored-by: Ole <ole.richter91@gmail.com>
@MounirDhahri MounirDhahri added the Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green label May 2, 2024
@artsy-peril artsy-peril bot merged commit 50224e8 into main May 2, 2024
7 checks passed
@artsy-peril artsy-peril bot deleted the chore/update-first-step branch May 2, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira Synced Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants