Skip to content

feat: adds skeleton loader for quote fetching#27174

Merged
ghgoodreau merged 1 commit into
mainfrom
SWAPS-4230-quote-skeleton-loader
Mar 20, 2026
Merged

feat: adds skeleton loader for quote fetching#27174
ghgoodreau merged 1 commit into
mainfrom
SWAPS-4230-quote-skeleton-loader

Conversation

@ghgoodreau

@ghgoodreau ghgoodreau commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a skeleton loader during quote fetching in the swaps experience.

Changelog

CHANGELOG entry: improves quote loading UI

Related issues

Fixes: null

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Low risk UI/test-only change that adds deterministic testIDs and a small unit test for the quote details loading skeleton; no business logic or data flow changes.

Overview
Adds a dedicated QuoteDetailsCardSkeleton loading state with per-row testIDs and re-exports it from QuoteDetailsCard/index.ts.

Updates QuoteDetailsCard.test.tsx to cover the skeleton, asserting the QUOTE_DETAILS_SKELETON container renders and contains four loading rows.

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

@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Mar 8, 2026
@github-actions github-actions Bot added the size-S label Mar 8, 2026
@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeTrade, SmokeConfirmations
  • Selected Performance tags: @PerformanceSwaps
  • Risk Level: medium
  • AI Confidence: 75%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are isolated to the Bridge QuoteDetailsCard component, its skeleton, and associated unit test. This component is part of the Bridge (cross-chain) flow within the Trade wallet actions. Bridge flows are covered under SmokeTrade (which includes cross-chain bridging and quote handling). Since bridge execution involves on-chain transactions and confirmation screens, SmokeConfirmations must also be selected as required by the SmokeTrade tag definition.

There are no changes to core Engine, controllers, navigation, or shared infrastructure. The impact appears limited to UI rendering and presentation of bridge quote details, but this is a critical step in the bridge flow, so end-to-end validation of the Trade/Bridge flow is warranted.

No impact detected for accounts, identity, network permissions, snaps, perps, predictions, card, or ramps flows.

Performance Test Selection:
The modified component is part of the Bridge quote display within the Trade flow. Since quote rendering and bridge flows are included in swap-related performance coverage, and UI changes could affect rendering timing or responsiveness during quote display, running @PerformanceSwaps is prudent to validate no regressions in swap/bridge performance.

View GitHub Actions results

@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
7 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

sonarqubecloud Bot commented Mar 8, 2026

Copy link
Copy Markdown

@ghgoodreau ghgoodreau marked this pull request as ready for review March 20, 2026 15:50
@ghgoodreau ghgoodreau requested a review from a team as a code owner March 20, 2026 15:50

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.


expect(
getByTestId(BridgeViewSelectorsIDs.QUOTE_DETAILS_SKELETON),
).toBeDefined();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test uses toBeDefined() instead of toBeOnTheScreen()

Low Severity

The new skeleton test asserts element presence with toBeDefined() on the result of getByTestId(BridgeViewSelectorsIDs.QUOTE_DETAILS_SKELETON). The unit testing guidelines mandate using toBeOnTheScreen() for element presence assertions, not toBeTruthy() or toBeDefined(). toBeDefined() is a weak matcher that doesn't actually verify the element rendered to screen.

Fix in Cursor Fix in Web

Triggered by project rule: Unit Testing Guidelines

@ghgoodreau ghgoodreau added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit ba5d459 Mar 20, 2026
152 of 154 checks passed
@ghgoodreau ghgoodreau deleted the SWAPS-4230-quote-skeleton-loader branch March 20, 2026 16:27
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 20, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 size-S team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants