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

Small number display - subscript #983

Merged
merged 33 commits into from
Jan 17, 2024
Merged

Small number display - subscript #983

merged 33 commits into from
Jan 17, 2024

Conversation

GrandSchtroumpf
Copy link
Collaborator

@GrandSchtroumpf GrandSchtroumpf commented Jan 11, 2024

fix #929

  • Use subscript for number, price but not percent
  • Display full value for tooltips except in the strategy card's graph
  • Refactor how digits are displayed for price
  • Update unit tests for prettifyNumber
  • Update e2e with new values

Digits for price :

111 -> 111.00
11 -> 11.00
1 -> 1.00
0 -> 0.00
0.111 -> 0.11
0.0111 -> 0.011
0.00111 -> 0.0011
0.000111 -> 0.0₃111

My Strategies

image
image
image
image
image
image

Trade

image
image
image
image

Explorer

image
image

Create Strategy

image
image
image
image

Edit Strategy

image
image
image

Copy link

cloudflare-workers-and-pages bot commented Jan 11, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68bcdaf
Status: ✅  Deploy successful!
Preview URL: https://834548b8.carbon-app-csq.pages.dev
Branch Preview URL: https://issue--929.carbon-app-csq.pages.dev

View logs

@GrandSchtroumpf GrandSchtroumpf marked this pull request as ready for review January 12, 2024 13:55
@zavelevsky
Copy link
Collaborator

image

the price display shows the subscript numbers to high relative to the line

@zavelevsky
Copy link
Collaborator

image

the digits are too spaced apart - it looks better in other places where it was implemented

@zavelevsky
Copy link
Collaborator

image

here the digits are too down - their center should be on the bottom of the row

@zavelevsky
Copy link
Collaborator

@ashachaf @Costa769 the current font dictates the behavior of the subscript digits too - so monospace means they are aligned with the bottom of the line and are evenly spaced, and the regular font dictates they are completely under the line.
We can change fonts. We can change expectations. We can force behavior that's no the font's one by using components

@Costa769
Copy link
Collaborator

Depth chart

  1. Price is not displayed in the correct format

image

  1. Incorrect font
    image

@ashachaf
Copy link
Collaborator

ashachaf commented Jan 17, 2024

  • orderbook missing display currency
    in the preview link:
image

production:
image

  • orderbook incorrect prices
    strategy prices:
image

orderbook prices: (need to check if we trim the data the frontend receives)
image

  • same as prod so should be handled in a different issue
image
  • aim to keep in the same line
image
  • spacing (not an issue, just FYI)
    GT America Mono has different spacing which makes the numbers and gap between words a bit larger than GT America
image

@GrandSchtroumpf GrandSchtroumpf merged commit 9b7999e into main Jan 17, 2024
1 check passed
@GrandSchtroumpf GrandSchtroumpf deleted the issue-#929 branch January 17, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Number display - small number handling
4 participants