close
Skip to content

Block Directory: Use --wpds-cursor-control design token#77330

Merged
mirka merged 7 commits into
WordPress:trunkfrom
hbhalodia:fix/issue-76221-block-directory
Apr 14, 2026
Merged

Block Directory: Use --wpds-cursor-control design token#77330
mirka merged 7 commits into
WordPress:trunkfrom
hbhalodia:fix/issue-76221-block-directory

Conversation

@hbhalodia
Copy link
Copy Markdown
Contributor

What?

Part of: #76221

Why?

  • Update the instances of cursor: pointer to use the desgin token for better maintainence.

How?

  • Removed cursor: pointer and used cursor: var(--wpds-cursor-control);

Testing Instructions

  1. Open any post/page.
  2. Search for any block that does not exist, eg: Forms.
  3. Check the list, inspect it and check the token usage.
  4. We only have 1 instance in block directory to update.

Testing Instructions for Keyboard

  • None

Use of AI Tools

  • None

@hbhalodia hbhalodia requested review from Copilot and mirka April 14, 2026 12:54
@hbhalodia hbhalodia marked this pull request as ready for review April 14, 2026 12:54
@github-actions
Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@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: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

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

Copy link
Copy Markdown
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

Updates @wordpress/block-directory styling to use the WP Design System cursor token so interactive control cursor behavior can be centrally configured.

Changes:

  • Replace cursor: pointer with cursor: var(--wpds-cursor-control) in the Block Directory downloadable block list item.
  • Add a package-level Stylelint rule to disallow cursor: pointer and guide contributors toward the design token.
  • Document the change in the @wordpress/block-directory changelog.

Reviewed changes

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

File Description
packages/block-directory/src/components/downloadable-block-list-item/style.scss Switches interactive cursor styling to --wpds-cursor-control.
packages/block-directory/CHANGELOG.md Adds an Unreleased enhancement entry describing the cursor-token update.
packages/block-directory/.stylelintrc.mjs Adds a Stylelint guardrail preventing future cursor: pointer usage in this package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

Thanks! Ready to merge once the stylelint change is removed.

Comment thread packages/block-directory/.stylelintrc.mjs Outdated
@mirka mirka merged commit 07486b2 into WordPress:trunk Apr 14, 2026
40 of 41 checks passed
@github-actions github-actions Bot added this to the Gutenberg 23.0 milestone Apr 14, 2026
peterwilsoncc pushed a commit to peterwilsoncc/gutenberg-build that referenced this pull request Apr 14, 2026
* Update the usage of cursor pointer to use token css variable instead of hardcoded value

* Remove the default value

* Add changelog entry

* Add stylelint rule to prevent usage of cursor pointer

* Remove design token import from styles

* Remove unused variable

* Remove the style lint rule based on suggestion here WordPress/gutenberg#77330 (comment)

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

Source: WordPress/gutenberg@07486b2
@luisherranz luisherranz added the [Type] Code Quality Issues or PRs that relate to code quality label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants