feat(DSYS-486): migrate Checkbox to ADR-0004 (CheckboxPropsShared)#1040
Draft
cursor[bot] wants to merge 1 commit intomainfrom
Draft
feat(DSYS-486): migrate Checkbox to ADR-0004 (CheckboxPropsShared)#1040cursor[bot] wants to merge 1 commit intomainfrom
cursor[bot] wants to merge 1 commit intomainfrom
Conversation
- Create CheckboxPropsShared in packages/design-system-shared/src/types/Checkbox/ with isSelected, isDisabled, isInvalid, label, onChange props - Export CheckboxPropsShared from shared package index (ADR-0004 only, no enum const objects needed as Checkbox has no variant/size enums) - Update React Checkbox.types.ts to extend CheckboxPropsShared from shared - Update React Native Checkbox.types.ts to extend CheckboxPropsShared from shared - All tests pass, 100% coverage maintained Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Contributor
📖 Storybook Preview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrates the
Checkboxcomponent to follow ADR-0004 (Centralized Types Architecture) by creatingCheckboxPropsSharedin the shared package.This is an ADR-0004 only migration —
Checkboxhas no variant/size enums to convert (no ADR-0003 work needed). The shared props extract the common, platform-independent properties:isSelected,isDisabled,isInvalid,label, andonChange.Changes:
packages/design-system-shared/src/types/Checkbox/Checkbox.types.tswithCheckboxPropsSharedpackages/design-system-shared/src/types/Checkbox/index.tsCheckboxPropsSharedfrom the shared packageindex.tspackages/design-system-react/src/components/Checkbox/Checkbox.types.tsto extendCheckboxPropsSharedpackages/design-system-react-native/src/components/Checkbox/Checkbox.types.tsto extendCheckboxPropsSharedRelated issues
Fixes: DSYS-486
Manual testing steps
yarn build— should pass with no errorsyarn test— all tests should pass with 100% coverageyarn lint— should pass with no errorsScreenshots/Recordings
N/A — internal type refactor, no visual changes.
Before
CheckboxPropsdefined independently in React and React Native packages with duplicatedisSelected,isDisabled,isInvalid,label, andonChangeprops.After
Both platform packages extend
CheckboxPropsSharedfrom@metamask/design-system-shared, removing duplication while maintaining full backwards compatibility.Pre-merge author checklist
Pre-merge reviewer checklist