Skip to content

Conversation

@aizad-deriv
Copy link
Contributor

@aizad-deriv aizad-deriv commented Jul 22, 2024

Changes:

  • Replace props with sub components i.e. TradingAppCard.Icon, TradingAppCard.Content & TradingAppCard.Button
  • Added new styles and remove unused styles
  • Replace all the previous implementations with the new one
  • Fix failed test cases

Screenshots:

Previous Implementation:

                <TradingAccountCard
                    key={`added-ctrader-${account.login}`}
                    leading={<div className='wallets-added-ctrader__icon'>{PlatformDetails.ctrader.icon}</div>}
                    onClick={() => show(<MT5TradeModal platform={PlatformDetails.ctrader.platform} />)}
                    trailing={
                        <div className='wallets-added-ctrader__icon'>
                            <LabelPairedChevronRightCaptionRegularIcon width={16} />
                        </div>
                    }
                >
                    <div className='wallets-added-ctrader__details'>
                        <WalletText size='sm'>{PlatformDetails.ctrader.title}</WalletText>
                        <WalletText size='sm' weight='bold'>
                            {account?.display_balance}
                        </WalletText>
                        <WalletText size='xs'>{account.login}</WalletText>
                    </div>
                </TradingAccountCard>

Current implementation:

                <TradingAccountCard
                    key={`added-ctrader-${account.login}`}
                    onClick={() => show(<MT5TradeModal platform={PlatformDetails.ctrader.platform} />)}
                >
                    <TradingAccountCard.Icon>{PlatformDetails.ctrader.icon}</TradingAccountCard.Icon>
                    <TradingAccountCard.Content>
                        <WalletText size='sm'>{PlatformDetails.ctrader.title}</WalletText>
                        <WalletText size='sm' weight='bold'>
                            {account?.display_balance}
                        </WalletText>
                        <WalletText size='xs'>{account.login}</WalletText>
                    </TradingAccountCard.Content>
                    <TradingAccountCard.Button>
                        <LabelPairedChevronRightCaptionRegularIcon width={16} />
                    </TradingAccountCard.Button>
                </TradingAccountCard>

@aizad-deriv aizad-deriv self-assigned this Jul 22, 2024
@aizad-deriv aizad-deriv requested a review from a user July 22, 2024 08:58
@vercel
Copy link

vercel bot commented Jul 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Aug 27, 2024 9:32am

@github-actions
Copy link
Contributor

github-actions bot commented Jul 22, 2024

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/16148](https://github.com/binary-com/deriv-app/pull/16148)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-aizad-deriv-aizad-refactor-trading-ap-fa40e9.binary.sx?qa_server=red.derivws.com&app_id=38777
    - **Original**: https://deriv-app-git-fork-aizad-deriv-aizad-refactor-trading-ap-fa40e9.binary.sx
- **App ID**: `38777`

@github-actions
Copy link
Contributor

github-actions bot commented Jul 22, 2024

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 33
🟧 Accessibility 70
🟢 Best practices 92
🟧 SEO 77
🟧 PWA 78

Lighthouse ran with https://deriv-app-git-fork-aizad-deriv-aizad-refactor-trading-ap-fa40e9.binary.sx/

@coveralls
Copy link

coveralls commented Jul 23, 2024

Coverage Status

coverage: 46.952% (+0.07%) from 46.886%
when pulling c69828f on aizad-deriv:aizad/refactor-trading-app-card-component
into 3a2ab81 on binary-com:master.

@aizad-deriv aizad-deriv changed the title [WALL] Aizad/Refactoring Trading App Card [WALL] Aizad/WALL-4683/Refactoring Trading App Card Aug 8, 2024
ghost
ghost previously approved these changes Aug 9, 2024
jim-deriv
jim-deriv previously approved these changes Aug 9, 2024
@sonarqubecloud
Copy link

@heorhi-deriv heorhi-deriv merged commit 99dbb38 into deriv-com:master Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants