fix(client): correct StatBox hover and separate nested-control hover

Addresses review findings on the hover-states change.

StatBox's hover was a no-op. `GradientBox` always paints an opaque
`linear-gradient` via the `background` shorthand, which populates
background-image and covers any `backgroundColor` beneath it, so the new hover
was invisible — a regression from the `opacity: 0.95` it replaced. The overlay
now layers onto the same gradient, and moves into `GradientBox` where `bg` is
in scope, behind an `interactive` prop.

The mobile card branch gated its cursor and hover on `onRowClick` alone, so
expandable-row tables below the md breakpoint rendered cards that expand on
click but showed no pointer and no hover — the exact inconsistency this change
set out to fix, reintroduced on mobile. Both branches now share one
`isInteractive` flag.

The row action gear used the same overlay as the row beneath it. Alpha
overlays compose, so it was not invisible as reported, but the resulting delta
was 6 levels — too faint for a nested control. Adds `HOVER.CONTROL` (0.05) and
an `action.controlHover` token for controls nested inside a hoverable row: the
gear and the pagination arrows.

Claude-Session: https://claude.ai/code/session_01AbYLvwpEaZFXktHVcqrFRd
This commit is contained in:
gorkem-bwl committed 2026-08-28 19:53:39 -04:00
1 parent 9a6602b9e1
commit 3e56dc63a9
6 files changed
+24 -18

No files matched your search

+2
View File
@@ -42,6 +42,7 @@ export const lightPalette = {
},
action: {
rowHover: alpha(colors.gray900, HOVER.ROW),
controlHover: alpha(colors.gray900, HOVER.CONTROL),
},
secondary: {
main: colors.gray200,
@@ -71,6 +72,7 @@ export const darkPalette = {
},
action: {
rowHover: alpha("#FFFFFF", HOVER.ROW),
controlHover: alpha("#FFFFFF", HOVER.CONTROL),
},
secondary: {
main: colors.gray700,
+2
View File
@@ -15,9 +15,11 @@ declare module "@mui/material/styles" {
}
interface TypeAction {
rowHover: string;
controlHover: string;
}
interface TypeActionOptions {
rowHover?: string;
controlHover?: string;
}
interface Palette {
sidebar: { accent: string };
+2 -1
View File
@@ -20,5 +20,6 @@ export const LAYOUT = {
export const HOVER = {
DARKEN: 0.06, // This is a coefficient for darkening function
ROW: 0.025, // Overlay alpha for hoverable rows, cards and icon buttons
ROW: 0.025, // Overlay alpha for hoverable rows and cards
CONTROL: 0.05, // Stronger overlay for controls nested inside a hoverable row
} as const;