Skip to content

Table: a row's has- rules see its cells (a row tints while its menu is open) #484

Open

Description

@samitbasu

Found in Phase 2 (#446/#483), in the child-rule inventory. shadcn's table row has has-aria-expanded:bg-muted/50: a row tints while a menu in one of its cells is open. Phase 2 wires aria-expanded on dropdown triggers, but the row rule still can't fire.

Why: in eggshell's grid table, a row's band is an empty node, and its cells are the band's siblings in the grid, not its children. has rules are resolved from the observations a container gathers of its own children (Builder::closed / Tw::with_has), so a row never sees its cells.

Proposal: when the table settles a row's band (after the row's cells are built), evaluate the band's has rules over its cells' observations, the row's logical children as in HTML's <tr>. This makes every has- rule on a row work. It's table-local, but the grid needs to gather observations for its cells.

Test: a row whose ⋯ menu is open is bg-muted/50, and the others aren't; plus a golden.

After #483.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions