Repository navigation
feat(bridge): signal board, slide to confirm and a /bridge page - #121
Closed
Vasanthdev2004 wants to merge 2 commits into
Closed
Vasanthdev2004 wants to merge 2 commits into
Vasanthdev2004 wants to merge 2 commits into
Conversation
A redesign of the bridge panel that leaves the transfer logic alone: useBridge, the validators and every wallet guard are unchanged. - signal board: a dot-matrix strip spells the two networks and runs lights along the route. What it shows is a pure function of the transfer state (lib/bridge/signal.ts); packets move only for a tracked pending transfer. Decorative (aria-hidden), canvas, still under reduced motion, a dark plate in both themes - dot numerals (Doto, OFL) for the amount and the estimated output, loaded with the lazy panel only - slide to confirm: for the deposit step alone, a coin can be dragged across a rail. Only a release or Enter at the far end confirms (lib/bridge/slide.ts); the slide and the button share one guarded submit path and the button never goes away - /bridge: the same panel as a page with the networks, steps, costs and limits beside it. The page registers a slot and the header's one controller renders into it, so no second bridge hook runs - shareable links: /bridge?from=&to=&asset=&toAsset= preselects a route through the pickers' guarded setters; no amount, ignored whole if any value is off (lib/bridge/link.ts) - sitemap and footer list /bridge; docs/bridge.md section; tests for the board states, drag rules, links, the single controller and the shapes
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Collaborator
Author
|
Closed in favour of #135, which holds the whole bridge update in one PR. The commits from this PR are in it unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #120 (funding networks), which is stacked on #119 and #118. Base is
feat/bridge-funding-chainsso this diff shows only the redesign.What
A redesign of the bridge panel plus a full
/bridgepage. The transfer logic is untouched:useBridge, the validators and every wallet guard are the same files as before.BASE,HOOD,ARC,ETH,ARB,OP) and runs lights along the route between them./bridgepage. The same panel as a page, with the networks, steps, costs and limits next to it./bridge?from=arbitrum&to=base&asset=USDC&toAsset=USDCpreselects a route.How it stays safe
lib/bridge/signal.ts). Lights travel "in transit" only for a tracked, pending transfer. It turns green only on a reported arrival, and amber for a refund or anything unknown or failed. It is decorative (aria-hidden); the panel's own status text says the same thing in words.lib/bridge/slide.ts). Letting go anywhere else puts the coin back and requests nothing. The slide and the button call one shared function with the same guards. Approvals, quotes and refreshes are never slid./bridgepage does not run a second copy of the bridge. It registers an empty element (components/bridge/bridge-slot.ts) and the header's existing controller renders the panel into it, so a transfer is quoted, sent and tracked once. While the page is open, the header button focuses the page's panel instead of opening the dialog.tomust be a launch chain.Notes for review
next/font/google, the same way Geist is loaded. It is declared incomponents/bridge/dot-font.tswithpreload: false, so it ships with the lazily loaded panel and is not preloaded site-wide.prefers-reduced-motion./bridgeis added to the sitemap and the footer.Checks
tscclean,eslint0 errors (the 5 existing warnings)/bridgerenders the panel through the header's controller; a link preselected Arbitrum to Base with USDC/ui-review-bridgefixture, a half drag reset with "Nothing was sent" and a full drag confirmed; the board switched to "In transit"Not done: a production
next buildwas not run on this machine, and no wallet signed anything.Two bugs found and fixed while checking, both covered by tests: