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

UX-286 Add indeterminate checkbox support #578

Merged
merged 3 commits into from
Aug 14, 2020
Merged

UX-286 Add indeterminate checkbox support #578

merged 3 commits into from
Aug 14, 2020

Conversation

jonambas
Copy link
Contributor

@jonambas jonambas commented Aug 6, 2020

What Changed

  • Adds support for indeterminate checked state
  • Specifies defaultChecked prop doesn't work with intermediate, input must be fully controlled

How To Test or Verify

PR Checklist

  • Add the correct type label
  • Pull request approval from #uxfe or #design-guild

@codecov
Copy link

codecov bot commented Aug 6, 2020

Codecov Report

Merging #578 into main will increase coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #578      +/-   ##
==========================================
+ Coverage   93.39%   93.66%   +0.26%     
==========================================
  Files         118      138      +20     
  Lines        1574     1783     +209     
==========================================
+ Hits         1470     1670     +200     
- Misses        104      113       +9     
Impacted Files Coverage Δ
...kages/matchbox/src/components/Checkbox/Checkbox.js 100.00% <100.00%> (ø)
...ackages/matchbox/src/components/Checkbox/styles.js 100.00% <100.00%> (ø)
packages/matchbox/src/helpers/geometry.js 92.30% <0.00%> (-3.85%) ⬇️
packages/matchbox/src/components/Modal/Modal.js 96.15% <0.00%> (-3.85%) ⬇️
packages/matchbox/src/components/Tabs/Tabs.js 86.11% <0.00%> (-2.47%) ⬇️
packages/matchbox/src/helpers/children.js 100.00% <0.00%> (ø)
packages/matchbox/src/components/Panel/Panel.js 100.00% <0.00%> (ø)
packages/matchbox/src/components/Table/Table.js 100.00% <0.00%> (ø)
packages/matchbox/src/components/Panel/Accent.js 100.00% <0.00%> (ø)
packages/matchbox/src/components/Panel/Header.js 100.00% <0.00%> (ø)
... and 37 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27dd97f...ce3d8da. Read the comment docs.

Copy link
Contributor

@logansparlin logansparlin left a comment

Choose a reason for hiding this comment

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

Looks good, just one question

/**
* 'indeterminate' does not work with defaultChecked
*/
defaultChecked: PropTypes.oneOf([true, false]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to do this instead of PropTypes.bool?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good catch haha

@jonambas jonambas merged commit 46a129b into main Aug 14, 2020
@jonambas jonambas deleted the UX-286 branch August 14, 2020 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants