-
Notifications
You must be signed in to change notification settings - Fork 3
YAML view improvements #303
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
Conversation
Introduces a 'showOnlyImportantData' prop to YAML viewer components, allowing users to toggle the display of only essential YAML fields. Updates related components and dialog to support this feature and propagate state.
There was a problem hiding this 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 enhances the YAML viewing functionality by introducing a filter to show only important fields and improving data handling. The main purpose is to provide users with cleaner YAML views while maintaining the ability to copy the full resource data.
Key changes:
- Replaced
removeManagedFieldsProperty
with a more comprehensiveremoveManagedFieldsAndFilterData
function - Added a checkbox option to toggle between filtered and full YAML views
- Enhanced the YAML viewer to support separate display and copy strings
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
src/utils/removeManagedFieldsProperty.ts | Removed old utility function |
src/utils/removeManagedFieldsAndFilterData.ts | Added enhanced utility with filtering capabilities |
src/lib/api/types/shared/keyNames.ts | Added Kubernetes annotation constant |
src/components/Yaml/YamlViewer.tsx | Enhanced with separate display/copy strings and conditional download button |
src/components/Yaml/YamlViewDialog.tsx | Added checkbox for toggling important fields filter |
src/components/Yaml/YamlViewButtonWithLoader.tsx | Integrated filter state management |
src/components/Yaml/YamlViewButton.tsx | Updated to use new filtering function and state |
src/components/Yaml/YamlLoader.tsx | Enhanced with filter support and memoized YAML strings |
src/components/Graphs/Graph.tsx | Updated import to use new filtering function |
public/locales/en.json | Added localization for the new filter checkbox |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge it and see how we can reconcile it with sliding the view in from the side
What this PR does / why we need it:
Added checkbox that is checked by default to show only important YAML fields during preview of the resources