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

[DSR] Added Blockies #465

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[DSR] Added Blockies #465

wants to merge 2 commits into from

Conversation

brianacnguyen
Copy link
Contributor

Description

This PR adds the Blockies component to DSR

Related issues

Fixes: #404

Manual testing steps

  1. Run yarn storybook from root
  2. Go to React Components > Blockies

Screenshots/Recordings

Before

After

Screen.Recording.2025-03-05.at.10.41.42.AM.mov

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@brianacnguyen brianacnguyen self-assigned this Mar 5, 2025
@brianacnguyen brianacnguyen requested a review from a team as a code owner March 5, 2025 18:58
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None 0 27.4 kB bpierre

View full report↗︎

@georgewrmarshall georgewrmarshall requested a review from Copilot March 6, 2025 22:10

Choose a reason for hiding this comment

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

PR Overview

This PR introduces a new Blockies component to generate unique identicons based on an address, along with associated tests, types, and Storybook stories.

  • Added Blockies component in its own file with dynamic import of the 'blo' module.
  • Created tests to ensure proper rendering of the component with various props.
  • Provided Storybook stories and type definitions to integrate the component into the design system.

Reviewed Changes

File Description
packages/design-system-react/src/components/blockies/Blockies.test.tsx Added tests to validate the Blockies component functionality.
packages/design-system-react/src/components/blockies/Blockies.tsx Implemented the Blockies component with dynamic module import.
packages/design-system-react/src/components/blockies/Blockies.types.ts Defined the type for Blockies props.
packages/design-system-react/src/components/blockies/index.ts Exported the Blockies component and its types.
packages/design-system-react/src/components/blockies/Blockies.stories.tsx Provided Storybook stories for the Blockies component.

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

packages/design-system-react/src/components/blockies/Blockies.tsx:13

  • Consider adding error handling to the dynamic import (e.g., using a catch block) so the component can gracefully handle failure cases rather than silently returning null.
useEffect(() => { import('blo').then((module) =>
@brianacnguyen brianacnguyen changed the title [DSRN] Added Blockies [DSR] Added Blockies Mar 11, 2025
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.

[React]: Create AvatarAccountBlockies component in shared UI component library
1 participant