Skip to content

YAML Editor Polishing #358

@andreaskienle

Description

@andreaskienle

We made some great achievements with the new YAML editor (IntelliSense ✨🤩)

Let’s polish it a bit, from UX/UI as well as from a technical perspective.

So far, this is a list to collect various items/suggestions, up for discussion

UI/UX changes

  • Remove double toolbars for editable YAML and integrate the Apply Changes button in the main toolbar
    Image

  • Apply Changes button should be disabled when there are no changes

  • In another scenario, move the Edit button there and restore the YAML heading on the left
    Image

  • Add a Show Diff toggle button to toggle between diff and edit mode (disabled when there are no changes)
    Image

  • Remove the “Are you sure…” step when applying the changes and open a dialog instead (showing the diff)
    Image

  • (We could skip this dialog if the user has the Diff mode already open and apply the changes immediately)

  • Validate YAML errors on every keystroke instead of when applying changes (might be a good idea to debounce this)

  • Enable white-space: 'pre-wrap’ so newlines (\n) in error messages are rendered correctly

    NEW: Image

    OLD: Image

Technical changes

  • Both, <YamlViewer> and <YamlDiff> only appear to be wrappers around other components (<YamlEditor>/<YamlDiffEditor>) without adding any special functionality. Can we remove them and move the CSS to the upper/lower component?
  • Make <YamlEditor> a controlled component (yaml, onChangeYaml) and move validation logic and diff/apply logic further up?
  • We still have commented out coding because of the download button. Can we remove this?
  • If we want to keep the download button: We have the filename as prop for the whole component chain but it's mostly always filename={${item.kind}_${item.metadata.name}} Can we calculate this further down instead of passing it through?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mcp-uiAll ManagedControlPlane UI related issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions