Code Monkey home page Code Monkey logo

Comments (3)

joshka avatar joshka commented on June 20, 2024 1

Right now this works fine, and there's no huge need to change this. Let's try to focus on things that add value rather than looking to change every little thing.

Not sure if you're a sports fan at all, but often when a referee's call is being reviewed (e.g. a coach's challenge of a goal in hockey), the standard of review is that it was "clearly not correct". It could be worth applying some similar thinking to ideas for improvement like this. Having our own Alignment type works fine, it solves the problem and doesn't have any obvious bugs. Changing it won't help any apps do anything easier / better.

So while this is probably "technically correct", it's also probably a distraction not worth investing time into. Does that make sense?

from ratatui.

joshka avatar joshka commented on June 20, 2024

What problem does it solve?
What problems does it cause (e.g. existing apps)?
What would this prevent in the future (maybe adding other alignments / adding methods for alignment related stuff to the impl block)?

Seems like if there's no problem to solve (or only very low impact ones), and there's a possible chance of a problem (however unlikely), it might be worth keeping our current code instead on this.

from ratatui.

EdJoPaTo avatar EdJoPaTo commented on June 20, 2024

unicode-truncate has its own Alignment definition which is incompatible with the one of ratatui. As long as stuff is reusable, why not reuse it?

When other stuff is needed in the future it can still be adapted and an own type introduced. Personally I prefer smaller breaking changes in comparison to over generic code that might be good for some future use that might never arise.

Its not really significant to use it, but it's still the same intention reinvented. Which is why it might be interesting to think about it.

It might be a good idea in the future to search the std lib for existing types before inventing the wheel again. Until the usage diverges enough to diverge.

from ratatui.

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.