feat: DSYS-476 Migrate AvatarIcon to ADR-0003 and ADR-0004#996
Draft
cursor[bot] wants to merge 2 commits intomainfrom
Draft
feat: DSYS-476 Migrate AvatarIcon to ADR-0003 and ADR-0004#996cursor[bot] wants to merge 2 commits intomainfrom
cursor[bot] wants to merge 2 commits intomainfrom
Conversation
- Create AvatarIconSeverity const object and AvatarIconPropsShared type in design-system-shared - Export from shared package index - Update React package to import AvatarIconSeverity from shared - Update React Native package to import AvatarIconSeverity from shared - Remove AvatarIconSeverity enum from platform-specific types/index.ts files - Update constants, component, stories, tests, and figma files to import from correct sources - Update Toast.types.ts to import AvatarIconSeverity from shared package Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
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
AvatarIconcomponent to follow ADR-0003 (String Unions) and ADR-0004 (Centralized Types Architecture).AvatarIconSeverityconst object (replacing the enum) andAvatarIconPropsSharedtype in@metamask/design-system-sharedAvatarIconSeverityfrom the shared package instead of duplicating it in each platform'stypes/index.tsAvatarIconSeverityenum from both platform-specifictypes/index.tsfilesToast.types.tsin React Native which also referencedAvatarIconSeverityNote:
AvatarIconSizeremains platform-specific as it is an alias forAvatarBaseSize, which has different values per platform (string labels in React, pixel numbers in React Native).Related issues
Fixes: DSYS-476
Manual testing steps
yarn buildfrom repo root — should complete with no errorsyarn testfrom repo root — all tests should pass with 100% coverageyarn lintfrom repo root — no lint errorsPre-merge author checklist
Pre-merge reviewer checklist