Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Button): support for not-allowed cursor when disabled #2052

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

booc0mtaco
Copy link
Contributor

Test Plan:

  • Wrote/updated automated tests
  • CI tests / new tests are not applicable
  • Manually tested my changes, and here are the details:

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.44%. Comparing base (7812688) to head (d83dc00).
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2052   +/-   ##
=======================================
  Coverage   97.43%   97.44%           
=======================================
  Files         109      109           
  Lines        2615     2618    +3     
  Branches      665      668    +3     
=======================================
+ Hits         2548     2551    +3     
  Misses         65       65           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

size-limit report 📦

Path Size
components 89.32 KB (+0.08% 🔺)
styles 27.22 KB (+0.06% 🔺)

@@ -263,23 +263,21 @@
* Disabled
*/
.button--disabled {
pointer-events: none;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We disable all the pointer events for these buttons to make them truly disabled (and this avoids having to add styles to override the :hover, :active and other pseudo-selectors

}
}

.button__disabled {
Copy link
Contributor Author

@booc0mtaco booc0mtaco Aug 30, 2024

Choose a reason for hiding this comment

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

this is to style a container when disabled. because pointer-events is also how the cursor gets styled, we cannot just add cursor: not-allow

@booc0mtaco booc0mtaco requested a review from a team August 30, 2024 21:24
@booc0mtaco booc0mtaco merged commit 46cb9f6 into next Sep 3, 2024
10 checks passed
@booc0mtaco booc0mtaco deleted the aholloway/x-add-button-not-allowed-cursor branch September 3, 2024 15:49
@booc0mtaco booc0mtaco mentioned this pull request Sep 26, 2024
booc0mtaco added a commit that referenced this pull request Sep 27, 2024
## [15.4.0](v15.3.1...v15.4.0) (2024-09-26)

[Storybook](https://61313967cde49b003ae2a860-sdpxmjxjai.chromatic.com/)

### Features

* **Button:** support for not-allowed cursor when disabled ([#2052](#2052)) ([46cb9f6](46cb9f6))
* **DataTable:** introduce 1.0 component ([#2050](#2050)) ([ffd0e82](ffd0e82)), closes [#2055](#2055)


### Bug Fixes

* **Button:** apply external styles when disabled ([#2060](#2060)) ([e762d8b](e762d8b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants