charmbracelet / charmbracelet/bubbles

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

Open
#461 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
8.9k
Forks
457
Avg merge
1d 18h
Merged PRs (30d)
5

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.