Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mike/trcl 3314 trading rewards profile card #36

Merged
merged 9 commits into from
Dec 4, 2023

Conversation

mike-dydx
Copy link
Contributor

@mike-dydx mike-dydx commented Dec 4, 2023

Links (dYdX Internal Use Only)

Linear Ticket: TRCL-3314 : Trading Rewards Profile Card

Figma Design: https://www.figma.com/file/fMQodZKzn9B5aZTN5G0fLJ/dYdX-%E2%80%BA-Desktop?type=design&node-id=19900-54665&mode=design&t=OifmOQjr8CYRVNL0-4


Description / Intuition

  • creates a reusable dydxTitledCardView base component
  • refactors history and fees profile cards to use new dydxTitledCardView
  • adds new dydxProfileRewardsView for displaying rewards
  • makes "reduce-only" toggle title one line only

Note, abacus is not yet ready with rewards data, so the rewards card is commented out for now


Before/After Screenshots or Videos

Before After

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring or Technical Debt
  • Documentation update
  • Other (please describe: )

Copy link

linear bot commented Dec 4, 2023

TRCL-3314 Trading Rewards Profile Card

figma

As a user

I would like to see a trading rewards summary card on my profile screen which, when tapped, navigates to a trading rewards details screen

@mike-dydx mike-dydx self-assigned this Dec 4, 2023
@mike-dydx mike-dydx requested review from johnqh and ruixhuang December 4, 2023 21:11
@mike-dydx mike-dydx force-pushed the mike/trcl-3314-trading-rewards-profile-card branch from d5eb865 to d8fad93 Compare December 4, 2023 21:31
Comment on lines -40 to -52
HStack {
Text(DataLocalizer.localize(path: "APP.GENERAL.FEES"))
.themeFont(fontSize: .small)
Spacer()
PlatformIconViewModel(type: .system(name: "chevron.right"),
size: CGSize(width: 10, height: 10),
templateColor: .textSecondary)
.createView(parentStyle: style)
Text(self.takerFeeRate ?? "-")
.themeFont(fontType: .text, fontSize: .small)
.themeColor(foreground: .textPrimary)
.leftAligned()
}
.padding()

DividerModel()
.createView(parentStyle: style)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this code was refactored into a shared base class dydxTitledCardView

@mike-dydx mike-dydx merged commit 1883d25 into main Dec 4, 2023
2 checks passed
@mike-dydx mike-dydx deleted the mike/trcl-3314-trading-rewards-profile-card branch December 4, 2023 21:58
mike-dydx added a commit that referenced this pull request Aug 20, 2024
* refactor fees card with reusable title card view

* refactor history view to use dydxTitledCardView

* change name for profile "rewards" -> "balances" card

* do not wrap "reduce-only" text

* add rewards card to profile landing screen

* add comment

* reorder cards

* clean up

* set up presenter view model links
mike-dydx added a commit that referenced this pull request Aug 21, 2024
* refactor fees card with reusable title card view

* refactor history view to use dydxTitledCardView

* change name for profile "rewards" -> "balances" card

* do not wrap "reduce-only" text

* add rewards card to profile landing screen

* add comment

* reorder cards

* clean up

* set up presenter view model links
mike-dydx added a commit that referenced this pull request Aug 21, 2024
* refactor fees card with reusable title card view

* refactor history view to use dydxTitledCardView

* change name for profile "rewards" -> "balances" card

* do not wrap "reduce-only" text

* add rewards card to profile landing screen

* add comment

* reorder cards

* clean up

* set up presenter view model links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants