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

feat: Upgrade alert controller to base controller v2 #28054

Merged

Conversation

kanthesha
Copy link
Contributor

@kanthesha kanthesha commented Oct 23, 2024

Description

Following the Wallet Framework team's OKRs for Q3 2024, we want to bring AlertController up to date with our latest controller patterns.

Open in GitHub Codespaces

Related issues

Fixes: #25915

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

@kanthesha kanthesha requested a review from a team October 23, 2024 22:13
@kanthesha kanthesha self-assigned this Oct 23, 2024
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
Copy link
Collaborator

Builds ready [3c04312]
Page Load Metrics (2279 ± 109 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28426201862786377
domContentLoaded178025472241235113
load183125942279228109
domInteractive31104592110
backgroundConnect8104363115
firstReactRender623031395928
getState766352010
initialActions00000
loadScripts12981974169820699
setupStore1690392211
uiStartup204033372613316152
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -587 Bytes (-0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@kanthesha kanthesha marked this pull request as ready for review October 24, 2024 08:33
@kanthesha kanthesha requested a review from a team as a code owner October 24, 2024 08:33
mikesposito
mikesposito previously approved these changes Oct 24, 2024
Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

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

Looks good! only minor comments.

app/scripts/controllers/alert-controller.ts Show resolved Hide resolved
app/scripts/controllers/alert-controller.test.ts Outdated Show resolved Hide resolved
cryptodev-2s
cryptodev-2s previously approved these changes Oct 24, 2024
@kanthesha kanthesha dismissed stale reviews from cryptodev-2s and mikesposito via 7c3949e October 25, 2024 12:44
@metamaskbot
Copy link
Collaborator

Builds ready [7c3949e]
Page Load Metrics (1957 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint17722460195115775
domContentLoaded17262389190114871
load17732464195715574
domInteractive1797552110
backgroundConnect1295512813
firstReactRender541921042713
getState66521199
initialActions01000
loadScripts12781788142511856
setupStore1280272110
uiStartup19392687218117684
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -587 Bytes (-0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Overall looks pretty good, just had some suggestions on simplifying certain sections.

app/scripts/controllers/alert-controller.ts Outdated Show resolved Hide resolved
app/scripts/controllers/alert-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/alert-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/alert-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/alert-controller.test.ts Outdated Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [7c85b54]
Page Load Metrics (1867 ± 97 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint21427111804424204
domContentLoaded16242579183819895
load16282616186720397
domInteractive168142168
backgroundConnect778272311
firstReactRender44198933215
getState559232210
initialActions01000
loadScripts11541956134516881
setupStore1167262210
uiStartup182128872086233112
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -592 Bytes (-0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [47d9e70]
Page Load Metrics (1938 ± 144 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint48430121807531255
domContentLoaded163429251912285137
load164629981938301144
domInteractive17231554521
backgroundConnect1191302311
firstReactRender482951054723
getState47317199
initialActions01000
loadScripts116422211422230111
setupStore1289332512
uiStartup188332922176323155
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -592 Bytes (-0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

A few more things and then I'm good!

app/scripts/controllers/alert-controller.test.ts Outdated Show resolved Hide resolved
app/scripts/controllers/alert-controller.ts Outdated Show resolved Hide resolved
app/scripts/controllers/alert-controller.test.ts Outdated Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [9024513]
Page Load Metrics (2078 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22525901982455218
domContentLoaded17382551204920498
load178125702078208100
domInteractive2497482010
backgroundConnect878242211
firstReactRender941751182311
getState76121189
initialActions01000
loadScripts12481854150915976
setupStore1273312311
uiStartup200328332309226109
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -592 Bytes (-0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@desi desi requested a review from a team October 31, 2024 15:56
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Looks good!

@kanthesha kanthesha added this pull request to the merge queue Nov 1, 2024
Merged via the queue into develop with commit 9b85efb Nov 1, 2024
76 checks passed
@kanthesha kanthesha deleted the feat/upgrade-alert-controller-to-base-controller-v2 branch November 1, 2024 17:31
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
@metamaskbot metamaskbot added the release-12.8.0 Issue or pull request that will be included in release 12.8.0 label Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.8.0 Issue or pull request that will be included in release 12.8.0 team-wallet-framework
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Migrate AlertController to BaseController v2
6 participants