Skip to content

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

Merged
caarlos0 merged 3 commits intomasterfrom
height
May 24, 2022
Merged

feat: allow to set the height of the item#155
caarlos0 merged 3 commits intomasterfrom
height

Conversation

@caarlos0
Copy link
Copy Markdown
Contributor

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 requested review from aymanbagabas and muesli May 24, 2022 02:06
@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>
Comment thread list/defaultitem.go Outdated
@muesli
Copy link
Copy Markdown
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.

caarlos0 added 2 commits May 24, 2022 11:03
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 requested review from aymanbagabas and muesli May 24, 2022 16:56
@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