-
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
unopened isolated positions pt1 #191
Conversation
523354c
to
7c859d8
Compare
7c859d8
to
7a3bf31
Compare
private func updateButtonState(input: AdjustIsolatedMarginInput) { | ||
if parser.asNumber(input.amount)?.doubleValue ?? 0 > 0 { | ||
self.ctaButtonPresenter.viewModel?.ctaButtonState = .enabled() | ||
} else { | ||
self.ctaButtonPresenter.viewModel?.ctaButtonState = .disabled() | ||
} | ||
} | ||
|
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.
this was moved to validate fxn
viewModel.amount?.maxAction = { | ||
AbacusStateManager.shared.adjustIsolatedMargin(input: "1", type: .amountpercent) | ||
} |
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.
per corey's guidance, removing max button
|
||
return VStack(spacing: 0) { | ||
self.topContent | ||
self.divider |
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.
Doesn't seem like the divider is visible from the screenshot
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.
addressed in de39f47
private var bottomContent: some View { | ||
let viewOrdersStringKey: String | ||
let viewOrdersStringParams: [String: String]? | ||
if orderCount > 1 { |
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.
orderCount == 1
* hide/show target leverage for margin mode selection * fix adjust margin % horizontal sizings * remove unused files * dismiss on success, update button state on submission * multi-line receipt line item title * use localized error * stubbed unopened isolated positions UI * wire up abacus data for unopened positions * put back fixed size, clean up * hide keyboard when margin direction changes * remove max action * add local validation * update button state after validation * remove alternate validation * clean up * ui tweaks
* hide/show target leverage for margin mode selection * fix adjust margin % horizontal sizings * remove unused files * dismiss on success, update button state on submission * multi-line receipt line item title * use localized error * stubbed unopened isolated positions UI * wire up abacus data for unopened positions * put back fixed size, clean up * hide keyboard when margin direction changes * remove max action * add local validation * update button state after validation * remove alternate validation * clean up * ui tweaks
* hide/show target leverage for margin mode selection * fix adjust margin % horizontal sizings * remove unused files * dismiss on success, update button state on submission * multi-line receipt line item title * use localized error * stubbed unopened isolated positions UI * wire up abacus data for unopened positions * put back fixed size, clean up * hide keyboard when margin direction changes * remove max action * add local validation * update button state after validation * remove alternate validation * clean up * ui tweaks
Links (dYdX Internal Use Only)
Figma Design: https://www.figma.com/design/mKevZOfE9nj6MZpiolKYW1/dYdX-%E2%80%BA-Mobile?node-id=5962-23534&t=amLuAKC8dnKISGXT-4
Description / Intuition
part 2 will be the cancel behavior and the market info appearance (see comment)
pendingPositions
to display in Overview and Positions listspositions
to not be aPlatformListView
since there are twoitems
listParsingError
computed property tolocalizedMessage
to avoid confusion with systemlocalizedDescription
APIBefore/After Screenshots or Videos
Type of Change