wrolpi/app/src/components/ui
Roland d4db7640ea ui: restore the clickable toast the migration dropped
No, it did not still work.  Semantic's toast took an `onClick` in its
options and made the whole toast activate it.  The migrated helper
destructured four keys and dropped the rest, silently, so every toast that
carried one became a dead toast.

`Events.js` still passes one -- it did before the migration and was never
changed -- for the three events that arrive with a URL:

* `user_notify_message`, a page shared from the browser extension
* `upload_archive`
* `screenshot_generated`

The first renders the description "Click here to view the shared page",
which it was not.  Nothing threw and nothing looked wrong; the toast
simply stopped being a way to reach the thing it was announcing.

`onClick` is passed through again, and a toast carrying one gets a pointer
cursor so it looks like what it is.  Clicks on the dismiss button do not
follow it -- the button is inside the toast, so its click reaches the root,
and closing a notification is not the same as following it.

It is also reachable from the keyboard now, which it never was: WROLPi runs
on devices with a keyboard and no mouse, and a toast only a pointer can
follow is a feature half the deployments cannot use.  No `role`, because a
`button` or `link` role may not contain interactive content and the dismiss
button is in there.

Mantine also leaves that dismiss button unnamed, so a screen reader read it
as "button".  It has a label now, which is how the test for the
dismiss-does-not-follow case can find it.

Five tests, all red first.  The gallery gets a Clickable button; following
the toast raises a second one, so it is obvious whether the handler ran.
2026-08-01 15:27:39 -06:00
..
Button.tsx ui: three silent library defects the agents' reports surfaced 2026-07-30 13:15:03 -06:00
DataTable.tsx ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
Feedback.tsx ui: tags look like tags, and stay readable in every theme 2026-08-01 14:35:35 -06:00
Icon.tsx ui: Common.js and thirteen more files off Semantic 2026-07-30 11:55:39 -06:00
index.ts ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
Inputs.tsx ui: name the directory fields, announce their help text, let long prefixes shrink 2026-07-30 16:10:56 -06:00
Navigation.tsx ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
Overlays.tsx ui: migrate the extension pages and Configs; five components they needed 2026-07-30 09:15:04 -06:00
SearchBox.tsx ui: fix the cypress failures, and two real defects behind them 2026-07-30 12:54:24 -06:00
Surfaces.tsx ui: Statistic and StatisticGroup, and the four defects they had 2026-07-30 19:23:04 -06:00
ThemePicker.tsx ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-07-30 09:15:04 -06:00
toast.test.js ui: restore the clickable toast the migration dropped 2026-08-01 15:27:39 -06:00
toast.ts ui: restore the clickable toast the migration dropped 2026-08-01 15:27:39 -06:00
ui-layout.cy.js ui: sit the tag's point on the visible edge, not a pixel inside it 2026-08-01 14:35:35 -06:00
ui.css ui: toasts move to the top right, get readable titles, and get tests 2026-08-01 15:27:39 -06:00
ui.test.js ui: two more labels were painting text with an inline colour, and shorthand hex 2026-08-01 14:35:35 -06:00