Repository navigation
Conversation
The identity row already showed which mode was active, but it was styled as status text: a colour-only hover, and a native `title` that only appeared after the ~1s OS delay. Nothing said the row could be clicked. - hover fill plus the app-wide `:focus-visible` ring, so the row reads as interactive. The padding is cancelled by a negative margin, so the gutter and the row height are unchanged. - `role="switch"` and `aria-checked` for screen readers, with a FIXED `aria-label`. The visible text changes between states, so naming the control after it made a screen reader read "Sending as Jane, switch, off". - the app's own `Hint` tooltip replaces the native `title`, so the hint opens on the shared delay and matches every other hint in the app. Fixes pacifio#69
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
CI follow-up — the check suite here is empty rather than red. No workflow has actually run against this PR. Local run, with the toolchain …and, in case anything else here touches React rendering, the whole One environment note, in case it saves the next person an hour: with Once the run is approved I'll follow up on anything CI flags. And if you'd rather see the two states rebuilt inside the |
|
Closing this to keep the queue tidy — there are older unmerged PRs ahead of it and no sign of review capacity here at the moment. Nothing is wrong with the change: CI never ran ( |
|
Update: I've reopened this and I'm leaving it open — the closing note I left above was premature. The change itself stands: CI never ran on this PR ( |
What?
The feedback panel's identity row is a switch now, and it looks like one.
Why?
Fixes #69. The row already said which mode was active, but nothing said it could be clicked. The hover was a colour change only, and the explanation lived in a native
titlethat opens after the ~1s OS delay — by which point the row has already read as static text.How?
hover:bg-element-hover, the token the app's other interactive rows use) plus a little padding. The padding is cancelled by-mx-1.5so the text keeps the panel's gutter, and the row's height is set by theh-6Send button either way — so nothing reflows, including across the toggle.:focus-visiblering fromglobals.css; no second ring was added.role="switch"+aria-checked. It was an unlabelled control whose entire meaning lived in changing text.aria-label="Send anonymously", per @uzayer in the thread. Naming it after the visible text would make a screen reader announce "Sending as Jane Doe, switch, off" — the name contradicting the state it just reported.title→Hint(src/ui/tooltip.tsx), so the hint opens on the shared delay and matches every other hint in the app.Tests
src/features/feedback/components/feedback-panel.test.tsx— three cases: the switch role and its fixed name (and that the name does not follow the visible text), the dropped nativetitle, and that toggling flipsaria-checked, the visible label, and the store the submit payload reads. All three fail against the previous component.Screenshots
Both states, pointer on the row so the hover affordance is in the shot.
Attributed to the account:
Anonymous:
Checklist
Only the things CI can't check for you:
On the last box: this was checked in
bun run devagainst the mock backend, not in thedev:appbundle — @uzayer's guidance on #69says browser screenshots are enough for this one, so the two above are the evidence rather
than a claim I can't make. Happy to rebuild in
dev:appif you'd rather see it there.