Bubbletea table and Lip Gloss color do not work with ssh.Channel. #1263
Replies: 4 comments
-
I think I am running into a similar issue. I am using a table model like you have in your example, but instead not calling Any ideas? |
Beta Was this translation helpful? Give feedback.
-
You'll then need to set the renderer explicitly in your table styles: renderer := bubbletea.MakeRenderer(s)
style := table.DefaultStyles()
style.Header = style.Header.
Renderer(renderer). // Like this
BorderStyle(lipgloss.NormalBorder()).
BorderForeground(lipgloss.Color("240")).
BorderBottom(true).
Bold(false)
style.Selected = style.Selected.
Renderer(renderer). // And this
Foreground(lipgloss.Color("229")).
Background(lipgloss.Color("57")).
Bold(false)
t.SetStyles(style) |
Beta Was this translation helpful? Give feedback.
-
SSH connections won't send terminal capabilities by default, which is why the Bubble Tea application is automatically downgrading the colours because it doesn't know what the provided stdout color capabilities are (the ssh connection). That said, we have a more pure implementation of Lip Gloss in I'm not sure what the use case is here, but you may also have a better time using wish to facilitate ssh connectivity for Bubble Tea apps. Let me know how that goes and if anything is unclear :) |
Beta Was this translation helpful? Give feedback.
-
I'm going to convert this to a discussion as it's more of a usage question at the moment. Should that change, I can reopen this as an issue for us to track and fix :) |
Beta Was this translation helpful? Give feedback.
-
Here is my sample code modified to use instead of default io.Reader, io.Writer to crypto/ssh Channel. Table seems to work fine but Table Style cannot accept Lip Gloss color code.
Beta Was this translation helpful? Give feedback.
All reactions