Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Move managed fields in YAML tab to metadata #2388

Merged
merged 2 commits into from
May 19, 2021

Conversation

GuessWhoSamFoo
Copy link
Contributor

What this PR does / why we need it:
Since managed fields are immutable, it does not make sense to show them in the YAML tab which is used to edit objects especially since they take up a lot of space.

They are now moved under metadata:
image

Which issue(s) this PR fixes

Special notes for your reviewer:

A good video to understand purpose of managed fields: https://www.youtube.com/watch?v=P12z8X-qhis

Documentation: https://kubernetes.io/docs/reference/using-api/server-side-apply/

Is there a better way to represent JSON data with current components?

@GuessWhoSamFoo
Copy link
Contributor Author

We should use https://github.com/josdejong/jsoneditor to show managed fields.

@GuessWhoSamFoo GuessWhoSamFoo marked this pull request as draft May 11, 2021 16:13
@GuessWhoSamFoo GuessWhoSamFoo force-pushed the issue-2132 branch 2 times, most recently from 7134728 to e896c00 Compare May 17, 2021 14:40
@GuessWhoSamFoo GuessWhoSamFoo marked this pull request as ready for review May 17, 2021 15:04
@GuessWhoSamFoo GuessWhoSamFoo force-pushed the issue-2132 branch 2 times, most recently from 5b251f6 to 0ce32ed Compare May 17, 2021 17:40
@xtreme-vikram-yadav
Copy link
Contributor

Sorry for bringing this up now but I find black font color taxing on eyes in dark mode and it looks a bit off compared to other text in dark mode. It would be nice if the font color could switch to light in dark mode mode and vice versa.

@mklanjsek
Copy link
Contributor

Nicely done, I like this approach! However new component needs to be styled. In particular: border color, text font and color have to match the rest of the app. Dark theme is especially off with colors. As for font, ideally we should use same fixed font as in Monaco editor.

The way double quotes are escaped is also not ideal, any chance that could be changed?

@GuessWhoSamFoo
Copy link
Contributor Author

Options that come to mind: raw string literals with backticks, string the output of decoded json byte slice, or fork go. What is a more developer friendly way to do this?

@GuessWhoSamFoo GuessWhoSamFoo merged commit 5e4d209 into vmware-archive:master May 19, 2021
@GuessWhoSamFoo GuessWhoSamFoo deleted the issue-2132 branch May 19, 2021 15:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ManagedFields optional in YAML tab
3 participants