Skip to content

Commit

Permalink
fix: add author to sparse layout (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr committed Aug 4, 2024
1 parent 8c43384 commit 45d9e61
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 45d9e61

Please sign in to comment.