Repository navigation
Notes: Show the pressed state of reaction pills in forced colors mode - #85904
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +297 B (0%) Total Size: 8.56 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Custom Completer: should allow option selection via keypress event in
|
Forced colors draw the outline and minimal Button variants alike, so a pill the current user has reacted with looked the same as one they had not. Fill the pressed pill with SelectedItem, as the picker already does for checked items. Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN
Fill a pressed pill on a resolved note with GrayText and invert its text to Canvas, so it stays apart from the other disabled pills. Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN
Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN
d852fa4 to
817e2c6
Compare
yogeshbhutkar
left a comment
There was a problem hiding this comment.
Nice attention to detail. I took some time testing this too and checking other places, and the changes looks good.
pr.mov
|
Thanks for the review, both of you! |
…WordPress#85904) * Notes: Show the pressed state of reaction pills in forced colors mode Forced colors draw the outline and minimal Button variants alike, so a pill the current user has reacted with looked the same as one they had not. Fill the pressed pill with SelectedItem, as the picker already does for checked items. Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN * Add changelog entry Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN * Show the pressed state of disabled reaction pills too Fill a pressed pill on a resolved note with GrayText and invert its text to Canvas, so it stays apart from the other disabled pills. Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN * Drop the backplate behind checked picker items too Co-authored-by: t-hamano <54422211+t-hamano@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011g9URuk43hMzNaSbp1QMFN --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
What?
In forced colors mode, a reaction pill the current user has reacted with now looks different from one they have not.
Why?
Note reactions show whether the current user has reacted through the Button variant:
minimal+neutraloutline+brandNeither pill gets the Button's
aria-pressedstyling, and in forced colors mode both variants look the same. The add-reaction picker already fills its checked items withSelectedItemin forced colors, so the picker showed the state but the pills did not.How?
As far as I remember,
ui/Buttonintentionally doesn't providearia-pressedstyling for other variants, so this PR fixes it on the Notes side:That said, I'd appreciate any advice on whether
ui/Buttonneeds a change for this.Testing Instructions
forced-colors: activein Chrome DevTools (Rendering tab).SelectedItemfill, and that its emoji and count are readable.GrayTextfill.Screenshots or screencast
The screenshots below were taken with Chromium's forced colors emulation. ❤️ has a reaction from another user only, and 👍 has a reaction from the current user. The rows are the default display, forced colors (light) and forced colors (dark).
Open note
Resolved note
Use of AI Tools
This PR was authored with Claude Code (Claude). The author reviewed the changes and the screenshots.