Skip to content

Commit 3724ece

Browse files
authored
added VisibleDescriptionLines parameter (#23)
1 parent 72e2916 commit 3724ece

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: renderers/config/interactive_config.go

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"time"
77
)
88

9+
const defaultVisibleLines = 5
10+
911
type InteractiveRendererConfig struct {
1012
Colors *terminal.ColorSchema
1113
RefreshRate time.Duration
@@ -15,6 +17,7 @@ type InteractiveRendererConfig struct {
1517
FailureStatus string
1618
SkippedStatus string
1719
DescriptionLinesWhenFailed int
20+
VisibleDescriptionLines int
1821
}
1922

2023
func NewDefaultRenderingConfig() *InteractiveRendererConfig {
@@ -37,6 +40,7 @@ func NewDefaultEmojiRenderingConfig() *InteractiveRendererConfig {
3740
FailureStatus: "❌",
3841
SkippedStatus: "⏩",
3942
DescriptionLinesWhenFailed: 100,
43+
VisibleDescriptionLines: defaultVisibleLines,
4044
}
4145
}
4246

Diff for: renderers/internal/node/echelone_node.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import (
1111
"time"
1212
)
1313

14-
const defaultVisibleLines = 5
15-
1614
type EchelonNode struct {
1715
lock sync.RWMutex
1816
done sync.WaitGroup
@@ -40,7 +38,7 @@ func NewEchelonNode(title string, config *config.InteractiveRendererConfig) *Ech
4038
title: title,
4139
titleColor: config.Colors.NeutralColor,
4240
description: make([]string, 0),
43-
visibleDescriptionLines: defaultVisibleLines,
41+
visibleDescriptionLines: config.VisibleDescriptionLines,
4442
config: config,
4543
startTime: zeroTime,
4644
endTime: zeroTime,

0 commit comments

Comments
 (0)