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
Conversation
}, 100) | ||
stepsRefs[indexToExpand].expand(() => scrollToStep()) | ||
}, | ||
__TEST__ ? 0 : 100 |
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 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
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.
Looks great! 👍
@@ -55,6 +55,7 @@ export const ArtistAutosuggest: React.FC<ArtistAutosuggestProps> = ({ | |||
icon={<SearchIcon width={18} height={18} />} | |||
onChangeText={onArtistSearchTextChange} | |||
value={artist} | |||
autoCorrect={false} |
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.
👏
src/app/Scenes/SellWithArtsy/SubmitArtwork/ArtworkDetails/ArtworkDetails.tsx
Outdated
Show resolved
Hide resolved
// and when they do we want to continue the tracking with the new email | ||
const [desiredEmail, setDesiredEmail] = useState(userEmail) | ||
useEffect(() => { | ||
fetchUserContactInformation().then((me) => { |
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.
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(() => {
.
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.
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...
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.
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 effectuseEffect(() => {.
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.
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.
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
…orkDetails.tsx Co-authored-by: Ole <ole.richter91@gmail.com>
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
To the reviewers 👀
Changelog updates
Changelog updates
Cross-platform user-facing changes
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.