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

Improve output of [build view] #290

Merged
merged 8 commits into from
Jun 19, 2024
Merged

Improve output of [build view] #290

merged 8 commits into from
Jun 19, 2024

Conversation

mcncl
Copy link
Contributor

@mcncl 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]

CleanShot 2024-06-18 at 20 54 15

- Added more spacing to show sections clearer
- Underlined the headers for each section
@jradtilbrook
Copy link
Contributor

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

@mcncl
Copy link
Contributor Author

mcncl commented Jun 19, 2024

@jradtilbrook the annotation can be a new card. Should only be a small.

@@ -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 {
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this doesn't seem to output anything anymore? Screenshot 2024-06-19 at 08 29 03

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2024-06-19 at 10 55 05

Seems fine for me?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output with Truncate is terrible
CleanShot 2024-06-19 at 10 59 13

Copy link
Contributor

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

@mcncl mcncl merged commit 7f8a2dd into 3.x Jun 19, 2024
1 check passed
@mcncl mcncl deleted the bm/improve_output_view branch June 19, 2024 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants