Skip to content

fix(data-collection): disable row hover when no interactive elements#3550

Open
sergiocarracedo wants to merge 3 commits intomainfrom
fix/dc-hover
Open

fix(data-collection): disable row hover when no interactive elements#3550
sergiocarracedo wants to merge 3 commits intomainfrom
fix/dc-hover

Conversation

@sergiocarracedo
Copy link
Collaborator

Description

Rows in the Table visualization were always showing a hover highlight, even when the row had no interactive elements (no itemUrl, no itemOnClick, and no item actions). This made non-interactive rows visually misleading.

This PR introduces localDisabledHover — a derived boolean that disables hover when none of the interactive triggers are present — and showItemActions to consolidate the item actions visibility check.

Screenshots (if applicable)

N/A — behavioral change only.

[Link to Figma Design](Figma URL here)

Implementation details

  • Added useMemo-backed showItemActions (replaces inline hasItemActions && !loading && !nestedRowProps?.onLoadMoreChildren guard)
  • Added useMemo-backed localDisabledHover: is true when disableHover prop is set, or when the row has no itemUrl, itemOnClick, and no item actions
  • Updated className to use localDisabledHover instead of disableHover
  • Updated the item actions render guard to use showItemActions
  • Added 9 unit tests in Row.test.tsx covering all hover behaviour cases

Rows that have no itemUrl, itemOnClick, or itemActions should not show
a hover highlight, since there is nothing interactive to indicate.
Copilot AI review requested due to automatic review settings February 27, 2026 11:02
@sergiocarracedo sergiocarracedo requested a review from a team as a code owner February 27, 2026 11:02
@github-actions github-actions bot added fix react Changes affect packages/react labels Feb 27, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-3550 to install the package

Use pnpm i github:factorialco/f0#7f725d626397638c2d5075723d520af13e04aa48 to install this specific commit

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

🔍 Visual review for your branch is published 🔍

Here are the links to:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the OneDataCollection Table row styling so non-interactive rows don’t display a hover highlight, reducing misleading affordances in the Table visualization.

Changes:

  • Introduces derived booleans (showItemActions, localDisabledHover) to centralize row interactivity/hover decisions.
  • Updates Row styling to conditionally disable hover via localDisabledHover.
  • Adds a dedicated Row unit test suite covering hover behavior permutations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/react/src/experimental/OneDataCollection/visualizations/collection/Table/components/Row.tsx Adds memoized guards for item actions visibility and hover disabling, and applies the derived hover flag to row classes.
packages/react/src/experimental/OneDataCollection/visualizations/collection/Table/components/tests/Row.test.tsx Adds hover behavior unit tests for different combinations of row interactivity inputs.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 40.9% 8101 / 19803
🔵 Statements 40.27% 8312 / 20636
🔵 Functions 32.04% 1769 / 5521
🔵 Branches 30.58% 4790 / 15660
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/experimental/OneDataCollection/visualizations/collection/Table/components/Row.tsx 95.45% 71.05% 100% 95.45% 144-158
Generated in workflow #11372 for commit c3b31b6 by the Vitest Coverage Report Action

…ns/collection/Table/components/Row.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 27, 2026 11:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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

Labels

fix react Changes affect packages/react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants