Skip to content

Conversation

@fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Nov 14, 2025

Summary

Delivered the Step 8 desktop chain sidebar: added a reusable ChainPanel (search, loading, empty states) plus a vertical/accented ChainsSelector, and wired both into SelectTokenModal so bridging flows render the sidebar while non-bridging contexts fall back to a single-column layout. SelectTokenWidget now gates the panel via useIsBridgingEnabled and provides localized titles.

To Test

  1. Desktop swap with bridging enabled
  • Selector width expands and the chain panel appears on the right with the “Cross chain swap” title
  • Search box filters the chain list; empty-query + zero chains shows “No networks available for this trade.”
  • Selecting a chain highlights the row and closes the panel via the shared handler
  1. Desktop swap with bridging disabled
  • Chain panel is hidden and no inline ChainsSelector renders; selector layout matches the prior single-column design
  • Manage token lists button still opens/closes correctly
  • Token list scrolling and selection behave as before
  1. Cosmos fixtures
  • SelectTokenModal stories (default, noChainPanel) render without errors and show the expected layouts
  • ChainsSelector stories (default, loading) demonstrate the vertical list and skeletons

Background

Part of the token-selector split rollout (Step 8): migrate the desktop chain sidebar from the monolithic branch while keeping the mobile experience unchanged ahead of Step 9.

@vercel
Copy link

vercel bot commented Nov 14, 2025

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

Project Deployment Preview Updated (UTC)
cowfi Ready Ready Preview Dec 12, 2025 5:31pm
explorer-dev Ready Ready Preview Dec 12, 2025 5:31pm
swap-dev Ready Ready Preview Dec 12, 2025 5:31pm
widget-configurator Ready Ready Preview Dec 12, 2025 5:31pm
2 Skipped Deployments
Project Deployment Preview Updated (UTC)
cosmos Ignored Ignored Dec 12, 2025 5:31pm
sdk-tools Ignored Ignored Preview Dec 12, 2025 5:31pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/token-selector-8

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fairlighteth
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 18, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

))}
</styledEl.Wrapper>
)
const CHAIN_ACCENT_VAR_MAP: Record<SupportedChainId, ChainAccentVars> = {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: I think it's better to move it to another const file to make the component file more clear

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been addressed.

const legacyChainsState =
!showChainPanel && chainsToSelect && (chainsToSelect.chains?.length ?? 0) > 0 ? chainsToSelect : undefined
const resolvedChainPanelTitle = chainsPanelTitle ?? t`Cross chain swap`
const chainPanel =
Copy link
Contributor

@limitofzero limitofzero Nov 26, 2025

Choose a reason for hiding this comment

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

nitpick: I think it makes sense to wrap it by useMemo

const chainPanel = useMemo(
() =>
showChainPanel && chainsToSelect ? (

) : null,
[showChainPanel, chainsToSelect, onSelectChain, resolvedChainPanelTitle],
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been addressed.

Resolved conflicts by accepting removal of SelectTokenModalContent wrapper
(inlined in feat/token-selector-4).
Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Same as previous:

image

Approving with that caveat

@@ -1,4 +1,4 @@
/* eslint-disable no-restricted-imports */ // TODO: Don't use 'modules' import
// TODO: Don't use 'modules' import
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this comment still relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't think so, removed now def614d

<styledEl.ChainText>{chain.label}</styledEl.ChainText>
</styledEl.ChainInfo>
{isActive && (
<styledEl.ActiveIcon aria-hidden="true" accent$={accent} color$={chain.color}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tiny nipick:

Suggested change
<styledEl.ActiveIcon aria-hidden="true" accent$={accent} color$={chain.color}>
<styledEl.ActiveIcon aria-hidden accent$={accent} color$={chain.color}>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants