Skip to content

Commit

Permalink
rename to compact
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr committed Aug 3, 2024
1 parent b6c4fb0 commit 7ea4a6e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions config/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ type ColorThemeConfig struct {

type TableUIThemeConfig struct {
ShowSeparator bool `yaml:"showSeparator" default:"true"`
Multiline bool `yaml:"multiline" default:"true"`
Compact bool `yaml:"compact" default:"false"`
}

type UIThemeConfig struct {
Expand Down Expand Up @@ -285,7 +285,7 @@ func (parser ConfigParser) getDefaultConfig() Config {
SectionsShowCount: true,
Table: TableUIThemeConfig{
ShowSeparator: true,
Multiline: true,
Compact: false,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions ui/components/pr/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (pr *PullRequest) renderAssignees() string {

func (pr *PullRequest) renderRepoName() string {
repoName := ""
if pr.Ctx.Config.Theme.Ui.Table.Multiline {
if !pr.Ctx.Config.Theme.Ui.Table.Compact {
repoName = pr.Data.Repository.NameWithOwner
} else {
repoName = pr.Data.HeadRepository.Name
Expand Down Expand Up @@ -241,7 +241,7 @@ func (pr *PullRequest) RenderState() string {
}

func (pr *PullRequest) ToTableRow(isSelected bool) table.Row {
if pr.Ctx.Config.Theme.Ui.Table.Multiline {
if !pr.Ctx.Config.Theme.Ui.Table.Compact {
return table.Row{
pr.renderState(),
pr.renderExtendedTitle(isSelected),
Expand Down
2 changes: 1 addition & 1 deletion ui/components/prssection/prssection.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func GetSectionColumns(
ciLayout := config.MergeColumnConfigs(dLayout.Ci, sLayout.Ci)
linesLayout := config.MergeColumnConfigs(dLayout.Lines, sLayout.Lines)

if ctx.Config.Theme.Ui.Table.Multiline {
if !ctx.Config.Theme.Ui.Table.Compact {
return []table.Column{
{
Title: "",
Expand Down
4 changes: 2 additions & 2 deletions ui/components/table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func NewModel(
isLoading bool,
) Model {
itemHeight := 1
if ctx.Config.Theme.Ui.Table.Multiline {
if !ctx.Config.Theme.Ui.Table.Compact {
itemHeight += 1
}
if ctx.Config.Theme.Ui.Table.ShowSeparator {
Expand Down Expand Up @@ -278,7 +278,7 @@ func (m *Model) renderRow(rowId int, headerColumns []string) string {

colWidth := lipgloss.Width(headerColumns[headerColId])
colHeight := 1
if m.ctx.Config.Theme.Ui.Table.Multiline {
if !m.ctx.Config.Theme.Ui.Table.Compact {
colHeight = 2
}
col := m.Rows[rowId][i]
Expand Down
2 changes: 1 addition & 1 deletion ui/components/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func RenderIssueTitle(
number int,
) string {
prNumber := ""
if !ctx.Config.Theme.Ui.Table.Multiline {
if ctx.Config.Theme.Ui.Table.Compact {
prNumber = fmt.Sprintf("#%d ", number)
var prNumberFg lipgloss.AdaptiveColor
if state != "OPEN" {
Expand Down

0 comments on commit 7ea4a6e

Please sign in to comment.