Skip to content
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

feat(table): add option for wraping cells #433

Closed
wants to merge 2 commits into from

Conversation

prgres
Copy link
Contributor

@prgres prgres commented Nov 13, 2023

The current implementation of the table.renderRow function allows only for truncating cell content, resulting in something like this: "test123 ...".

image

My project requires full content visibility, so I need a way to handle it. My first idea was to write a custom table component, but I guess it may be useful to make it optional for everyone
image

I couldn't find any contribution guide, so I hope everything is ok.

@prgres
Copy link
Contributor Author

prgres commented Nov 23, 2023

In my free time, I will incorporate reflow and check the outcome

@prgres
Copy link
Contributor Author

prgres commented Nov 23, 2023

It looks ok:
image

But it messes up with movement. My assumptions lay in the viewport.YOffset but I have a hard time understanding what is going on in MoveDown and MoveUp methods

@maaslalani
Copy link
Contributor

Hey @prgres, thanks so much for the PR. Just as a heads up the table bubble will be entirely replaced implementation-wise with the Lip Gloss table rendering package.

https://github.com/charmbracelet/lipgloss/releases/tag/v0.9.0

Thank you for the PR again, I will close it for now while we swap out all the internals for the new renderer which will support line-wrapping and multiline rows.

image

@maaslalani maaslalani closed this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants