Skip to content

Conversation

@im3dabasia
Copy link
Contributor

@im3dabasia im3dabasia commented Apr 9, 2025

What?

Follow up: #63756

In CustomSelectControlV2 items, show cursor: pointer when interactive and cursor: default when disabled.

Why?

To make consistent with other components

Testing Instructions

  1. Run npm run storybook:dev
  2. Search for story for CustomSelectControlV2.
  3. Here is the diff which needs to be added to add at least one disabled item
Code diff
diff --git a/packages/components/src/custom-select-control-v2/stories/index.story.tsx b/packages/components/src/custom-select-control-v2/stories/index.story.tsx
index b65c599ec9..a0edf51639 100644
--- a/packages/components/src/custom-select-control-v2/stories/index.story.tsx
+++ b/packages/components/src/custom-select-control-v2/stories/index.story.tsx
@@ -74,7 +74,7 @@ Default.args = {
                        <CustomSelectControlV2.Item value="Blue">
                                <span style={ { color: 'blue' } }>Blue</span>
                        </CustomSelectControlV2.Item>
-                       <CustomSelectControlV2.Item value="Purple">
+                       <CustomSelectControlV2.Item aria-disabled="true" value="Purple">
                                <span style={ { color: 'purple' } }>Purple</span>
                        </CustomSelectControlV2.Item>
                        <CustomSelectControlV2.Item value="Pink">

Screencast

Screen.Recording.2025-04-09.at.11.14.25.PM.mov

@im3dabasia im3dabasia marked this pull request as ready for review April 9, 2025 17:10
@im3dabasia im3dabasia requested a review from ajitbohra as a code owner April 9, 2025 17:10
@github-actions
Copy link

github-actions bot commented Apr 9, 2025

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: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

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

@im3dabasia im3dabasia force-pushed the try/remove-cursor-not-allowed branch from 960afc6 to d4af2b2 Compare April 9, 2025 17:18
@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Package] Components /packages/components Needs Accessibility Feedback Need input from accessibility labels Apr 11, 2025
Copy link
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.

Reading #63756, I'm not sure that that folks have agreed to use pointer for option elements and default (instead of not-allowed) for disabled options.

@im3dabasia
Copy link
Contributor Author

im3dabasia commented Apr 15, 2025

Reading #63756, I'm not sure that that folks have agreed to use pointer for option elements and default (instead of not-allowed) for disabled options.

Correct, Similar to this #63816 When a consensus is made and if required then this PR can be used to solve the issue

Related comment: #63756 (comment)

@ciampo ciampo marked this pull request as draft April 15, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Accessibility Feedback Need input from accessibility Needs Design Feedback Needs general design feedback. [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants