-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for customization via configuration file #573
Draft
sarub0b0
wants to merge
25
commits into
main
Choose a base branch
from
feature/conf-file
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
sarub0b0
commented
Aug 8, 2024
•
edited
Loading
edited
- load configuration file
- custom UI theme
- key binding
- system
sarub0b0
force-pushed
the
feature/conf-file
branch
from
August 9, 2024 16:09
47eee38
to
06945b3
Compare
sarub0b0
force-pushed
the
feature/conf-file
branch
from
August 23, 2024 08:48
06945b3
to
c15e3a5
Compare
sarub0b0
force-pushed
the
feature/conf-file
branch
2 times, most recently
from
September 25, 2024 16:45
bc40dc2
to
530ba5f
Compare
sarub0b0
force-pushed
the
feature/conf-file
branch
2 times, most recently
from
October 6, 2024 14:37
f98d068
to
651c8de
Compare
sarub0b0
force-pushed
the
feature/conf-file
branch
2 times, most recently
from
October 9, 2024 18:11
dd552f5
to
321f35a
Compare
sarub0b0
force-pushed
the
feature/conf-file
branch
from
October 26, 2024 04:57
321f35a
to
5040c14
Compare
- Added figment and xdg dependencies for configuration management. - Implemented Config struct to load settings from a YAML file.
- Introduced TabTheme struct for customizable tab styles. - Updated Window and Render to use the new tab theme settings. - Modified WindowBuilder to accept a TabTheme parameter.
This change allows configuration to be loaded from environment variables prefixed with `KUBETUI_`, enhancing flexibility and customizability.
- Introduced `HeaderTheme` struct to manage header styles. - Updated `Theme` struct to include `HeaderTheme`. - Modified `Window` and `WindowBuilder` to handle `HeaderTheme`. - Updated `WindowInit` to use `HeaderTheme` for rendering headers. - Adjusted header rendering logic to apply styles from `HeaderTheme`.
- Introduced `WidgetThemeConfig` for customizable widget themes. - Updated various widgets to accept and apply the new theme config. - Enhanced `WidgetConfig` to support theme-based styling. - Added default theme settings for consistent UI appearance. - Modified existing widgets to utilize the new theme settings.
- Introduced `InputFormTheme` struct to manage styles for prefix, content, and suffix. - Updated `InputFormBuilder` to accept and apply the theme. - Modified `InputForm` to use the theme styles during rendering.
- Introduced `TextTheme` struct to manage styles for search highlights and selection. - Updated `TextBuilder` to accept and apply the theme. - Modified `TextItem` to use the theme styles during rendering. - Added `SearchHighlightStyle`, `SearchHighlightMatchesStyle`, `SearchHighlightFocusStyle`, and `SelectionStyle` for better customization.
This commit introduces a new text theme configuration for search and selection functionalities. It includes the addition of `SearchThemeConfig`, `SearchFormThemeConfig`, `SearchHighlightThemeConfig`, and `SelectionThemeConfig` structs. These configurations allow customization of search form styles, search highlight styles, and selection styles. The changes also update the `WidgetThemeConfig` to include the new text theme configurations, enhancing the flexibility and customization of text-related UI elements.
This commit introduces a new table filter form theme configuration. It includes the addition of `TableThemeConfig` and `FilterFormThemeConfig` structs, allowing customization of filter form styles within tables. The changes also update the `WidgetThemeConfig` to include the new table theme configurations, enhancing the flexibility and customization of table-related UI elements. Additionally, the `FilterForm` and `FilterFormBuilder` structs are updated to support the new theme configuration.
- Introduced DialogBuilder for constructing Dialogs with themes. - Added DialogTheme struct to encapsulate dialog styles and sizes. - Created StyledClear widget to allow styled clearing of areas. - Updated Dialog to use StyledClear for rendering with styles.
- Introduced dialog theme configuration in `config.yaml`. - Added `DialogThemeConfig` struct in `theme.rs`. - Implemented `From<ThemeConfig>` for `DialogTheme`. - Created `dialog.rs` for dialog-specific theme settings. - Updated `widget.rs` to include dialog theme. - Modified `window.rs` to apply dialog theme to dialogs. - Added unit tests for dialog theme serialization and deserialization.
This commit introduces the `style_to_ansi` function, which converts a `Style` struct to its corresponding ANSI escape code string. The function handles foreground and background colors, as well as text modifiers like bold, italic, and underlined. This enhancement improves the flexibility of styling text in the terminal.
This commit introduces support for configuring the help dialog theme. It includes the addition of a new `HelpThemeConfig` struct, which allows customization of title, key, and description styles. The changes also modify the `HelpDialog` to accept a theme configuration and apply the specified styles to the help dialog elements. This enhancement improves the flexibility and customization of the help dialog appearance.
sarub0b0
force-pushed
the
feature/conf-file
branch
from
November 2, 2024 05:29
5040c14
to
7733e4a
Compare
- Introduced `ListThemeConfig` in the theme configuration. - Updated `WidgetThemeConfig` to include `list` themes. - Modified `SingleNamespaceDialog` to accept and apply the new themes. - Added default implementations and builders for `FilterFormTheme` and `ListTheme`. - Updated tests to cover the new theme configurations.
- Added `multiple_select` module to `widget.rs` for theme support. - Implemented `FilterFormTheme` and `SelectFormTheme` for `multiple_select`. - Updated `MultipleNamespacesDialog` to accept `ThemeConfig`. - Enhanced `MultipleSelect` to use `MultipleSelectTheme`. - Refactored `FilterForm` and `SelectForm` to use builders with themes.
sarub0b0
force-pushed
the
feature/conf-file
branch
from
November 2, 2024 05:35
7733e4a
to
1dc047c
Compare
- Added input form theme configuration to the config.yaml file. - Created a new module `input` in `theme.rs` to handle input form themes. - Implemented `InputFormThemeConfig` struct and its traits. - Updated `WidgetThemeConfig` to include `input` field. - Modified `log_query_widget` to use the new input form theme. - Added relevant tests to ensure the new theme configuration works as expected.
- Added `header` field to `TableThemeConfig` in `config.yaml`. - Created `TableTheme` struct in `table.rs` to handle table header themes. - Implemented default header style for `TableTheme`. - Modified `config_widget`, `network_widget`, and `pod_widget` to use the new table header theme. - Added relevant tests to ensure the new table header theme configuration works as expected.
Refactored the PollerBase struct out of the codebase and replaced it with individual fields in the respective poller structs. This change simplifies the code and makes the poller structs more self-contained. Updated all poller implementations to use the new structure.
Added configuration options for customizing pod table highlights based on pod statuses. Users can now define highlight rules in the theme configuration, which will be applied in the PodPoller. Updated relevant modules to support the new configuration.
Replace `unwrap` with `expect` in regex creation to provide more informative error messages. This change improves error handling by making it clear when a regex is invalid.
Introduce default highlight rules for pod statuses in `PodConfig`. This includes rules for `Completed`, `Evicted`, `BackOff`, `Err`, and `Unknown` statuses with corresponding styles. This change enhances the visual representation of pod statuses.
Add support for event highlight configuration in `config.yaml` and implement corresponding changes in the codebase. This includes adding new structs and methods to handle event highlight rules, updating the `App` struct to include `EventConfig`, and modifying the `EventPoller` to use the new configuration. This change enhances the visual representation of events based on their type.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.