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: allow to set the height of the item #155

Merged
merged 3 commits into from
May 24, 2022
Merged

feat: allow to set the height of the item #155

merged 3 commits into from
May 24, 2022

Conversation

caarlos0
Copy link
Member

The user might want to show more than 2 lines, and, right now, if they
try to do so, things break.

This also ensures the item never takes more than the allowed height, preventing issues like #117

fixes #117

@caarlos0 caarlos0 added bug Something isn't working enhancement New feature or request labels May 24, 2022
@caarlos0 caarlos0 self-assigned this May 24, 2022
The user might want to show more than 2 lines, and, right now, if they
try to do so, things break.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
list/defaultitem.go Outdated Show resolved Hide resolved
@muesli
Copy link
Contributor

muesli commented May 24, 2022

LGTM. The original idea was to have the users implement their own Delegate should they need a more intricate (e.g. multi-line) view that goes beyond a single title and a description. Most people seem to get away with our DefaultDelegate however, so I guess this is a welcome change.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit cd2593c into master May 24, 2022
@caarlos0 caarlos0 deleted the height branch May 24, 2022 18:00
ReallyLiri pushed a commit to ReallyLiri/bubbles that referenced this pull request Jun 13, 2024
* feat: allow to set the height of the item

The user might want to show more than 2 lines, and, right now, if they
try to do so, things break.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: short-circuit if width <= 0

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: height check

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

list bug: text appears and disappears with multi-line items
3 participants