Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Conversation

jonybur
Copy link
Contributor

@jonybur jonybur commented Jul 16, 2025

@jonybur jonybur marked this pull request as ready for review July 16, 2025 01:59
@Copilot Copilot AI review requested due to automatic review settings July 16, 2025 01:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a suite of new design components to support preview modals, fee breakdowns, and amount input subsections, along with a common SubSection wrapper and utility helpers.

  • Added a responsive PreviewModal component and its Storybook stories.
  • Introduced FeesSection with related subcomponents (FeeItem, BTCFeeRate, BTCFeeAmount, BBNFeeAmount, Total) and stories.
  • Created AmountSubsection form input component, updated currency helpers, and exposed SubSection wrapper.

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/widgets/new-design/PreviewModal/index.tsx Added re-export for the PreviewModal entry point
src/widgets/new-design/PreviewModal/PreviewModal.tsx Implemented the main PreviewModal component
src/widgets/new-design/PreviewModal/PreviewModal.stories.tsx Storybook stories for PreviewModal
src/widgets/new-design/FeesSection/index.ts Re-exports for FeesSection subcomponents
src/widgets/new-design/FeesSection/Total.tsx Implemented Total fee component
src/widgets/new-design/FeesSection/FeesSection.tsx FeesSection container and layout
src/widgets/new-design/FeesSection/FeesSection.stories.tsx Storybook stories for FeesSection
src/widgets/new-design/FeesSection/FeeItem.tsx FeeItem layout component
src/widgets/new-design/FeesSection/BTCFeeRate.tsx BTC fee rate component with edit button
src/widgets/new-design/FeesSection/BTCFeeAmount.tsx BTC fee amount formatting component
src/widgets/new-design/FeesSection/BBNFeeAmount.tsx BBN fee amount formatting component
src/widgets/new-design/AmountSubsection/index.tsx Re-export for AmountSubsection
src/widgets/new-design/AmountSubsection/AmountSubsection.tsx AmountSubsection form input component
src/widgets/new-design/AmountSubsection/AmountSubsection.stories.tsx Storybook stories for AmountSubsection
src/utils/helpers.ts Added formatCurrency, calculateTokenValueInCurrency, and maxDecimals helpers
src/components/SubSection/* Introduced SubSection wrapper, re-exports, and stories
src/index.tsx Updated main exports to include new widgets and SubSection
Comments suppressed due to low confidence (4)

src/widgets/new-design/PreviewModal/PreviewModal.tsx:35

  • [nitpick] The interface name Info is too generic; consider renaming it to something more descriptive like ProviderInfo or EntityInfo to clarify its purpose.
interface Info {

src/widgets/new-design/PreviewModal/PreviewModal.tsx:64

  • The PreviewModal component is newly added without corresponding unit tests—consider adding tests for its rendering, responsiveness, and button interactions.
export const PreviewModal = ({

src/widgets/new-design/FeesSection/FeesSection.tsx:24

  • There's no unit or integration test covering FeesSection; consider adding tests for its conditional rendering (e.g., when bbnFeeAmount is undefined).
export function FeesSection({

src/widgets/new-design/AmountSubsection/AmountSubsection.tsx:27

  • AmountSubsection lacks tests for form integration and balance display; consider adding cases for displayBalance on/off and validation handling.
export const AmountSubsection = ({

Copy link

@gbarkhatov gbarkhatov left a comment

Choose a reason for hiding this comment

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

Looks good, multiple minor UI suggestions

Copy link
Collaborator

@jrwbabylonlab jrwbabylonlab left a comment

Choose a reason for hiding this comment

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

@jonybur could u check with mobile device for all components?

@jonybur jonybur dismissed gbarkhatov’s stale review July 17, 2025 16:04

Will address on a separate PR

@jonybur jonybur merged commit 776eb85 into main Jul 17, 2025
4 checks passed
@jonybur jonybur deleted the jb-form-components branch July 17, 2025 16:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants