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

WIP > feat: twap form styling WIP #2785

Merged
merged 15 commits into from
Jul 11, 2023
Merged

WIP > feat: twap form styling WIP #2785

merged 15 commits into from
Jul 11, 2023

Conversation

fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Jul 4, 2023

Summary

  • Styling TWAP container form WIP
  • See comments for progress and final update

Import Todo's:

  • The limit price in 'Price protection' is hard-coded. Need assistance to add the dynamic calculated limit price.
  • We need to add the 'Receive (incl. fee)' element we use for SWAP. Need assistance with this.
Screenshot 2023-07-05 at 15 14 47

@vercel
Copy link

vercel bot commented Jul 4, 2023

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

Name Status Preview Comments Updated (UTC)
swap-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback

🌃 Cosmos ↗︎

@fairlighteth
Copy link
Contributor Author

Update:

  • Added styling
  • Limit price is hardcoded.
Screenshot 2023-07-05 at 13 29 13

@fairlighteth
Copy link
Contributor Author

Update: Re-order elements

Screenshot 2023-07-05 at 14 50 24

@fairlighteth
Copy link
Contributor Author

Update

  • mobile responsive style fixes
Screenshot 2023-07-05 at 15 12 25 Screenshot 2023-07-05 at 15 12 16

@fairlighteth fairlighteth marked this pull request as ready for review July 5, 2023 14:15
@fairlighteth fairlighteth requested review from a team July 5, 2023 14:15
@alfetopito
Copy link
Collaborator

@fairlighteth I'll take care of the hard coded value

@fairlighteth
Copy link
Contributor Author

Follow up draft PR as a WIP on further styling: #2796

@alfetopito
Copy link
Collaborator

@fairlighteth done on #2797

I also did a bit of refactor to make it more generic

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Hey @fairlighteth , great job!

Some issues that I faced in the PR:

  1. I get a crash when I open the app in iOS device (iPhone 12 mini), navigate to the Advanced orders page and connect to MM using WCv1
    image
  2. In iOS (real device) in the light mode color of an amount in the To field is different:
    image
  3. When I enter a decimal value into the Price protection field, the value is cropped
    decimal value
  4. Price protection field does not look good in a mobile view
    price mobile view
  5. It would be great to add upwards and downwards arrows into the Parts field

Thanks!

* refactor: `ReactNode` already has `string` inside it

* feat: new optional params to ExecutionPrice

* refactor: make TradeWidgetField and TradeNumberInput more generic

* feat: calculate limit price and pass it down to price protection row

* feat: pass isInverted state onto price row

* feat: calculate buyAmount outside of twapOrderAtom

* feat: use buyAmount from its own atom

twapOrder is null when the account isn't set

* feat: show `0` rather than `-` when there's no limit price
shoom3301 and others added 3 commits July 7, 2023 19:51
… twap-form-styling-1

# Conflicts:
#	src/modules/trade/pure/TradeNumberInput/index.tsx
#	src/modules/twap/containers/TwapFormWidget/index.tsx
#	src/modules/twap/containers/TwapFormWidget/tooltips.tsx
#	src/modules/twap/state/twapOrderAtom.ts
placeholder = '0',
decimalsPlaces = 0,
min,
max = 100_000,
Copy link
Contributor

Choose a reason for hiding this comment

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

why max is 100K?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

a bit arbitrary, but ooook

Copy link
Collaborator

Choose a reason for hiding this comment

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

100% arbitrary yes!

Open to suggestions

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any reason why we would ever want to have an order with more than 100k parts?

* feat: twap form styling WIP

* feat: twap form styling WIP

* feat: twap form styling WIP

* feat: twap form styling WIP

* feat: twap form styling WIP

* feat: twap form styling WIP

* feat: twap form styling WIP

* feat: twap form styling WIP

* Fix code style issues with Prettier

* feat: update styles

* feat: update styles

* feat: update styles

* Fix code style issues with Prettier

* feat: styling updates

* feat: styling updates

* feat: styling updates

* feat: styling updates

* Fix code style issues with Prettier

* feat: styling updates

* feat: styling updates

* feat: fix custom date style

* feat: safar text color fix

* feat: fix styles

* feat: fix styles

* feat: fix styles

---------

Co-authored-by: Lint Action <[email protected]>
Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Hey @fairlighteth , great job!
Approving the PR in order not to block the release.
However, still there is 1 nitpick related to the tooltip icon in a mobile view
tooltip is shifted

LMK please if I need to create a separate issue for this.
Thanks

@fairlighteth
Copy link
Contributor Author

Updated mobile to look like:
Screenshot 2023-07-11 at 11 27 27

@fairlighteth
Copy link
Contributor Author

Also there should be enough margin in between the InlineBanners

@elena-zh
Copy link

@fairlighteth , thanks! LGTM!

@fairlighteth fairlighteth merged commit 27d6829 into develop Jul 11, 2023
11 of 12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2023
@alfetopito alfetopito deleted the twap-form-styling-1 branch July 11, 2023 11:42
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.

6 participants