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: shared bridge types #29254

Merged
merged 8 commits into from
Dec 19, 2024
Merged

refactor: shared bridge types #29254

merged 8 commits into from
Dec 19, 2024

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Dec 16, 2024

Description

There is a lint rule that flags lines in which controllers and ui components import types/variables/methods from restricted directories. This change moves the imported elements to the shared directory to satisfy the linter. Also uses import type to remove type definitions from runtime bundles when possible

Open in GitHub Codespaces

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMS-1829

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

N/A

After

N/A - no functional changes

Pre-merge author checklist

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.

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.

@micaelae micaelae force-pushed the mms1829-move-shared-files branch from 2047be9 to da99f2d Compare December 16, 2024 23:44
@micaelae micaelae changed the title refactor: move restricted bridge imports to shared directory refactor: shared bridge types Dec 17, 2024
@micaelae micaelae marked this pull request as ready for review December 17, 2024 00:38
@micaelae micaelae requested a review from a team as a code owner December 17, 2024 00:38
@micaelae micaelae marked this pull request as draft December 17, 2024 00:44
@micaelae micaelae force-pushed the mms1829-move-shared-files branch from e6821d4 to 3d1be62 Compare December 17, 2024 00:48
@micaelae micaelae marked this pull request as ready for review December 17, 2024 01:14
@metamaskbot
Copy link
Collaborator

Builds ready [3d1be62]
Page Load Metrics (1733 ± 99 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint55720431642290139
domContentLoaded14372281169320096
load14482291173320699
domInteractive24100402010
backgroundConnect7167393919
firstReactRender15101533215
getState5101182411
initialActions01000
loadScripts10591517125413062
setupStore680162010
uiStartup165125342078253121
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 1.79 KiB (0.03%)
  • ui: 9.06 KiB (0.11%)
  • common: -11.18 KiB (-0.14%)

Comment on lines 23 to 24
// TODO: Remove restricted import
// eslint-disable-next-line import/no-restricted-paths
Copy link
Contributor

Choose a reason for hiding this comment

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

Think you forgot to remove this comment?

@metamaskbot
Copy link
Collaborator

Builds ready [3708ad0]
Page Load Metrics (1633 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14871882163511957
domContentLoaded14361845160811154
load14861882163312058
domInteractive228437189
backgroundConnect976332110
firstReactRender16103483115
getState588152411
initialActions01000
loadScripts10411422119810450
setupStore686172311
uiStartup169224852010234112
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 1.79 KiB (0.03%)
  • ui: 9.06 KiB (0.11%)
  • common: -11.18 KiB (-0.14%)

infiniteflower
infiniteflower previously approved these changes Dec 17, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [0b8d21c]
Page Load Metrics (1659 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14551861167510149
domContentLoaded1445175016348038
load1453179016598842
domInteractive25114583115
backgroundConnect95627178
firstReactRender16100312311
getState492212411
initialActions01000
loadScripts1074132612246732
setupStore65411105
uiStartup15832154190112962
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 1.79 KiB (0.03%)
  • ui: 9.13 KiB (0.11%)
  • common: -11.25 KiB (-0.14%)

@micaelae micaelae added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit b114f88 Dec 19, 2024
77 checks passed
@micaelae micaelae deleted the mms1829-move-shared-files branch December 19, 2024 18:29
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-bridge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants