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

help: rendering issues when the text doesn't fit into the available width #461

Open
BommerG opened this issue Jan 20, 2024 · 0 comments
Open

Comments

@BommerG
Copy link

BommerG commented Jan 20, 2024

Describe the bug
the help bubble shows strange behavior when the text to display doesn't fit into the available width.
short help: word wrap happens in certain situations before the ellipsis is displayed
full help: there seems to be an invisible tail which gets wrapped in certain situations.
full help: word wrap happens in certain situations before the last column is dropped
see also: https://github.com/BommerG/list-default

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

  • OS: Linux, openSUSE Leap 15.5, 5.14.21-150500.55.39-default
  • Shell: bash
  • Terminal Emulator: Gnome Terminal
  • Terminal Multiplexer: none
  • Locale: en_US.UTF-8, de_CH.UTF-8

To Reproduce
Steps to reproduce the behavior:

  1. run the example code
  2. change the width of your terminal window to force the help bubble to reduce the output
  3. you should see that the left and the right frame don't have the same height in certain situations

Source Code
https://github.com/BommerG/list-default/blob/main/main.go

Expected behavior
the help bubble should always react correctly to the changing width and avoid word wrap or any other behavior that could disturb the correct rendering of the help text.

Screenshots
https://github.com/BommerG/list-default/blob/main/line_wrap.png
https://github.com/BommerG/list-default/blob/main/imaginary_word_wrap.png
https://github.com/BommerG/list-default/blob/main/full_help_word_wrap.png

Additional context
I'm new to bubbletea and go in general.

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

No branches or pull requests

1 participant