Skip to content

refactor: Remove circular dependencies and fix type exports #445

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

Closed
georgewrmarshall opened this issue Feb 20, 2025 · 0 comments · Fixed by #447
Closed

refactor: Remove circular dependencies and fix type exports #445

georgewrmarshall opened this issue Feb 20, 2025 · 0 comments · Fixed by #447
Assignees

Comments

@georgewrmarshall
Copy link
Contributor

Description

This task aims to remove circular dependencies in the design system components and fix how types are exported. This follows a similar refactor done in the MetaMask extension (see reference PR).

Technical Details

  • Remove circular dependencies by:
    • Creating separate constants files for size mappings
    • Directly importing components instead of using index files
    • Using `import type` for type-only imports
  • Fix type exports by:
    • Moving type definitions to their respective component files
    • Avoiding re-exporting types from other components
    • Using proper enum definitions instead of reusing from other components

Acceptance Criteria

  • No circular dependencies in the component library
  • Proper type exports for all components
  • No behavioral changes in the components
  • All tests pass
  • Storybook stories remain functional

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment