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

Added MUI alerts to replace browser alerts ⚠️ #57

Merged
merged 6 commits into from
Oct 3, 2022

Conversation

warmachine028
Copy link
Contributor

@warmachine028 warmachine028 commented Oct 3, 2022

Use MUI Alerts 📐

Changes Made

  • Used Material UI to add Snackbar Component

  • Added Snackbar to repalce browser alerts

    • Log In
    • Sign Up
    • Image Upload Error
    • Sign In Error
    • Firebase Error
  • Replaced all alerts and error messages and with Snackbar Notifications

Screenshots:

  • Logging In
    logged in

  • Logging Out
    logout

  • Error Messages
    error

  • Creating Post
    193544547-8cf9be78-34b5-4fd8-8364-60414cf82ad1

@mathiasayivor
Copy link
Contributor

@warmachine028 Instead of creating a custom component, you might want to consider notistack, which has an imperative API and makes it easy to display snackbars, without having to handle their open/close state

@warmachine028
Copy link
Contributor Author

warmachine028 commented Oct 3, 2022

I have already closed 2 PRs regarding this issue. @narayan954 said that the notification was alright but it had issues in the merge conflicts. So I had to scrap out everything and begin from the start. Besides it was clearly mentioned in the issue #51 to use MUI alerts so I did it. Using notistack means I have to start again from scratch which seems quite cumbersome at this point

@mathiasayivor
Copy link
Contributor

mathiasayivor commented Oct 3, 2022

I understand your pain, but notistack is actually quite easy to implement IMO.
Using your current solution means we'd have to be prop-drilling or repeating code if we need to re-use the snackbar in other components.
I'd try implementing it in your fork so you can proceed if that's cool with you.

@warmachine028
Copy link
Contributor Author

I understand your pain, but notistack is actually quite easy to implement IMO. Using your current solution means we'd have to be prop-drilling or repeating code if we need to re-use the snackbar in other components. I'd try implementing it in your fork so you can proceed if that's cool with you.

Sure you can try implementing in my fork

Copy link
Owner

@narayan954 narayan954 left a comment

Choose a reason for hiding this comment

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

Everything's fine and thanks a lot for taking the step!, Just a question related to prompt when signing out
image
Can this be done using notistack as well ?

@warmachine028
Copy link
Contributor Author

This can be done using a dialogBox

@narayan954
Copy link
Owner

This can be done using a dialogBox

oh okayy

@narayan954 narayan954 merged commit 0042ffd into narayan954:master Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants