Skip to content

Conversation

@lionellbriones
Copy link
Contributor

@lionellbriones lionellbriones commented Jan 30, 2026

Motivation and Context

Jira Link:

Description

  • Use useWidget hook on non-dumb components.
  • Only for non-function props (will do function props later PR)

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Medium Risk
Moderate UI refactor that removes several props in favor of context, which can cause runtime issues if any consumers weren’t wrapped by WidgetProvider or if defaults/derived values differ. Also changes chain filter render logic, which could alter visible wallet filtering behavior.

Overview
Moves non-functional inputs to WidgetContext. Root, Login, ConnectWallet, and related subcomponents now read appLogo, walletRegistry, chainNamespaces, deviceDetails, and uiConfig via useWidget, dropping these from component props and simplifying WidgetRoot wiring.

Updates UI config plumbing and defaults. WidgetContext now stores uiConfig as LoginModalProps and applies a default buttonRadiusType: "pill"; BottomSheet no longer takes uiConfig and instead accepts borderRadiusType directly.

Behavioral tweak. ConnectWalletChainFilter now derives namespaces from context and changes when the filter renders (early-return logic), which may affect chain selection UI/filters.

Written by Cursor Bugbot for commit 57e7227. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment Jan 30, 2026 11:08am

Request Review

@lionellbriones lionellbriones changed the base branch from master to feat/modal-ui-revamp January 30, 2026 10:48

if (chainNamespaces.length === 0) {
return null;
}
Copy link

Choose a reason for hiding this comment

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

Chain filter shows unnecessarily with single chain namespace

Medium Severity

The chain filter component's visibility condition changed incorrectly. Previously, ConnectWalletChainFilter was only rendered when chainNamespace.length > 1. Now it's rendered unconditionally and returns null only when chainNamespaces.length === 0. This means with exactly one chain namespace, users see a redundant filter showing "All Chains" plus one chain option, which provides no useful filtering capability.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed change to > 1

*/
function BottomSheet({ isShown, onClose, children, uiConfig, sheetClassName, showCloseButton = true }: BottomSheetProps) {
const { borderRadiusType = "large" } = uiConfig;
function BottomSheet({ isShown, onClose, children, sheetClassName, showCloseButton = true, borderRadiusType = "large" }: BottomSheetProps) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just pass borderRadius type instead of whole uiCofig

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

const { analytics } = useContext(AnalyticsContext);
const { appLogo, deviceDetails, uiConfig } = useWidget();
const {
buttonRadiusType: buttonRadius = "pill",
Copy link

Choose a reason for hiding this comment

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

Redundant default value for buttonRadiusType

Low Severity

The default value = "pill" for buttonRadiusType is redundant. WidgetContext.tsx already sets this default in its useMemo (line 56: buttonRadiusType: "pill"), guaranteeing the value will never be undefined when accessed via useWidget(). Having the same default in two places creates a maintenance risk where future changes to the default might only update one location.

Fix in Cursor Fix in Web

os,
platform,
SocialLoginEventType,
SocialLoginsConfig,
Copy link

Choose a reason for hiding this comment

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

Unused type properties in LoginProps interface

Low Severity

The appLogo and appName properties in LoginProps are no longer used. The Login component now obtains appLogo from useWidget() instead of props, and appName has never been used (only referenced in a TODO comment). These properties are not passed from Root.tsx to Login, making them dead interface members that could confuse future developers.

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

os,
platform,
SocialLoginEventType,
SocialLoginsConfig,
Copy link

Choose a reason for hiding this comment

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

Unused type properties in LoginProps interface

Low Severity

LoginProps interface defines appLogo and appName properties that are never passed to the Login component anymore. After refactoring, appLogo is obtained from useWidget() inside the component, and appName is not used at all. These type properties are now dead code and can be removed from the interface.

Fix in Cursor Fix in Web

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