Giter Club home page Giter Club logo

Comments (8)

rgkimball avatar rgkimball commented on August 19, 2024

Agreed, this seems like a nice enhancement for the both the community crypto app and the official Stocks as well for cases like BRK.A. These should both truncate the decimal and use humanize to add thousands commas.

from community.

cgrin avatar cgrin commented on August 19, 2024

Seeing now this can also affect the price delta, right now BTC is down 244.13 and that's wide enough to make it scroll. display_symbol() is using the same width of 34 as the price below, even though all of the available symbols are only three characters (

). It would make sense to give more width to that price delta , as it stands about 25% of the line is unused.

from community.

ethanfuerst avatar ethanfuerst commented on August 19, 2024

this is a good idea, I will look in to it

from community.

ethanfuerst avatar ethanfuerst commented on August 19, 2024

Seeing now this can also affect the price delta, right now BTC is down 244.13 and that's wide enough to make it scroll. display_symbol() is using the same width of 34 as the price below, even though all of the available symbols are only three characters (

https://github.com/tidbyt/community/blob/9761e1aa27dfc98c5b93f8c6103b391da3a5b1d4/apps/cryptotracker/crypto_tracker.star#L29

). It would make sense to give more width to that price delta , as it stands about 25% of the line is unused.

@cgrin IIRC I did this to future proof for the option to display the full coin name

from community.

cgrin avatar cgrin commented on August 19, 2024

Makes sense. Can the widths be defined dynamically? If so you could do something like ticker_width = min(34, 5*len(ticker_symbol)) and then delta_width = 63 - ticker_width

from community.

ethanfuerst avatar ethanfuerst commented on August 19, 2024

@cgrin opened a pr, lmk your thoughts. I don't want to change the widths of the price change marquee render, as my initial goal with this app is to mirror the existing stock app as closely as possible.

from community.

cgrin avatar cgrin commented on August 19, 2024

Looks great!

from community.

stale avatar stale commented on August 19, 2024

We're automatically closing this issue because it hasn't had any activity in 30 days. If that seems like a mistake, please feel free to re-open. Thanks!

from community.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.