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

chore: remove MMI UI code #29884

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

chore: remove MMI UI code #29884

wants to merge 5 commits into from

Conversation

shane-t
Copy link
Member

@shane-t shane-t commented Jan 23, 2025

Description

As part of the MMI deprecation and code removal, it's necessary to remove the fenced UI code before the background code, since the UI code is lower in the dependency chain.

This PR removes any code that's inside a @build-mmi code fence. In order to satisfy various requirements this also means removing unused imports, which the PR also deletes.

The PR also removes tests (which have never been code fenced) because in many cases they are caused by fenced code.

In addition, any non-fenced code which is known to be MMI specific is removed.

It does not remove inverse MMI code fences, i.e. fences which are there to stop things running in MMI and are now redundant. This is for the sake of keeping the PR a bit smaller. Those will be removed in the next PR.

Related issues

Fixes: #29782

Manual testing steps

Not applicable, as no new feature is added. However, many/most UI features are touched.

Screenshots/Recordings

Before

image

After

image

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.

@metamaskbot metamaskbot added the team-mmi PRs from the MMI team label Jan 23, 2025
@shane-t shane-t force-pushed the 29782-remove-mmi-ui-code branch 6 times, most recently from 9d8b59d to b470fab Compare January 24, 2025 01:10
@metamaskbot
Copy link
Collaborator

Builds ready [9d8b59d]
Page Load Metrics (2066 ± 269 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint140632152073565272
domContentLoaded139830552032536257
load140630992066559269
domInteractive24164654923
backgroundConnect11131473517
firstReactRender1695432411
getState578222211
initialActions00000
loadScripts100323611531456219
setupStore65424189
uiStartup161936462388640307
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -120 Bytes (-0.00%)
  • ui: -9.18 KiB (-0.12%)
  • common: -341 Bytes (-0.00%)

@shane-t shane-t mentioned this pull request Jan 23, 2025
9 tasks
@shane-t shane-t force-pushed the 29782-remove-mmi-ui-code branch from d7d5042 to 749bfb1 Compare January 24, 2025 01:37
@shane-t shane-t changed the title chore: remove MMI fenced UI code Remove MMI UI code Jan 24, 2025
@shane-t shane-t marked this pull request as ready for review January 24, 2025 01:45
@shane-t shane-t requested review from a team as code owners January 24, 2025 01:45
@shane-t shane-t changed the title Remove MMI UI code chore: remove MMI UI code Jan 24, 2025
@@ -61,6 +61,7 @@ export enum IconName {
Connect = 'connect',
CopySuccess = 'copy-success',
Copy = 'copy',
Custody = 'custody',
Copy link
Member Author

Choose a reason for hiding this comment

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

The snaps SDK exports a type that contains this, so we can't remove this without causing typescript errors

@metamaskbot
Copy link
Collaborator

Builds ready [749bfb1]
Page Load Metrics (1869 ± 86 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24124071792398191
domContentLoaded16602382183118488
load16822399186918086
domInteractive26102422211
backgroundConnect16139503015
firstReactRender1695432813
getState775272210
initialActions01000
loadScripts11711874134517584
setupStore779192010
uiStartup196126852177220106
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: -9.18 KiB (-0.12%)
  • common: -5.63 KiB (-0.06%)

@metamaskbot
Copy link
Collaborator

Builds ready [c407b74]
Page Load Metrics (1688 ± 91 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27321541614359172
domContentLoaded14352129165917383
load14792199168818991
domInteractive24108382311
backgroundConnect895302411
firstReactRender1694452813
getState490202412
initialActions01000
loadScripts10151648119014771
setupStore781182110
uiStartup167126511972298143
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: -9.15 KiB (-0.11%)
  • common: -5.63 KiB (-0.06%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-mmi PRs from the MMI team
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants