-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[MMI] Added code fences in whats new popup #19581
[MMI] Added code fences in whats new popup #19581
Conversation
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. |
Builds ready [b6f5462]
Page Load Metrics (1836 ± 89 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov Report
@@ Coverage Diff @@
## develop #19581 +/- ##
===========================================
- Coverage 69.85% 69.83% -0.02%
===========================================
Files 980 981 +1
Lines 36909 36936 +27
Branches 9908 9911 +3
===========================================
+ Hits 25782 25794 +12
- Misses 11127 11142 +15
|
…mm-codebase # Conflicts: # ui/components/app/whats-new-popup/whats-new-popup.js
@metamaskbot update-policies |
Policies updated |
Builds ready [e6788ee]
Page Load Metrics (1714 ± 65 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
||
///: BEGIN:ONLY_INCLUDE_IN(build-mmi) | ||
renderNotification = renderFirstNotification; | ||
///: END:ONLY_INCLUDE_IN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... this is an interesting optimization, but I don't think it would pass typescript safety. renderFirstNotification and renderSubsequentNotification have different arguments, so even though the additional parameters for renderFirstNotification are on the end of the function parameters it would fail to compile in typescript due to extra params existing. In order to make this work you should probably change both renderFirst and renderSubsequent take an options bag ({ notification, idRefMap }) instead of positional parameters. When you add jsdoc types to them, you can define a new type using @typedef for the options and pass that type as the type for the first parameter to each function. Even if you don't reference the 4 additional properties on renderFirst in renderSubsequent it would still type check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @brad-decker, I fixed this issue. Please verify that this is what you asked for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
…ons in order to bypass possible typsecript issues
@metamaskbot update-policies |
No policy changes |
Builds ready [67a211e]
Page Load Metrics (1597 ± 39 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Explanation
Adding the MMI portfolio notifications without disrupting much of the existing MM logic while at the same time having it prepared to add new MMI-specific notifications in the future. Added code fences to three existing files:
https://consensyssoftware.atlassian.net/browse/MMI-2503
Pre-merge author checklist
Pre-merge reviewer checklist