Panel: notification stack for the result of every action #279

Closed
opened 2026-11-16 09:41:51 +00:00 by vivy · 6 comments
Owner

Product owner demo feedback, 2026-11-16 (GRI-2051): "Feedback that if I press a button, I get a notification that it was successful or not. A notification element like Paperclip has in the left bottom corner, but in the right upper corner for Scryglass. With the newest at the bottom of the list, and the older ones fade away and everything under it moves up."

Plan

One notification stack for the whole panel (no such component exists yet).

  • Position: top right. Newest at the bottom of the stack. When an older one fades out, the ones below move up (animated).
  • Kinds: success (auto-dismiss after ~4 s), error (stays until closed, or auto-dismiss only when the pointer is not on it — same rule as #236), info.
  • Every action that writes to the server (save, assign, unassign, delete, block, refresh, upload, settings) reports its result there. Errors carry the server's message.
  • Reuse it for the closable errors of #236 instead of keeping two mechanisms.
  • Accessible: role="status" / aria-live="polite" for success, role="alert" for errors. Respects prefers-reduced-motion.

Done when

Component tests for order, fade and move-up, and pointer-hold; at least save, delete and upload use it.

Product owner demo feedback, 2026-11-16 (GRI-2051): *"Feedback that if I press a button, I get a notification that it was successful or not. A notification element like Paperclip has in the left bottom corner, but in the right upper corner for Scryglass. With the newest at the bottom of the list, and the older ones fade away and everything under it moves up."* ## Plan One notification stack for the whole panel (no such component exists yet). - Position: top right. Newest at the bottom of the stack. When an older one fades out, the ones below move up (animated). - Kinds: success (auto-dismiss after ~4 s), error (stays until closed, or auto-dismiss only when the pointer is not on it — same rule as #236), info. - Every action that writes to the server (save, assign, unassign, delete, block, refresh, upload, settings) reports its result there. Errors carry the server's message. - Reuse it for the closable errors of #236 instead of keeping two mechanisms. - Accessible: `role="status"` / `aria-live="polite"` for success, `role="alert"` for errors. Respects `prefers-reduced-motion`. ## Done when Component tests for order, fade and move-up, and pointer-hold; at least save, delete and upload use it.
Member

Opened #280 (dev <- feature/GRI-2143-notification-stack): a panel-wide notification stack (frontend-web/src/notifications/) — top right, newest at the bottom, success/error/info, errors following #236's hover-pause/closable rule.

Reused in place of the old per-screen DismissibleError/notice state for: Devices (approve/block/rename/assign/unassign/refresh), Media (upload/delete/move), campus playback settings (save), Campuses (rename/delete), and playlist settings/device-assignment (rename/delete/assign/refresh).

Left untouched in this pass (still on the old mechanism, flagged for a fast follow-up): PlaylistsScreen's own list-load error, IpRulesScreen, NetworkSettingsTab, PlaybackSettingsTab, and the pre-dashboard screens (SetupWizard/SetupScreen/LoginScreen). Also left inline on purpose: client-side field validation (add-campus/add-playlist-URL/rename forms) and the full-screen "could not load" states — neither is the result of a write action resolving.

Local: npm run check (prettier/oxlint/tsc/vitest, 172/172 green), npm run build, and ./scripts/local-gates.sh --frontend-only all pass. New component tests cover stack order, fade+removal timing, move-up, close button, pointer-hold pause/resume, and the accessible roles.

Not verified in an actual browser — no browser/screenshot tooling in this environment. Verified via tests, the design tokens used (all through @grimoirix/design, no literals), and the repo's existing global prefers-reduced-motion rule.

CI on #280 is running.

Opened #280 (dev <- feature/GRI-2143-notification-stack): a panel-wide notification stack (`frontend-web/src/notifications/`) — top right, newest at the bottom, success/error/info, errors following #236's hover-pause/closable rule. Reused in place of the old per-screen `DismissibleError`/notice state for: Devices (approve/block/rename/assign/unassign/refresh), Media (upload/delete/move), campus playback settings (save), Campuses (rename/delete), and playlist settings/device-assignment (rename/delete/assign/refresh). Left untouched in this pass (still on the old mechanism, flagged for a fast follow-up): PlaylistsScreen's own list-load error, IpRulesScreen, NetworkSettingsTab, PlaybackSettingsTab, and the pre-dashboard screens (SetupWizard/SetupScreen/LoginScreen). Also left inline on purpose: client-side field validation (add-campus/add-playlist-URL/rename forms) and the full-screen "could not load" states — neither is the result of a write action resolving. Local: `npm run check` (prettier/oxlint/tsc/vitest, 172/172 green), `npm run build`, and `./scripts/local-gates.sh --frontend-only` all pass. New component tests cover stack order, fade+removal timing, move-up, close button, pointer-hold pause/resume, and the accessible roles. Not verified in an actual browser — no browser/screenshot tooling in this environment. Verified via tests, the design tokens used (all through `@grimoirix/design`, no literals), and the repo's existing global `prefers-reduced-motion` rule. CI on #280 is running.
Member

CI is green on PR #280 (commit c3b913e6, after merging origin/dev to resolve the #272 media-split conflict): CI, clippy, cargo deny + advisories, fmt, cargo test, frontend-web, install.sh client upgrade, repository boundary, and the pre-push hook all passed. PR is mergeable. Handing to Vivy for review/merge.

CI is green on PR #280 (commit c3b913e6, after merging origin/dev to resolve the #272 media-split conflict): CI, clippy, cargo deny + advisories, fmt, cargo test, frontend-web, install.sh client upgrade, repository boundary, and the pre-push hook all passed. PR is mergeable. Handing to Vivy for review/merge.
Author
Owner

PR #280 merged into dev: the stack and its first users. This issue stays open for the screens that still report inline (list in my review on #280): PlaylistMediaTab Save, UsersScreen, PlaybackSettingsTab, PlaylistsScreen, IpRulesScreen, NetworkSettingsTab. Second PR on this issue, please.

PR #280 merged into dev: the stack and its first users. This issue stays open for the screens that still report inline (list in my review on #280): PlaylistMediaTab Save, UsersScreen, PlaybackSettingsTab, PlaylistsScreen, IpRulesScreen, NetworkSettingsTab. Second PR on this issue, please.
Member

Second PR, covering the rest of the list from your review on #280: #282

  • UsersScreen: delete, edit, set-password now report through the stack; "add a user" keeps its inline closable error (matches the add-campus/add-URL/new-playlist convention elsewhere in the panel).
  • PlaylistMediaTab: the Save button, matching its sibling PlaylistSettingsTab.
  • PlaybackSettingsTab: the global default-duration Save. Load failure stays inline (no write to report yet).
  • IpRulesScreen: Remove on either list — this previously had no error handling at all (unhandled rejection on failure). Add keeps its inline error.

NetworkSettingsTab is not in this PR: its Save and its multi-step restart currently share one inline notice/error pair, and the existing test exercises both back-to-back with no time for a toast to auto-dismiss between them — splitting Save onto the stack risks two simultaneous role="status" elements that getByRole('status') can't disambiguate, and I didn't want to edit that test to route around it. Flagging this one for you rather than guessing — let me know if you'd like it split into its own follow-up once the restart flow/test can accommodate it, or if you see a shape I'm missing.

CI is running on #282 (local scripts/local-gates.sh --frontend-only: prettier/oxlint/tsc/vitest 181/181, build — all green).

Second PR, covering the rest of the list from your review on #280: https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/pulls/282 - `UsersScreen`: delete, edit, set-password now report through the stack; "add a user" keeps its inline closable error (matches the add-campus/add-URL/new-playlist convention elsewhere in the panel). - `PlaylistMediaTab`: the Save button, matching its sibling `PlaylistSettingsTab`. - `PlaybackSettingsTab`: the global default-duration Save. Load failure stays inline (no write to report yet). - `IpRulesScreen`: Remove on either list — this previously had no error handling at all (unhandled rejection on failure). Add keeps its inline error. `NetworkSettingsTab` is **not** in this PR: its Save and its multi-step restart currently share one inline notice/error pair, and the existing test exercises both back-to-back with no time for a toast to auto-dismiss between them — splitting Save onto the stack risks two simultaneous `role="status"` elements that `getByRole('status')` can't disambiguate, and I didn't want to edit that test to route around it. Flagging this one for you rather than guessing — let me know if you'd like it split into its own follow-up once the restart flow/test can accommodate it, or if you see a shape I'm missing. CI is running on #282 (local `scripts/local-gates.sh --frontend-only`: prettier/oxlint/tsc/vitest 181/181, build — all green).
Member

Opened PR #283 (dev <- feature/GRI-2143-notification-stack-part3, commit aa33cb8): NetworkSettingsTab's Save now reports through the notification stack, matching every other settings Save. The restart flow (restart → wait for server → re-point the browser, or fail) keeps its own inline status/error pair, separate from the stack — it's a multi-step sequence and a toast's auto-dismiss could misreport a step still running as finished. That's the "give the restart its own status element" option from your review on #282, rather than editing the existing restart test to tolerate two concurrent role="status" regions. Two new component tests cover both paths (save on the stack, restart failure on its own alert). Local frontend gates all green. CI is running on #283.

Opened PR #283 (dev <- feature/GRI-2143-notification-stack-part3, commit aa33cb8): `NetworkSettingsTab`'s Save now reports through the notification stack, matching every other settings Save. The restart flow (restart → wait for server → re-point the browser, or fail) keeps its own inline status/error pair, separate from the stack — it's a multi-step sequence and a toast's auto-dismiss could misreport a step still running as finished. That's the "give the restart its own status element" option from your review on #282, rather than editing the existing restart test to tolerate two concurrent `role="status"` regions. Two new component tests cover both paths (save on the stack, restart failure on its own alert). Local frontend gates all green. CI is running on #283.
Author
Owner

Last part landed: #283 (Network Save) merged into dev. With #280 and #282, every Save in the panel now reports on the notification stack. Closing.

Last part landed: #283 (Network Save) merged into `dev`. With #280 and #282, every Save in the panel now reports on the notification stack. Closing.
vivy closed this issue 2026-11-16 12:15:04 +00:00
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage#279
No description provided.