-
Notifications
You must be signed in to change notification settings - Fork 257
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
Make Tables support borders #604
Comments
Maybe mark this as good first issue or help wanted in case someone is interested? |
I came across this crate recently, which might be of interest?: https://github.com/zhiburt/tabled/tree/master#style Regarding the linked issue with text on collapsed border lines,
https://github.com/zhiburt/tabled/tree/master#merge
|
Wow. That crate is super deep and comprehensive. It makes me not want to consider adding all that same level of functionality as it's chasing a much better result. I wonder whether it would be possible to easily use that in one of the following approaches:
|
Hi @joshka , I'm interested in working on this issue, but could you elaborate a bit more on your thoughts regarding this API? |
Hey, I don't have any concrete suggestions other than to try a few things and show what could work. When an API like this is ambiguous, it's often a useful approach to start with the user code in mind instead of jumping to any implementation (as that will lead to less rework). So given that, what do you think a Ratatui app that uses this would look like in the ideal case? Use some of the examples from the tabled crate and write out just the functions that build up the model of the Table widget. It's not important to implement this until you have a good idea of what it looks like from the user's perspective... |
Many thanks for your help. Can you please assign this issue to me? |
Hi Joshka, I was trying to solve this issue as a project at uni, but I'm not able to do this. I will leave this issue and unassign myself |
No problem :) |
Hello @joshka is this issue still open ? |
It is, but this is definitely something that needs some discussion about exactly how this might look. If you haven't worked with Ratatui much before, it's probably not the best task to pick up. Also, I mentioned in another PR that it might not be a bad idea to move the table out of Ratatui, and iterate fast in a breaking manner rather than slower keeping backwards compatibility. That's still something to consider. I don't know anything about the bounty - it was added by an outside contributor, so you'll have to work that out with them if this is the driving factor on this. |
Hi 👋 (for reference), I am Co-founder of Opire and I have created this reward because I like to collaborate on open-source projects, unfortunately, I don't have as much time as I would like (nor knowledge in all areas) but I really like this project and I wanted to help with this issue since I think it would be nice if ratatui had this functionality |
Sounds good. :) Thanks for doing this. |
This issue is marked as a "Good First Issue". I'd ask anyone considering working on this to please first consider the open questions mentioned below, and to design the user facing API in this issue to validate it upfront before going forward with an implementation.
Problem
The current table implementation uses spaces to separate columns and does not have any way to separate the header. It would be nice to be able to add borders around cells. e.g. using the line drawing characters we might have something like:
We should also be able easily configure something more like:
And
And
And possible even:
Solution
symbols::line::Set
, but may need to add a newtable_borders::Set
if we want to individually set header borders like the last example.Alternatives
Additional context
For some inspiration:
Rich (Python)
Bubble Tea (Go):
The text was updated successfully, but these errors were encountered: