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

refactor: remove circular dependencies in ui/components/component-library/* #30267

Merged
merged 19 commits into from
Feb 12, 2025

Conversation

davidmurdoch
Copy link
Contributor

@davidmurdoch davidmurdoch commented Feb 12, 2025

This PR solves an issue with circular dependencies. It does not change the behavior of the application. It only rearranges functions/files to avoid circular references.

This PR changes some imports to import type { ... } imports, which don't count for circular dependencies, and changes other from referencing it's own parent index.ts file to just referencing the main file with the component it needs directly.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-extension-platform Extension Platform team label Feb 12, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [b089972]
Page Load Metrics (1853 ± 93 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15242250186619191
domContentLoaded15172189182217383
load15262254185319493
domInteractive257439147
backgroundConnect8187314019
firstReactRender15181393718
getState473262211
initialActions01000
loadScripts11141684133814871
setupStore86118178
uiStartup175526742142238114
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 858 Bytes (0.01%)

@davidmurdoch davidmurdoch changed the title Circles component library refactor: remove circular dependencies in ui/components/component-library/* Feb 12, 2025
@davidmurdoch davidmurdoch force-pushed the circles-component-library branch from b089972 to 7079e67 Compare February 12, 2025 16:05
@metamaskbot
Copy link
Collaborator

Builds ready [7079e67]
Page Load Metrics (1708 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14632239171316077
domContentLoaded14522203167215574
load14612242170816177
domInteractive258138188
backgroundConnect1180402612
firstReactRender1596352512
getState67020199
initialActions01000
loadScripts10431611121512158
setupStore8131021
uiStartup17282494195217182
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 858 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [d2c365d]
Page Load Metrics (1626 ± 62 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14591884163212660
domContentLoaded14401840160112158
load14481883162612962
domInteractive24114473014
backgroundConnect95427178
firstReactRender1583332512
getState54814157
initialActions01000
loadScripts9811354115311153
setupStore75411105
uiStartup16252070184113665
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 666 Bytes (0.01%)
  • common: 5.39 KiB (0.06%)

@davidmurdoch davidmurdoch marked this pull request as ready for review February 12, 2025 21:48
@davidmurdoch davidmurdoch requested review from a team and HowardBraham as code owners February 12, 2025 21:48
@davidmurdoch davidmurdoch requested review from dbrans and a team as code owners February 12, 2025 21:48
@metamaskbot
Copy link
Collaborator

Builds ready [33d3e11]
Page Load Metrics (1727 ± 61 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16820271643358172
domContentLoaded15201994169311756
load15312073172712661
domInteractive2495412110
backgroundConnect983332713
firstReactRender1573372311
getState56313157
initialActions01000
loadScripts1062151212279747
setupStore85416157
uiStartup17412300194614268
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 666 Bytes (0.01%)
  • common: 5.39 KiB (0.06%)

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.

LGTM! Apologies for introducing these

@davidmurdoch davidmurdoch added this pull request to the merge queue Feb 12, 2025
Merged via the queue into main with commit f38a93f Feb 12, 2025
76 checks passed
@davidmurdoch davidmurdoch deleted the circles-component-library branch February 12, 2025 23:46
@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2025
@metamaskbot metamaskbot added the release-12.13.0 Issue or pull request that will be included in release 12.13.0 label Feb 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.13.0 Issue or pull request that will be included in release 12.13.0 team-extension-platform Extension Platform team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants