Skip to content

feat: redesign transaction final states and add a dev showcase for them - #3109

Open
abjt14 wants to merge 2 commits into
mainfrom
abhijeet/tx-modal-states-styling
Open

abjt14 wants to merge 2 commits into
mainfrom
abhijeet/tx-modal-states-styling

Conversation

@abjt14

@abjt14 abjt14 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Dev showcase

  • New /dev/components/tx-final-states section: every transaction final state rendered with the real components, mock props and mocked modal/wallet contexts.
  • The showcase theme control now switches the app theme (Light / Dark / System) via useColorScheme instead of a local data-mui-color-scheme override, so the showcase-only portal workarounds are gone.
  • Shared Group section heading; Specimen gains a bare stage option.

Final states (Figma)

  • TxStatusHeader: 3rem status disc with the Figma glyphs, H2 title, Base subtitle with the amount in H5, 2.5rem/1.5rem padding and a 16% colour wash from the top of the modal.
  • TxResultView replaces BaseWaitingView/BaseCancelledView and covers success, in progress, cancelled and expired; BaseSuccessView wraps it.
  • TxResultActions: "Review Transaction" (secondary, 3rem, arrow only for external links) and "Done" (primary, 3rem) with a 1rem gap. It hides the modal close X while mounted; TxErrorView reuses it with "Close".
  • Per-flow titles ("Supplied Successfully", ...) with the verb lowercased in the subtitle; failed reads "Transaction Failed / We were unable to complete this transaction".
  • Add to wallet drops its card for a purpose line and a secondary button with the token icon.
  • Swap result: CoW expired split from cancelled; the summary card becomes TxResultDetails rows (Base fg-3 label, H5 fg-1 value, 1.0625rem gap) with a Surplus row, FormattedNumber amounts and translated labels. The history link opens in-app and closes the modal. A dev-only previewOrder prop lets the showcase pin CoW states.

Shared pieces

  • BasicModal: extracted BasicModalSurface and useHideModalCloseButton.
  • Theme: base line-height 1.125rem (Figma Base); the modal Paper isolates its stacking context and sets --modal-button-secondary-fill, so secondary buttons inside modals use button/bg-3 (#28282a) in dark.
  • Link exports isExternalHref; Row accepts a base caption.

Copy

  • "Cancellation submited" becomes the title "Cancellation Submitted", and the Cancel order title is hidden on success.
  • "could't" -> "couldn't"; collateral sentence rewritten; Bridge sentence gains its full stop; "swapped and repaid" loses the double space.

Tests

  • Cypress asserts the success state via [data-cy=txSuccess], and the close helpers click Done when the X is hidden.

General Changes

  • Fixes XYZ bug
  • Adds XYZ feature

Developer Notes

Add any notes here that may be helpful for reviewers.


Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

Dev showcase
- New /dev/components/tx-final-states section: every transaction final state
  rendered with the real components, mock props and mocked modal/wallet
  contexts.
- The showcase theme control now switches the app theme (Light / Dark /
  System) via useColorScheme instead of a local data-mui-color-scheme
  override, so the showcase-only portal workarounds are gone.
- Shared Group section heading; Specimen gains a `bare` stage option.

Final states (Figma)
- TxStatusHeader: 3rem status disc with the Figma glyphs, H2 title, Base
  subtitle with the amount in H5, 2.5rem/1.5rem padding and a 16% colour
  wash from the top of the modal.
- TxResultView replaces BaseWaitingView/BaseCancelledView and covers
  success, in progress, cancelled and expired; BaseSuccessView wraps it.
- TxResultActions: "Review Transaction" (secondary, 3rem, arrow only for
  external links) and "Done" (primary, 3rem) with a 1rem gap. It hides the
  modal close X while mounted; TxErrorView reuses it with "Close".
- Per-flow titles ("Supplied Successfully", ...) with the verb lowercased in
  the subtitle; failed reads "Transaction Failed / We were unable to complete
  this transaction".
- Add to wallet drops its card for a purpose line and a secondary button
  with the token icon.
- Swap result: CoW expired split from cancelled; the summary card becomes
  TxResultDetails rows (Base fg-3 label, H5 fg-1 value, 1.0625rem gap) with a
  Surplus row, FormattedNumber amounts and translated labels. The history
  link opens in-app and closes the modal. A dev-only previewOrder prop lets
  the showcase pin CoW states.

Shared pieces
- BasicModal: extracted BasicModalSurface and useHideModalCloseButton.
- Theme: `base` line-height 1.125rem (Figma Base); the modal Paper isolates
  its stacking context and sets --modal-button-secondary-fill, so secondary
  buttons inside modals use button/bg-3 (#28282a) in dark.
- Link exports isExternalHref; Row accepts a `base` caption.

Copy
- "Cancellation submited" becomes the title "Cancellation Submitted", and the
  Cancel order title is hidden on success.
- "could't" -> "couldn't"; collateral sentence rewritten; Bridge sentence gains
  its full stop; "swapped  and repaid" loses the double space.

Tests
- Cypress asserts the success state via [data-cy=txSuccess], and the close
  helpers click Done when the X is hidden.
@abjt14 abjt14 self-assigned this Sep 24, 2026
@odin-by-borg

odin-by-borg Bot commented Sep 24, 2026

Copy link
Copy Markdown

Mjolnir Security Review

New commits since last review at 8dc41d4.

Run Mjolnir Review


21 PRs reviewed · 1 finding

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
interface Ready Ready Preview Sep 24, 2026 3:16am UTC

Request Review

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 1.34 MB (🟡 +1.26 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Nine Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 93.14 KB (🟡 +68 B) 1.43 MB
/bridge 38.46 KB (🟡 +206 B) 1.38 MB
/dashboard 81.79 KB (🟡 +67 B) 1.42 MB
/faucet 11.37 KB (🟡 +3 B) 1.35 MB
/governance/v3/proposal 84.6 KB (🟡 +102 B) 1.42 MB
/reserve-overview 39.02 KB (🟡 +24 B) 1.38 MB
/safety-module 55.46 KB (🟡 +212 B) 1.39 MB
/staking 31.51 KB (🟡 +59 B) 1.37 MB
/v3-migration 48.59 KB (-1 B) 1.39 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

- Cut the gallery from 38 frames to 16: one per distinct layout, with each
  label listing the flows that share it, instead of one frame per flow.
- Drop the per-flow success copies, the four swap-flow label variants and the
  ParaSwap, collateral-off, on-chain-cancel and support duplicates.
- Fold the swap base props into the single CoW order mock they now serve.
- The section drops from 409 to 273 lines.
@github-actions

Copy link
Copy Markdown

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 1.34 MB (🟡 +1.28 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Nine Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 93.14 KB (🟡 +68 B) 1.43 MB
/bridge 38.46 KB (🟡 +206 B) 1.38 MB
/dashboard 81.79 KB (🟡 +67 B) 1.42 MB
/faucet 11.37 KB (🟡 +3 B) 1.35 MB
/governance/v3/proposal 84.6 KB (🟡 +102 B) 1.42 MB
/reserve-overview 39.02 KB (🟡 +24 B) 1.38 MB
/safety-module 55.46 KB (🟡 +212 B) 1.39 MB
/staking 31.51 KB (🟡 +59 B) 1.37 MB
/v3-migration 48.59 KB (-1 B) 1.39 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@github-actions

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
Preview 847ee359 Deployed Sep 24, 2026 by vercel[bot]
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.

1 participant