-
Notifications
You must be signed in to change notification settings - Fork 231
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
fix(table): do not shrink table with offset #373
Conversation
Fixed the issue in the second commit :) |
Hey Bash! So what's the bug you're solving here exactly? |
Hey, sorry I thought I has included screenshots or something. When you get to a certain offset, it would shrink the table instead of just moving the cursor, causing the height of the table to get smaller than the height specified by the user. If you run the test on master vs this branch you'll be able to see what I mean. Sorry I'll include images/recordings next time :) |
Wow, what a bug! Anyway, the fix looks good so far. To state the issue simply:
Does that sound correct? Here is some code to reproduce the issue: Let's make sure we test this on some real-world examples, including with the Table Bubble. |
@meowgorithm yeah that's right! The table bubble doesn't currently use lipgloss table, that's how I discovered this bug was through porting the table bubble to use lipgloss' table renderer. As soon as there was the interactivity element, it broke. This is the table bubble wip - charmbracelet/bubbles#617 that you can use with this branch. I've actually got a working demo too on a drafted Bubble Tea PR that you can check out. Included instructions there for what to change in your |
Aha! That's right, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, LGTM. Such a good fix!!
We should fix this before merging. This failing test is to provide context on this issue and how to reproduce it. I believe in this case we should honour the height rather than the offset since we are more likely to see dependents on the height.