Skip to content

feat: add new modal ui package with cleaned styles and code.#1333

Merged
elribonazo merged 10 commits into
mainfrom
features/ui-package
Jul 29, 2025
Merged

feat: add new modal ui package with cleaned styles and code.#1333
elribonazo merged 10 commits into
mainfrom
features/ui-package

Conversation

@elribonazo

@elribonazo elribonazo commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

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.
Screenshot 2025-07-29 at 11 14 43
Screenshot 2025-07-29 at 11 14 34

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@elribonazo elribonazo requested a review from a team as a code owner July 24, 2025 16:27
@socket-security

socket-security Bot commented Jul 24, 2025

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​qr-code-styling@​1.9.210010010084100

View full report

Comment thread packages/sdk-multichain-ui/src/index.html
Comment thread packages/sdk-multichain-ui/src/index.html
@codecov

codecov Bot commented Jul 24, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.93%. Comparing base (5681cdb) to head (3920061).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elribonazo elribonazo self-assigned this Jul 28, 2025
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that is not true, demos work

Comment thread packages/sdk-multichain-ui/src/components/mm-install-modal/mm-install-modal.tsx Outdated
Comment thread packages/sdk-multichain-ui/rollup.config.js Outdated
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)

Fix in Cursor Fix in Web

file: packageJson.unpkg,
format: 'umd',
exports: 'named',
name: 'MetaMaskSDKInstallModal',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)

Fix in Cursor Fix in Web

import { visualizer } from 'rollup-plugin-visualizer';

export const config: Config = {
namespace: 'sdk-install-modal-web',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Incorrect Namespace Causes Build and Naming Issues

The namespace in stencil.config.ts is incorrectly set to sdk-install-modal-web instead of sdk-multichain-ui, which can lead to build issues and inconsistent component naming.

Locations (1)
Fix in Cursor Fix in Web

@elribonazo elribonazo force-pushed the features/ui-package branch 2 times, most recently from 68e3fd7 to 5c5d488 Compare July 29, 2025 09:47
@elribonazo elribonazo force-pushed the features/ui-package branch from 5c5d488 to ce4cf69 Compare July 29, 2025 09:48
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

file: packageJson.unpkg,
format: 'umd',
exports: 'named',
name: 'MetaMaskSDKInstallModal',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

@chakra-guy chakra-guy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud

Copy link
Copy Markdown

@elribonazo elribonazo merged commit f43be4a into main Jul 29, 2025
42 checks passed
@elribonazo elribonazo deleted the features/ui-package branch July 29, 2025 10:16
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.

2 participants