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

refactor: use react-aria/checkbox prop types instead for better integration #435

Merged
merged 5 commits into from May 8, 2022
Merged

refactor: use react-aria/checkbox prop types instead for better integration #435

merged 5 commits into from May 8, 2022

Conversation

tianenpang
Copy link
Member

@tianenpang tianenpang commented Apr 27, 2022

Closes #431

📝 Description

Refactor Checkbox, the properties are now integrated with @react-aria/checkbox via mapping, which usually results in missing or unstructured props.

⛳️ Current behavior (updates)

Use the props type provided by @react-aria/checkbox and discard the property mapping for better integration and ease of future updates.

🚀 New behavior

OLD APIs NEW APIs
checked isSelected
initialChecked defaultSelected
disabled isDisabled
indeterminate isIndeterminate
readOnly isReadOnly
required isRequired
animated disableAnimation
rounded isRounded
line lineThrough

💣 Is this a breaking change (Yes/No):

Yes

@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2022

Codecov Report

Merging #435 (f37300c) into main (15c0061) will increase coverage by 0.06%.
The diff coverage is 96.42%.

@@            Coverage Diff             @@
##             main     #435      +/-   ##
==========================================
+ Coverage   74.77%   74.83%   +0.06%     
==========================================
  Files         174      175       +1     
  Lines        2791     2806      +15     
  Branches      822      835      +13     
==========================================
+ Hits         2087     2100      +13     
- Misses        694      696       +2     
  Partials       10       10              
Impacted Files Coverage Δ
packages/react/src/checkbox/checkbox.styles.ts 100.00% <ø> (ø)
packages/react/src/table/table-checkbox-cell.tsx 100.00% <ø> (ø)
...ages/react/src/table/table-select-all-checkbox.tsx 85.71% <ø> (-0.96%) ⬇️
packages/react/src/table/utils.ts 80.00% <ø> (-7.50%) ⬇️
packages/react/src/checkbox/use-checkbox.ts 91.30% <91.30%> (ø)
packages/react/src/checkbox/checkbox-context.ts 100.00% <100.00%> (ø)
packages/react/src/checkbox/checkbox-group.tsx 100.00% <100.00%> (ø)
packages/react/src/checkbox/checkbox.tsx 100.00% <100.00%> (ø)
packages/react/src/checkbox/use-checkboxGroup.ts 100.00% <100.00%> (ø)

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 15c0061...f37300c. Read the comment docs.

@tianenpang tianenpang changed the title fix: #431 remove initialChecked from label props refactor: discarding checkbox prop mapping for better integration with react-aria/checkbox May 6, 2022
@tianenpang tianenpang changed the title refactor: discarding checkbox prop mapping for better integration with react-aria/checkbox refactor: use react-aria/checkbox prop types instead for better integration May 6, 2022
@jrgarciadev jrgarciadev changed the base branch from main to next May 8, 2022 13:36
@jrgarciadev jrgarciadev merged commit b922bb9 into nextui-org:next May 8, 2022
@jrgarciadev jrgarciadev added this to the 🔥 v1.0.0-beta.7 milestone May 9, 2022
@tianenpang tianenpang deleted the fix/checkbox-initialchecked branch December 21, 2022 09:29
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.

CHECKBOX BUG initialChecked
3 participants