-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add grid view option to --layout
, implement grid view output
#23
Comments
You could render a grid view with the Columns class. See columns.py in the examples directory. |
Thank you for letting me know, I will have a look |
This issue is now available for grabs, anyone can drop in and request to be assigned :D |
Hi there! Is this no longer up for grabs? |
Of course it’s available! Don’t worry about the label movements, I was just organising them and decided to just keep a good first issue label. Feel free to take this up if you like 😄 |
Just a reminder, I have done a quick clean up to the branches and the GitHub action files, so you might wanna pull these new changes to your fork as needed. And use the ‘main’ branch to start a pr |
Ok, sounds good 👍 sorry for the delay. I'd love to take this one. After looking at the columns example, it seems like varying repo description lengths might throw off the grid-look. Do you think the descriptions should be left out for this type of view? |
I think if the description can make a single box too big to fit then we could show parts of the description, like
With the However if you really think we should leave it out then it’s fine. |
Got it, good call. I think the |
How’s the progress? Once you open a pr I’ll add you to all-contributors list |
Just about done! Aiming to have the PR up later today. |
Currently, for the
--layout
option we havelist
ortable
, it would be awesome if we also have agrid
option so the output can be displayed in grid view format.To do so we should add a function called something like
grid_layout()
instarcli/layouts.py
, with one parameterrepos
. This function should then be imported fromstarcli/__main__.py
using the same logic aslist_layout
andtable_layout
to be called when--layout grid
is specified. Also, don't forget to updateclick.Choices(["list", "table", "grid"])
in thestarcli/__main__.py
, with the help argument updated and the usage copied to the README.You can use the panel and columns functionality from rich. See this example for reference
Start a pull request when you are done (or have started the draft PR)
Edit: added columns link as to the suggestion from @willmcgugan
The text was updated successfully, but these errors were encountered: