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

Lack of Style Options for Spaces in Full Help View Columns #572

Open
rrrodzilla opened this issue Jul 29, 2024 · 1 comment
Open

Lack of Style Options for Spaces in Full Help View Columns #572

rrrodzilla opened this issue Jul 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rrrodzilla
Copy link

bubbles/help/help.go

Lines 197 to 201 in a9344b5

col := lipgloss.JoinHorizontal(lipgloss.Top,
m.Styles.FullKey.Render(strings.Join(keys, "\n")),
m.Styles.FullKey.Render(" "),
m.Styles.FullDesc.Render(strings.Join(descriptions, "\n")),
)

In the FullHelpView function, the spaces within the columns created by lipgloss.JoinHorizontal do not have dedicated style options. This results in inconsistent styling, especially when a background color is applied to the terminal. As shown in the attached screenshot, the spaces remain unstyled with no ability to apply custom styles, leading to visual discrepancies.

This issue is similar to the one described in issue #571, where the ShortHelpView function lacks style options for spaces between the key and description.

Screenshot:
image

To resolve this issue, I suggest wrapping the JoinHorizontal call in a Render call of the FullSeparator style. This would allow the other styles to override anything not set by the FullSeparator style, effectively styling the whitespace.

If you settle on an approach, I'm happy to implement it and provide a PR. Thanks again!

@bashbunni bashbunni added the bug Something isn't working label Aug 15, 2024
@bashbunni
Copy link
Member

Hey, this is a bug with JoinVertical and JoinHorizontal in Lip Gloss. We're working on a new version that should fix this. Thank you for bringing it to our attention though, I was only able to reproduce this in a very specific situation before, so this gives us more to work with and room for improving our test coverage. Thank you!!

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

No branches or pull requests

2 participants