Skip to content

Commit

Permalink
style(progress bar): set absolute width to 30
Browse files Browse the repository at this point in the history
Roughly the same size as the text, fits well in a narrow right-hand terminal window without spilling over on renders. Happy medium between default and full-width that seems to look okay in full screen or smaller.
  • Loading branch information
gwenwindflower committed Apr 20, 2024
1 parent 19d5f10 commit b0fb0fb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions forms.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ func Forms(ps DbtProfiles) (FormResponse, error) {
}
pinkUnderline := color.New(color.FgMagenta).Add(color.Bold, color.Underline).SprintFunc()
greenBold := color.New(color.FgGreen).Add(color.Bold).SprintFunc()
blueBold := color.New(color.FgHiBlue).Add(color.Bold).SprintFunc()
yellowItalic := color.New(color.FgHiYellow).Add(color.Italic).SprintFunc()
greenBoldItalic := color.New(color.FgHiGreen).Add(color.Bold).SprintFunc()
redBold := color.New(color.FgHiRed).Add(color.Bold).SprintFunc()
err := huh.NewForm(
huh.NewGroup(
huh.NewNote().
Title(fmt.Sprintf("🏁 %s 🏎️✨", blueBold("Welcome to tbd!"))).
Title("🏁 Welcome to tbd! 🏎️✨").
Description(fmt.Sprintf(`A sweet and speedy code generator for dbt.
¸.•✴︎•.¸.•✴︎•.¸.•✴︎•. _%s_ .•✴︎•.¸.•✴︎•.¸.•✴︎•.¸
To prepare, make sure you have the following:
Expand Down
1 change: 1 addition & 0 deletions generate_column_desc.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func GenerateColumnDescriptions(ts shared.SourceTables) {

bar := progressbar.NewOptions(len(ts.SourceTables),
progressbar.OptionShowCount(),
progressbar.OptionSetWidth(30),
progressbar.OptionShowElapsedTimeOnFinish(),
progressbar.OptionEnableColorCodes(true),
progressbar.OptionSetDescription("🤖📝"),
Expand Down
1 change: 1 addition & 0 deletions sourcerer/put_columns_on_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func PutColumnsOnTables(ctx context.Context, ts shared.SourceTables, dbc DbConn)
mutex := sync.Mutex{}

bar := progressbar.NewOptions(len(ts.SourceTables),
progressbar.OptionSetWidth(30),
progressbar.OptionShowCount(),
progressbar.OptionShowElapsedTimeOnFinish(),
progressbar.OptionEnableColorCodes(true),
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const Version = "0.0.20"
const Version = "0.0.21"

0 comments on commit b0fb0fb

Please sign in to comment.