Skip to content

Conversation

@amandaye0h
Copy link

@amandaye0h amandaye0h commented Oct 8, 2025

Description

This PR refines the borderRadius of the AvatarBase.XS from 4px to 5px to improve visual cohesion with our typography. At 4px, the icons looked too sharp. This change makes our icons feel like they scale more naturally.

Related issues

Fixes:

Manual testing steps

  1. Run yarn storybook to test that the changes have been made

Screenshots/Recordings

Before

Screenshot 2025-10-08 at 6 11 25 PM

After

Screenshot 2025-10-08 at 10 04 43 PM Screenshot 2025-10-08 at 9 55 30 PM

Figma file has been updated here

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.

Note

Updates AvatarBase XS square radius from 4px to 5px in both web and React Native; simplifies Storybook getAbsolutePath config.

  • Design System:
    • AvatarBase: Change XS square border radius from 4px (rounded-sm) to 5px (rounded-[5px]) in:
      • packages/design-system-react/src/components/AvatarBase/AvatarBase.constants.ts
      • packages/design-system-react-native/src/components/AvatarBase/AvatarBase.constants.ts
  • Storybook:
    • apps/storybook-react/.storybook/main.ts: Simplify getAbsolutePath() to return the value (typed string) and add fileURLToPath import.

Written by Cursor Bugbot for commit d29beb9. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

📖 Storybook Preview

@amandaye0h amandaye0h marked this pull request as ready for review October 8, 2025 14:06
@amandaye0h amandaye0h requested a review from a team as a code owner October 8, 2025 14:06
@amandaye0h amandaye0h changed the title fix: Updates border radius of AvatarBase.XS to improve visual cohesion fix: Update border radius of AvatarBase.XS to improve visual cohesion Oct 8, 2025
Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Well done on updating both react and react native instances. I've left a couple questions

Comment on lines +3 to 13
import { fileURLToPath } from 'url';

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that are set up within a monorepo.
*
* @param value
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
function getAbsolutePath(value: string): string {
return value;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for this change?

string
> = {
[AvatarBaseSize.Xs]: 'rounded-sm', // 4px
[AvatarBaseSize.Xs]: 'rounded-[5px]', // 5px
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason why we can't stay within the tailwind system? Is this the only place we should be using a 5px border radius?

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.

3 participants