-
Notifications
You must be signed in to change notification settings - Fork 44
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
Improve output of [build view] #290
Conversation
mcncl
commented
Jun 18, 2024
- Added spacing around sections to avoid getting lost between them
- Underlined the section headers to show separation from the body
- Adjusted the output of the annotations to be [path] rather than [name]
- Added more spacing to show sections clearer - Underlined the headers for each section
This looks quite nice. While you're here, is that top part the build message? Perhaps we should truncate that, it looks almost broken in that form, but I suspect thats just what the commit message says is it? And if its not too difficult, don't show annotations that end up rendering nothing? Or create a card to follow up with that I reckon |
@jradtilbrook the annotation can be a new card. Should only be a small. |
…o bm/improve_output_view
@@ -98,3 +100,13 @@ func renderBuildNumber(state string, number int) string { | |||
|
|||
return lipgloss.NewStyle().Foreground(stateColor).Render(fmt.Sprintf("Build #%d", number)) | |||
} | |||
|
|||
func trimMessage(msg string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is this from bubbletea which might be better to handle more cases: https://pkg.go.dev/github.com/charmbracelet/x/ansi#Truncate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That feels a little bit like using Bubbletea where we don't need to? We could easily add + "..."
to the message if we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay wow it seems to be a problem with my terminal (kitty). I run a pretty high line spacing and the output of that exact command is 1 line longer than a full screen. kitty seems to remove the first line from scrollback or something so that seems like a bug or configuration I'll have to look into.
So I think this PR is good to go then