Skip to content

Conversation

sarub0b0
Copy link
Owner

No description provided.

sarub0b0 added 3 commits July 1, 2025 01:22
This feature enables users to define and use column presets for pod views,
making it easier to switch between different column configurations.

- Add column presets in config file
- Add CLI option `--pod-columns-preset` to specify preset
- Support default preset in config
- Implement priority: CLI > Preset > Config Default > Built-in Default
Update the example configuration to demonstrate the new column presets
feature for pod views. Replace the fixed default_columns with named
presets 'default' and 'minimal', with 'minimal' set as the default
preset when no CLI flag is specified.
Improve the documentation for the --pod-columns-preset flag to make it
clearer that --pod-columns will override the preset when both options
are specified.
@sarub0b0 sarub0b0 force-pushed the pod-column-presets branch 2 times, most recently from 0898711 to c3d8ff4 Compare June 30, 2025 16:25
Add documentation for the new pod columns preset feature that supports
predefined column layouts for pod view. README now explains how users can:
- Define custom column presets in config.yaml
- Select presets via the --pod-columns-preset CLI flag
- Set a default preset in their configuration

This documents how users can manage different pod column layouts more
conveniently for different use cases.
@sarub0b0 sarub0b0 force-pushed the pod-column-presets branch from c3d8ff4 to a163d34 Compare June 30, 2025 16:30
@sarub0b0 sarub0b0 requested a review from Copilot June 30, 2025 16:31
Copilot

This comment was marked as outdated.

sarub0b0 added 2 commits July 1, 2025 01:36
Fix capitalization of "If" in the documentation and help text for the
pod-columns-preset option to maintain consistent formatting style.
Extract the duplicate PodColumns conversion logic into a separate
function named `convert_columns` to improve code maintainability and
reduce duplication. This refactoring helps follow the DRY (Don't Repeat
Yourself) principle and makes the code easier to maintain.
@sarub0b0 sarub0b0 requested a review from Copilot June 30, 2025 16:39
Copilot

This comment was marked as outdated.

@sarub0b0 sarub0b0 requested a review from Copilot June 30, 2025 17:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for column presets in the pod table, allowing users to configure which columns appear either via CLI flags or by defining presets in the configuration file.

  • Updated PodThemeConfig to include new fields (default_preset and column_presets) while removing old default_columns.
  • Added a new CLI flag (--pod-columns-preset) and implemented logic in build_pod_columns to determine which columns to show based on CLI arguments and config settings.
  • Updated related documentation in example/config.yaml and README.md to explain the new functionality.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/config/theme/pod.rs Refactored PodThemeConfig to use presets and added conversion logic for PodColumns.
src/config/theme.rs Removed deprecated PodConfig conversion to align with the new preset functionality.
src/cmd/command.rs Introduced a new CLI argument for specifying the pod columns preset.
src/app.rs Implemented build_pod_columns to handle the priority of CLI-specified columns over presets.
example/config.yaml Modified config example to include preset definitions for pod columns.
README.md Updated usage instructions and examples to document the new column preset feature.

@sarub0b0 sarub0b0 merged commit e593045 into main Jun 30, 2025
1 check passed
@sarub0b0 sarub0b0 deleted the pod-column-presets branch June 30, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant