Skip to content

Added Toast to Update User Profile Form#820

Merged
vnugent merged 4 commits into
OpenBeta:developfrom
hawkishpolicy:develop
May 12, 2023
Merged

Added Toast to Update User Profile Form#820
vnugent merged 4 commits into
OpenBeta:developfrom
hawkishpolicy:develop

Conversation

@hawkishpolicy

Copy link
Copy Markdown
Contributor

Removed old Snackbar component.
Removed Snackbar div
Removed old justSubmitted and setJustSubmitted state
Added Toast.success for successful profile update
Added Toast.error for update failure
updated psuedo-code

@vercel

vercel Bot commented May 10, 2023

Copy link
Copy Markdown

@hawkishpolicy is attempting to deploy a commit to the openbeta-dev Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented May 10, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
open-tacos ✅ Ready (Inspect) Visit Preview May 11, 2023 6:37pm

setProfile(profile)
// Set the flag that indicates the user just submitted a change
setJustSubmitted(true)
// Removed old state for Snackbar

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you remove this reference to the Snackbar component? I don't think it's useful to know it used to be here.

@clintonlunn

Copy link
Copy Markdown
Collaborator

Thanks for the contribution. Just a few verbage changes I would suggest. If leaving a comment, it might be more useful to say what it does instead of "Added..[thing]", "Removed..[thing]".

@hawkishpolicy hawkishpolicy temporarily deployed to Preview May 11, 2023 00:15 — with GitHub Actions Inactive
@hawkishpolicy hawkishpolicy requested a review from clintonlunn May 11, 2023 11:59
@hawkishpolicy hawkishpolicy temporarily deployed to Preview May 11, 2023 15:34 — with GitHub Actions Inactive
@clintonlunn

Copy link
Copy Markdown
Collaborator

@hawkishpolicy Sorry to go back on this, but I'm not sure how much those comments are adding, the things you wrote seem to pretty self explanatory and I would do minimal comments at most. Also, we may change the behavior in the future to move to the toast to a different position, so telling us the position of it currently might not make sense. We could just go find where we defined this toast initially to see what options it has.

Also, can you check to make sure the Snackbar.tsx component is no longer used anywhere else, and then remove it and all references to it. We can use react-toastify completely in its place.

Again, thanks for taking this on! Lemme know if you've got any other questions!

@hawkishpolicy

hawkishpolicy commented May 11, 2023 via email

Copy link
Copy Markdown
Contributor Author

@hawkishpolicy

hawkishpolicy commented May 11, 2023 via email

Copy link
Copy Markdown
Contributor Author

@clintonlunn

Copy link
Copy Markdown
Collaborator

@hawkishpolicy You're right. It was a little bit late when I wrote up that issue 😅

when I said

I propose replacing the Snackbar component with the toast.info or toast.success function provided by the react-toastify library.

I meant removing Snackbar component entirely because it's not needed anymore, BUT I neglected to say that more explicitly.

These changes look good to me. @vnugent good to merge?

@vnugent vnugent merged commit 32d1530 into OpenBeta:develop May 12, 2023
@vnugent

vnugent commented May 12, 2023

Copy link
Copy Markdown
Contributor

@all-contributors add @hawkishpolicy for code

@allcontributors

Copy link
Copy Markdown
Contributor

@vnugent

I've put up a pull request to add @hawkishpolicy! 🎉

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.

Replace Snackbar component with react-toastify notification in ProfileEditForm.tsx

3 participants