Skip to content

Commit

Permalink
add author to sparse layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr committed Aug 4, 2024
1 parent 8c43384 commit 93abf80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/components/pr/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ func (pr *PullRequest) renderExtendedTitle(isSelected bool) string {
baseStyle = baseStyle.Foreground(pr.Ctx.Theme.SecondaryText).Background(pr.Ctx.Theme.SelectedBackground)
}
repoName := baseStyle.Render(pr.Data.Repository.NameWithOwner)
prNumber := baseStyle.Render(fmt.Sprintf("#%d ", pr.Data.Number))
top := lipgloss.JoinHorizontal(lipgloss.Top, repoName, baseStyle.Render(" "), prNumber)
prNumber := baseStyle.Render(fmt.Sprintf("#%d", pr.Data.Number))
author := baseStyle.Render(fmt.Sprintf("@%s", pr.Data.Author.Login))
top := lipgloss.JoinHorizontal(lipgloss.Top, repoName, baseStyle.Render(" · "), prNumber, baseStyle.Render(" · "), author)
title := pr.Data.Title
width := max(lipgloss.Width(top), lipgloss.Width(title))
top = baseStyle.Foreground(pr.Ctx.Theme.SecondaryText).Width(width).Render(top)
Expand Down

0 comments on commit 93abf80

Please sign in to comment.