Skip to content

swap ui svg fix#83

Merged
keraliss merged 1 commit into
mainfrom
swap-ui-fix
Apr 3, 2026
Merged

swap ui svg fix#83
keraliss merged 1 commit into
mainfrom
swap-ui-fix

Conversation

@keraliss
Copy link
Copy Markdown
Collaborator

@keraliss keraliss commented Apr 3, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved swap status display by rendering text cleanly without embedded markup.
    • Refined swap amount calculations to prioritize correct backend data fields, ensuring accurate transaction values.
    • Updated color rendering in status indicators for better visual consistency.
  • Style

    • Removed unused font-size variable from theme configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d8547bfc-21f3-4d8f-a462-ef22abdf9eec

📥 Commits

Reviewing files that changed from the base of the PR and between 137b3b0 and 26bc52e.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • src/components/swap/Coinswap.js
  • src/components/swap/SwapHistory.js
  • src/components/swap/SwapReport.js
  • src/components/swap/SwapStateManager.js
  • src/styles/output.css
💤 Files with no reviewable changes (1)
  • src/styles/output.css

📝 Walkthrough

Walkthrough

This pull request refactors swap UI rendering and amount-field derivation across multiple swap components. The changes simplify hop status display by removing embedded icon markup and sanitizing text, prioritize newer field names (outgoingAmount/outgoing_amount) in amount normalization logic across three swap-related modules, and remove an unused Tailwind CSS theme variable.

Changes

Cohort / File(s) Summary
Swap UI Rendering
src/components/swap/Coinswap.js
Sanitized statusText by stripping SVG/HTML markup and normalizing whitespace; replaced Tailwind color classes with direct SVG fill attributes; removed icon markup from hop status strings; reformatted SVG and conditional rendering blocks.
Amount Field Normalization
src/components/swap/SwapHistory.js, src/components/swap/SwapReport.js, src/components/swap/SwapStateManager.js
Reordered field-selection logic to prioritize outgoingAmount and outgoing_amount fields when deriving target/output amounts in swap reports and history entries; updated fallback chains to check newer field names before legacy alternatives.
Theme Variables
src/styles/output.css
Removed unused Tailwind theme variables --text-6xl and --text-6xl--line-height from root theme block.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • ui: replace emojis with icons #80: Directly modifies Coinswap.js hop/status rendering logic, introducing icon markup that this PR simultaneously removes and normalizes.
  • unification of protocols #78: Updates the same swap-related components (Coinswap.js, SwapReport.js, SwapHistory.js) to modify hop rendering and target/outgoing amount derivation.
  • bug fixes #75: Modifies swap amount normalization logic, prioritizing outgoingAmount/outgoing_amount fields in SwapHistory and SwapReport, overlapping with this PR's field-selection changes.

Poem

🐰 Hops hop through swaps with cleaner text,
No SVG clutter, just the best!
Fields reordered, amounts aligned,
From legacy to new design,
Rabbit's refactor, smooth and neat! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'swap ui svg fix' is vague and does not clearly convey the specific changes made across multiple components and data handling improvements. Consider a more descriptive title such as 'Refactor swap UI to sanitize status text and update amount field prioritization' that better reflects the scope and intent of changes across multiple files.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch swap-ui-fix

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.

@keraliss keraliss merged commit 3cfc9e7 into main Apr 3, 2026
1 check passed
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