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

table.WithWidth doesn't work properly #696

Open
caarlos0 opened this issue Jan 7, 2025 · 2 comments
Open

table.WithWidth doesn't work properly #696

caarlos0 opened this issue Jan 7, 2025 · 2 comments
Labels
bug Something isn't working table

Comments

@caarlos0
Copy link
Member

caarlos0 commented Jan 7, 2025

Describe the bug
Setting it to almost any value causes the table to be rendered in ways you probably didn't expect.

Setup
Please complete the following information along with version numbers, if applicable.

  • OS [e.g. Ubuntu, macOS] any
  • Shell [e.g. zsh, fish] any
  • Terminal Emulator [e.g. kitty, iterm] any
  • Terminal Multiplexer [e.g. tmux] any
  • Locale [e.g. en_US.UTF-8, zh_CN.UTF-8, etc.] any

To Reproduce
Steps to reproduce the behavior:

  1. You can copy the table example from bubbletea
  2. Add a table.WithWidth here
  3. Run it
  4. See it looks weid

Source Code
https://github.com/charmbracelet/bubbletea/blob/d67033479573c91fc4a0e450fe84bbd0d6db6c5d/examples/table/main.go#L164

Expected behavior
I'm not sure what it should do, but I think what it's doing now is wrong.

Screenshots
CleanShot 2025-01-07 at 13 01 24@2x
CleanShot 2025-01-07 at 13 01 41@2x

Additional context
If you remove the widths of the headers, the table is rendered empty. Not sure if intended, weird anyway.

@caarlos0 caarlos0 added bug Something isn't working table labels Jan 9, 2025
@bashbunni
Copy link
Member

bashbunni commented Jan 16, 2025

i can fix him

LOL, in all seriousness I do wonder if my lipgloss table branch might fix this though. That thing is so close, just needs a bit of polish I think

@caarlos0
Copy link
Member Author

let me know if I can help you with it 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working table
Projects
None yet
Development

No branches or pull requests

2 participants