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

refactor: [M3-6285] - SRC > Features > ToastNotifications #9555

Merged
merged 7 commits into from
Aug 24, 2023
Merged

refactor: [M3-6285] - SRC > Features > ToastNotifications #9555

merged 7 commits into from
Aug 24, 2023

Conversation

tyler-akamai
Copy link
Contributor

@tyler-akamai tyler-akamai commented Aug 17, 2023

Description 📝

SRC > Features > ToastNotifications MUI v5 migration

Toast Notifications that don't work in production (I will be adding a ticket for these):

  • Firewall notifications (enable, disable, delete, device add, device removed)
  • Linode configurations (create, delete)

Also, sorry for the inconsistent preview pictures, I had to quickly snap them before they went away. 📸 🏃‍♂️💨

Major Changes 🔄

  • Converted class component to functional

Preview 📷

Before After
Screenshot 2023-08-17 at 12 26 48 PM Screenshot 2023-08-17 at 12 30 08 PM
Screenshot 2023-08-17 at 12 27 54 PM Screenshot 2023-08-17 at 12 28 50 PM
Screenshot 2023-08-17 at 12 28 15 PM Screenshot 2023-08-17 at 12 29 34 PM
Screenshot 2023-08-17 at 12 26 14 PM Screenshot 2023-08-17 at 12 29 50 PM

How to test 🧪

Test the following toast notifications:

  1. Volume (create, detach, attach, delete) - http://localhost:3000/volumes
  2. Disk (imagize, resize)
  3. Image (upload, delete) - http://localhost:3000/images
  4. Linode snapshot
  5. Backups restore
  6. Linode (clone, migrate, resize) - http://localhost:3000/linodes
  7. Longview create - http://localhost:3000/longview

@tyler-akamai tyler-akamai marked this pull request as ready for review August 17, 2023 16:53
class ToastNotifications extends React.PureComponent<WithSnackbarProps, {}> {
componentDidMount() {
this.subscription = events$
export const ToastNotifications = withSnackbar((props: WithSnackbarProps) => {
Copy link
Member

Choose a reason for hiding this comment

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

We can use the useSnackbar hook instead of using this withSnackbar wrapper.

@bnussman-akamai bnussman-akamai added Add'tl Approval Needed Waiting on another approval! and removed Ready for Review labels Aug 23, 2023
@bnussman-akamai bnussman-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Aug 24, 2023
@tyler-akamai tyler-akamai merged commit 0ee5152 into linode:develop Aug 24, 2023
@tyler-akamai tyler-akamai deleted the M3-6285-Toast-Notifications-CSS-Migration branch September 5, 2023 15:42
corya-akamai pushed a commit to corya-akamai/manager that referenced this pull request Sep 6, 2023
* initial migration changes

* Added changeset: SRC > Features > ToastNotifications MUI v5 migration

* removed default export

* updated useEffect dependency array

* deleted unnecessary comment

* replaced ToastNotification withSnackbar to useSnackbar

---------

Co-authored-by: TylerWJ <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants