Mobile toast redesign - #363
Conversation
WalkthroughThis PR adds mobile-specific stacking behavior to the toast notification system. Changes
Sequence Diagram(s)sequenceDiagram
participant ToastProvider
participant BaseToast
ToastProvider->>ToastProvider: compute stackIndex per toast
ToastProvider->>BaseToast: pass stackIndex, isPaused
BaseToast->>BaseToast: detect stackIndex change (mobile)
BaseToast->>BaseToast: reset remainingTime, resetCount
BaseToast->>BaseToast: render position/scale/z-index by stackIndex
Related issues: None specified. Related PRs: None specified. Suggested labels: frontend, ui, enhancement Suggested reviewers: None specified. Poem: Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.1)frontend/src/styles/tailwind.cssFile contains syntax errors that prevent linting: Line 1: Tailwind-specific syntax is disabled.; Line 4: Tailwind-specific syntax is disabled.; Line 84: Tailwind-specific syntax is disabled. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0701d883-01ea-4faa-ac95-e0a9360ce27f
📒 Files selected for processing (3)
frontend/src/features/system-feedback/toast/base.tsxfrontend/src/features/system-feedback/toast/provider.tsxfrontend/src/styles/tailwind.css
mirmirmirr
left a comment
There was a problem hiding this comment.
[nitpick] There seems to be a bit of a delay on the animation of the toasts coming forward. Is it possible to make this smoother?
This PR reworks the toasts on mobile into a notification-style layout. This aims to take up less space on mobile where screen space is already scarce.
New Toast Layout
Instead of toasts on mobile appearing on the bottom right, they now appear on the top over the header. In addition, when multiple toasts are shown, they are stacked with the most recent in the front.
Toasts that are not the most recent have their duration reset, so when they make it back to the front they still show for their full duration at once.
The mobile toasts also animate from the top, which means that they are closed with a swipe up instead of right.
Cleaned Up Animations
The
tailwind.cssfile had a few unused animations, which have been removed. The file has also been reordered a bit, and the toast animations were renamed for their purpose.