-
Notifications
You must be signed in to change notification settings - Fork 2
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
TRCL-3319 : Trading Rewards Details Screen History Card #41
TRCL-3319 : Trading Rewards Details Screen History Card #41
Conversation
2c45e2b
to
fc56bcc
Compare
5d9c02e
to
f8412cf
Compare
ForEach(list, id: \.id) { [weak self] item in | ||
Group { | ||
let cell = | ||
VStack(spacing: intraItemSeparator ? 0 : 10) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only change here is putting these in a vstack to standardize spacing between items
import PlatformUI | ||
import Utilities | ||
|
||
public class dydxRewardsRewardView: PlatformViewModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this to dydxRewardsRewardViewModel
for consistency?
The Xcode template can be used to generate the view models with consistent syntax.
.wrappedInAnyView() | ||
} | ||
|
||
let headerViewModel: PlatformViewModel = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private?
/// - Parameters: | ||
/// - foreground: the font to apply | ||
/// - range: the range to modify, `nil` if the entire string should be modified | ||
mutating func themeFont(fontType: ThemeFont.FontType = .text, fontSize: ThemeFont.FontSize = .medium, to range: Range<AttributedString.Index>? = nil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually prefer keeping those modifier functions immutable, so we have a consistent syntax/pattern. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
benefit i was thinking is that modifying in place skips the copy step, so potentially faster (incrementally), but since attributedstring is a struct, might be a copy on write anyways
3982efb
to
777bbea
Compare
* show help card in trading rewards * add padding * set up trading rewards title card * add list items to the reward history card * add view more button and header * add more periods * fix CD compilation * address comments
* show help card in trading rewards * add padding * set up trading rewards title card * add list items to the reward history card * add view more button and header * add more periods * fix CD compilation * address comments
* show help card in trading rewards * add padding * set up trading rewards title card * add list items to the reward history card * add view more button and header * add more periods * fix CD compilation * address comments
Links (dYdX Internal Use Only)
Linear Ticket: TRCL-3319 : Trading Rewards Details Screen History Card
Figma Design: card
Description / Intuition
PlatformListViewModel
. Is 0 whenintraItemSeparator
istrue
, 10px otherwise.Before/After Screenshots or Videos
Type of Change