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

Fix: Revert notification changes #3763

Merged
merged 4 commits into from
Jan 6, 2025
Merged

Conversation

Mikehrn
Copy link
Contributor

@Mikehrn Mikehrn commented Jan 3, 2025

  • Revert back to old notification system of only triggering one notification at the time
  • Add option to hide toasts in compostables, and handle them in the parent in the case of server invites

@Mikehrn Mikehrn marked this pull request as ready for review January 6, 2025 11:21
})

isOpen.value = false
} catch {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The change of any of them failing is slim, main cause probably network errors, as validation is already done, but this adds at least some basic error handling in the case this happens

@Mikehrn Mikehrn requested a review from fabis94 January 6, 2025 11:24
@Mikehrn Mikehrn changed the title Revert notification changes Fix: Revert notification changes Jan 6, 2025
packages/frontend-2/components/invite/dialog/Server.vue Outdated Show resolved Hide resolved

/**
* Persisting toast state between reqs and between CSR & SSR loads so that we can trigger
* toasts anywhere and anytime
*/
const useGlobalToastState = () =>
useSynchronizedCookie<Optional<ToastNotification[]>>('global-toast-state')
useSynchronizedCookie<Optional<ToastNotification>>('global-toast-state')
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm wondering what will happen when the page loads in for someone who already has this cookie set with an array of toast notifications, hopefully the code doesn't break (expects a single object, finds an array).

its probably fine, but we should probably validate this assumption locally

Copy link
Contributor

@fabis94 fabis94 left a comment

Choose a reason for hiding this comment

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

lgtm

@Mikehrn Mikehrn merged commit a0e6b2c into main Jan 6, 2025
26 of 28 checks passed
@Mikehrn Mikehrn deleted the mike/revert-notification-change branch January 6, 2025 12:30
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.

2 participants