GithubHelp home page GithubHelp logo

Comments (3)

ewels avatar ewels commented on June 1, 2024

Yeah, I'm aware of this one. However, I haven't been able to think of a good way to standardise it. The columns in the different panels are totally separate and I want the widths to be flexible to best accommodate the content.

Any suggestions welcome!

from rich-click.

apcamargo avatar apcamargo commented on June 1, 2024

I just noticed that the issue becomes even harder when there's a required option that adds a *:

╭─ Other ──────────────────────────────────────────────────────────────────────────────────────────╮
│  --help     -h    Show this message and exit.                                                    │
│  --version        Show the version and exit.                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│  *  --input      -i  TEXT  Input path [required]                                                 │
│     --output     -o  TEXT  Output path                                                           │
│     --all                  Sync all the things?                                                  │
│     --overwrite            Overwrite local files                                                 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

I guess the best thing to to would be to get all the different types of columns used by all the groups and apply them to each group. I'm not too familiar with click's API, tough 😕

from rich-click.

ewels avatar ewels commented on June 1, 2024

That one is a bit easier - the code strips the first column if none are required to avoid an unnecessary column of whitespace. But it still wouldn't be exactly the same width even if we kept it.

The only idea I have is to make one massive table with everything, somehow figure out the dynamically chosen column widths, then discard it without printing and apply those widths to all tables. But I'm not sure if it's possible to get widths like that from rich (it probably is, you can do most things).

from rich-click.

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.