Skip to content

DataViews: Use --wpds-cursor-control design token for interactive controls#77259

Merged
ciampo merged 5 commits intoWordPress:trunkfrom
R1shabh-Gupta:add/dataviews-cursor-control-token
Apr 15, 2026
Merged

DataViews: Use --wpds-cursor-control design token for interactive controls#77259
ciampo merged 5 commits intoWordPress:trunkfrom
R1shabh-Gupta:add/dataviews-cursor-control-token

Conversation

@R1shabh-Gupta
Copy link
Copy Markdown
Contributor

@R1shabh-Gupta R1shabh-Gupta commented Apr 13, 2026

What?

Part of #76221

Replaces hardcoded cursor: pointer declarations in @wordpress/dataviews stylesheets with cursor: var(--wpds-cursor-control), and adds a stylelint rule to prevent new cursor: pointer declarations from being introduced.

Why?

The --wpds-cursor-control token allows cursor behavior for interactive non-link controls to be configured centrally via the design system. @wordpress/dataviews had hardcoded pointer cursors across its layouts and filter components, which prevented them from following the shared design system setting.

How?

  • Replaced cursor: pointer with cursor: var(--wpds-cursor-control) in the relevant Sass styles files.

Testing Instructions

  1. Run npm run storybook:dev.
  2. Open the DataViews and DataViewsPicker stories.
  3. Hover over clickable items (media cards, list rows, filter chips, panel field triggers) and verify they reflect the design token value (defaults to pointer cursor).

Use of AI Tools

Use Claude Code to review code and create pull request description.

@github-actions github-actions bot added the [Package] DataViews /packages/dataviews label Apr 13, 2026
@im3dabasia im3dabasia added the [Type] Enhancement A suggestion for improvement. label Apr 13, 2026
@im3dabasia
Copy link
Copy Markdown
Contributor

Thanks for the PR, please also update the packages/dataviews/CHANGELOG.md with something like this

## Unreleased

### Enhancements

-   `DataViews`, `DataForm`: Use `--wpds-cursor-control` for interactive cursor styling ([#77259](https://github.com/WordPress/gutenberg/pull/77259)).

@R1shabh-Gupta R1shabh-Gupta marked this pull request as ready for review April 14, 2026 14:04
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: R1shabh-Gupta <rishabhwp@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@oandregal
Copy link
Copy Markdown
Member

The components folks will have more context than I do about whether this is ready for usage.

Copy link
Copy Markdown
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

The PR description looks out of date:

"verify they reflect the design token value (defaults to default cursor)"

The --wpds-cursor-control token was changed from default to pointer in #76762. The current default is pointer, so the behavior after this PR should be visually identical to the old hardcoded cursor: pointer.

We should update the testing instructions.

Comment thread packages/dataviews/.stylelintrc.mjs Outdated
Comment thread packages/dataviews/CHANGELOG.md Outdated
@R1shabh-Gupta R1shabh-Gupta requested a review from ciampo April 15, 2026 05:55
Copy link
Copy Markdown
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Thank you for working on this 🙏

@ciampo ciampo merged commit 7856158 into WordPress:trunk Apr 15, 2026
41 checks passed
@github-actions github-actions bot added this to the Gutenberg 23.0 milestone Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] DataViews /packages/dataviews [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants