Skip to content

Commit

Permalink
Enhance value column configuration with width constraints in config l…
Browse files Browse the repository at this point in the history
…ist (#4848)

Closes #4789 
This pull request includes a change to the `cmd/cli/config/list.go` file
to improve the display of the "Value" column in the configuration list
table.

Enhancements to table column configuration:

*
[`cmd/cli/config/list.go`](diffhunk://#diff-30602d5cf9bbe56af2982dd1b800c529ec64a62985243376475e16c75b89c971L102-R102):
Added `WidthMax` and `WidthMaxEnforcer` properties to the "Value" column
configuration to ensure the column width does not exceed 80 characters
and to wrap text softly if it does.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the display of configuration information by enforcing a
maximum width of 80 characters and applying soft text wrapping. This
update improves the overall layout when displaying configuration data,
ensuring that long entries are neatly formatted. Users will experience a
clearer and more user-friendly presentation when reviewing configuration
values.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
virajbhartiya authored Feb 13, 2025
1 parent f0d4955 commit b7f9cd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/cli/config/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var listColumns = []output.TableColumn[configListEntry]{
},
},
{
ColumnConfig: table.ColumnConfig{Name: "Value"},
ColumnConfig: table.ColumnConfig{Name: "Value", WidthMax: 80, WidthMaxEnforcer: text.WrapSoft},
Value: func(s configListEntry) string {
return fmt.Sprintf("%v", s.Value)
},
Expand Down

0 comments on commit b7f9cd6

Please sign in to comment.