From 42c7b7f886ff1395d4d292838daaca9ca929cbda Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sat, 14 Nov 2026 21:13:11 +0700 Subject: [PATCH] fix(app): show the Android ripple on sidebar row presses (#9678) * fix(app): show the Android ripple on sidebar row presses PressHighlight owns pressed feedback. Callers pass the pressed fill as highlightStyle and stop painting it themselves. iOS and web paint the fill; Android draws the platform ripple, clipped to the row's corners, after Android's 100 ms tap timeout. Rows that knock content out of the surface follow the fill through onHighlightChange instead of tracking press state themselves. Defaults borderWidth to 0 under clipped ripples: React Native 0.86 sends NaN when a style drops borderWidth, and an overflow-hidden view then stops painting (fixed upstream in facebook/react-native#57789). * fix(app): let PressHighlight own file header press feedback Changes-tree rows on Android painted their old flat pressed fill under the new ripple. Lock the Android row's caller border and press handlers in a test. * fix(app): skip the sidebar row press fill while renaming On web the row's pressable stays the responder for clicks inside the inline rename field, so it painted the pressed fill while the title was being edited. Drop highlightStyle while editing, as the press handlers already are. * fix(app): keep a press's fill and its report on the same edges usePressFill painted from the live pressed state but reported only at press-in and press-out, so the row fill and the badge ring could disagree when highlightStyle appeared or went away mid-press. A press now keeps the fill it started with; the paint and the report both come from that one state. --- docs/design.md | 2 +- .../src/components/settings/row-header.tsx | 6 +- .../src/components/sidebar-workspace-list.tsx | 64 ++----- .../sidebar/sidebar-group-toggle-row.tsx | 2 +- .../sidebar/sidebar-row-backdrop.ts | 7 +- .../sidebar/sidebar-status-list.tsx | 43 +---- .../app/src/components/ui/context-menu.tsx | 5 +- .../components/ui/press-highlight.android.tsx | 87 +++++++++ .../ui/press-highlight.browser.test.tsx | 177 +++++++++++++++--- .../src/components/ui/press-highlight.fill.ts | 60 ++++++ .../components/ui/press-highlight.native.tsx | 34 ++-- .../app/src/components/ui/press-highlight.tsx | 6 +- .../components/ui/press-highlight.types.ts | 11 +- packages/app/src/git/file-header.tsx | 26 +-- .../settings/voice/speech-provider-sheet.tsx | 5 +- packages/app/src/usage/sidebar-item.tsx | 5 +- 16 files changed, 385 insertions(+), 155 deletions(-) create mode 100644 packages/app/src/components/ui/press-highlight.android.tsx create mode 100644 packages/app/src/components/ui/press-highlight.fill.ts diff --git a/docs/design.md b/docs/design.md index 57b3a7c9e..c9b1a9842 100644 --- a/docs/design.md +++ b/docs/design.md @@ -20,7 +20,7 @@ A semantic element used in three or more places is a primitive. One of a kind is Primitives live in `packages/app/src/components/ui/` and `packages/app/src/components/headers/`. Card and row layout live in `packages/app/src/styles/settings.ts`. Section structure lives in `packages/app/src/screens/settings/settings-section.tsx`. -A pressable styled to look like a button is wrong; the button is `