Skip to content

fix(sidebar): color a selected row's fold triangle like its text - #1024

Merged
umputun merged 2 commits into
masterfrom
fix-selected-row-chevron
Nov 16, 2026
Merged

umputun merged 2 commits into
masterfrom
fix-selected-row-chevron

Conversation

@umputun

@umputun umputun commented Nov 16, 2026

Copy link
Copy Markdown
Owner

on a selected sidebar row the companion fold triangle kept its unselected color. With a dark theme whose selection-background is light (Catppuccin Mocha), that drew a light triangle on a light pill, so it disappeared.

AppKit draws the disclosure triangle from the view's appearance alone, and the outline's appearance is pinned to the sidebar background's brightness. A selected row's triangle sits on the selection pill instead. SidebarRowView now gives that row's disclosure button the appearance matching the selected row text (light text gets darkAqua, dark text gets aqua) and clears it on deselect, so an unselected triangle keeps inheriting the outline pin. It is applied from the same places the cell's selection tint already is: selection change, the button attaching to the row, and the theme-change pass. Only the button's appearance changes, the cell, badge and rename field are untouched. themeTextColor became static so the row view can read it without a cell.

Two hosted tests pin it: select and deselect a companion parent, and a theme-change pass restoring a stale triangle. Both fail without the fix. Checked by eye in a Debug instance on Catppuccin Mocha: dark triangle on the selected pill, light again once the row is deselected, and it follows a live theme switch with the row selected.

No control API or docs change, it is drawing only. Remote rows use the same row view.

Fixed #1020

AppKit draws the disclosure triangle from the outline's appearance, which
is pinned to the sidebar background's brightness. On a selected row the
triangle sits on the selection pill instead, so a dark theme with a light
selection-background (Catppuccin Mocha) drew a light triangle on a light
pill. The row view now gives a selected row's triangle the appearance that
matches the selected row text, and clears it on deselect; a theme change
re-applies it.

Fixed #1020
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c472fa
Status: ✅  Deploy successful!
Preview URL: https://c84aa131.agterm.pages.dev
Branch Preview URL: https://fix-selected-row-chevron.agterm.pages.dev

View logs

@umputun
umputun merged commit 9ba9239 into master Nov 16, 2026
10 checks passed
@umputun
umputun deleted the fix-selected-row-chevron branch November 16, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Companion fold chevron is invisible on a selected sidebar row

1 participant