Skip to content

Conversation

@dex4er
Copy link
Collaborator

@dex4er dex4er commented Nov 28, 2025

This pull request introduces a new feature that allows users to toggle YAML key sorting in the resource editor, alongside improvements to how YAML drafts are managed when switching between sorted and unsorted views. The changes ensure that users can safely toggle sorting without losing unsorted edits, and the UI now provides a checkbox for this option.

YAML Sorting Feature:

  • Added an observable sortKeys property to EditResourceModel, with an action handler to toggle sorting and regenerate YAML accordingly.
  • Introduced logic to store and restore the unsorted YAML draft (savedUnsortedYaml) when the sort option is toggled, preventing loss of unsorted edits. [1] [2]
  • Updated YAML generation to respect the sorting option, passing sortKeys to yaml.dump in both regeneration and managed fields toggle flows. [1] [2]

UI Enhancements:

  • Added a "Sort" checkbox to the resource editor UI, enabling users to toggle YAML key sorting directly.

These changes improve the editing experience by giving users control over YAML key order and ensuring their edits are preserved when switching between sorted and unsorted views.

@dex4er dex4er added this to the v1.7.0 milestone Nov 28, 2025
@dex4er dex4er merged commit 8b7b6c8 into freelensapp:main Nov 28, 2025
10 checks passed
@dex4er dex4er deleted the editor/sort-option branch November 28, 2025 22:08
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