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 notification manager and triggerUi to use extension platform #8317

Merged
merged 2 commits into from
Apr 11, 2020

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Apr 9, 2020

The notification manager has been refactored to use the extension platform module instead of using extensionizer directly. The extension platform API presents a more ergonomic API, and it correctly
handles errors (which the old notification manager did not). Methods that the extension platform lacked have been added.

It has been updated to use async/await instead of callbacks as well, for readability.

The triggerUI function has also been updated to use the extension platform instead of extensionizer.

@Gudahtt Gudahtt changed the title Refactor notification manager to use extension platform Refactor notification manager and triggerUi to use extension platform Apr 9, 2020
@Gudahtt
Copy link
Member Author

Gudahtt commented Apr 9, 2020

This depends upon #8314

Edit: #8314 has been merged, so this is now ready to review.

@metamaskbot
Copy link
Collaborator

Builds ready [fff264c]
Page Load Metrics (602 ± 37 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeNotificationfirstPaint338039105
domContentLoaded3216726007837
load3276736027737
domInteractive3216716007837

The notification manager has been refactored to use the extension
platform module instead of using `extensionizer` directly. The
extension platform API presents a more ergonomic API, and it correctly
handles errors (which the old notification manager did not). Methods
that the extension platform lacked have been added.

It has been updated to use `async/await` instead of callbacks as well,
for readability.

The `triggerUI` function has also been updated to use the extension
platform instead of `extensionizer`.
@Gudahtt Gudahtt force-pushed the refactor-notification-manager branch from fff264c to 6237c68 Compare April 9, 2020 23:44
@Gudahtt Gudahtt changed the base branch from fix-popup-not-opening to develop April 9, 2020 23:44
@Gudahtt Gudahtt marked this pull request as ready for review April 9, 2020 23:44
@Gudahtt Gudahtt requested review from whymarrh, danjm and rekmarks April 9, 2020 23:45
@metamaskbot
Copy link
Collaborator

Builds ready [6237c68]
Page Load Metrics (561 ± 38 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeNotificationfirstPaint337837105
domContentLoaded3246055597838
load3256065617938
domInteractive3246055597838

The platform is now accessible via the `platform` instance variable
within the notification manager.
@metamaskbot
Copy link
Collaborator

Builds ready [5bc39b9]
Page Load Metrics (686 ± 19 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeNotificationfirstPaint34131462211
domContentLoaded6287576854019
load6297596864019
domInteractive6287576844019

Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

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

LGTM!

@Gudahtt Gudahtt merged commit 852277b into develop Apr 11, 2020
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants