feat: add new modal ui package with cleaned styles and code.#1333
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1333 +/- ##
=======================================
Coverage 74.93% 74.93%
=======================================
Files 184 184
Lines 4513 4513
Branches 1105 1105
=======================================
Hits 3382 3382
Misses 1131 1131 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" /> | ||
| <title>SDK Install Modal Web</title> | ||
| <script type="module" src="/build/sdk-install-modal-web.esm.js"></script> | ||
| <script nomodule src="/build/sdk-install-modal-web.js"></script> |
There was a problem hiding this comment.
Bug: Inconsistent Naming Across SDK Package
The sdk-multichain-ui package suffers from inconsistent naming. The Stencil namespace, README.md title, package.json description, src/index.html script sources, and the UMD bundle name (MetaMaskSDKInstallModal) incorrectly reference the old sdk-install-modal-web name. This leads to incorrect build output file names, prevents the demo page from loading components, and causes general confusion and potential naming conflicts.
Locations (5)
There was a problem hiding this comment.
that is not true, demos work
| <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" /> | ||
| <title>SDK Install Modal Web</title> | ||
| <script type="module" src="/build/sdk-install-modal-web.esm.js"></script> | ||
| <script nomodule src="/build/sdk-install-modal-web.js"></script> |
There was a problem hiding this comment.
Bug: SDK Package Naming Mismatch
The sdk-multichain-ui package has a naming inconsistency: its README, Stencil namespace, and index.html script references use sdk-install-modal-web. This mismatch causes incorrect build output file names, leading to script loading failures in index.html and potential developer confusion.
Locations (3)
| file: packageJson.unpkg, | ||
| format: 'umd', | ||
| exports: 'named', | ||
| name: 'MetaMaskSDKInstallModal', |
There was a problem hiding this comment.
Bug: UMD Build Issues: Global Name Mismatch & Unpkg Path Error
The rollup.config.js has two issues: the UMD build's global name MetaMaskSDKInstallModal is inconsistent with the sdk-multichain-ui package name, and the UMD output file path references a non-existent packageJson.unpkg field, which will result in an undefined path and likely build failure.
Locations (1)
| import { visualizer } from 'rollup-plugin-visualizer'; | ||
|
|
||
| export const config: Config = { | ||
| namespace: 'sdk-install-modal-web', |
68e3fd7 to
5c5d488
Compare
5c5d488 to
ce4cf69
Compare
| <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" /> | ||
| <title>SDK Install Modal Web</title> | ||
| <script type="module" src="/build/sdk-install-modal-web.esm.js"></script> | ||
| <script nomodule src="/build/sdk-install-modal-web.js"></script> |
There was a problem hiding this comment.
Bug: Incorrect Package Name in Multiple Files
The sdk-multichain-ui package incorrectly uses the name 'sdk-install-modal-web' in its README.md title, src/index.html script imports, and stencil.config.ts namespace. This inconsistency causes confusion and prevents the application from loading as script references will not match the actual build output filenames.
Locations (3)
| <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" /> | ||
| <title>SDK Install Modal Web</title> | ||
| <script type="module" src="/build/sdk-install-modal-web.esm.js"></script> | ||
| <script nomodule src="/build/sdk-install-modal-web.js"></script> |
There was a problem hiding this comment.
Bug: Incorrect Namespace Causes Build Output Errors
The Stencil namespace is sdk-install-modal-web instead of sdk-multichain-ui. This mismatch causes incorrect build output file names. As a result, index.html references incorrect script paths, leading to 404 errors and preventing the demo page from loading.
Locations (2)
| file: packageJson.unpkg, | ||
| format: 'umd', | ||
| exports: 'named', | ||
| name: 'MetaMaskSDKInstallModal', |
There was a problem hiding this comment.
Bug: UMD Bundle Configuration Errors
The rollup.config.js for the sdk-multichain-ui package has two issues with its UMD bundle configuration: the bundle name is incorrectly set to 'MetaMaskSDKInstallModal', and the output file path uses packageJson.unpkg while the "unpkg" field is missing from package.json.
Locations (1)
|



Explanation
Introducing the replacement to the old sdk-install-modal package.
I've integrated the InstallModal with new designs and removed the other 2 modals.
In a separate PR we will add the 2FA Modal with similar styles but for now let's start with a clean package, or as clean.


Checklist