Skip to content

Conversation

lucasgoral
Copy link
Contributor

@lucasgoral lucasgoral commented Sep 29, 2025

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

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.
@lucasgoral lucasgoral marked this pull request as ready for review September 30, 2025 07:13
@Copilot Copilot AI review requested due to automatic review settings September 30, 2025 07:13
@lucasgoral lucasgoral changed the title Yaml view improvements YAML view improvements Sep 30, 2025
Copy link
Contributor

@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 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 comprehensive removeManagedFieldsAndFilterData 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.

@lucasgoral lucasgoral requested a review from Copilot September 30, 2025 07:15
Copy link
Contributor

@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

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.

lucasgoral and others added 8 commits September 30, 2025 09:18
Copy link
Contributor

@andreaskienle andreaskienle left a 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

@lucasgoral lucasgoral merged commit 78e6e1f into main Oct 1, 2025
5 checks passed
@lucasgoral lucasgoral deleted the yaml-view-improvements branch October 1, 2025 07:53
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.

2 participants