-
Notifications
You must be signed in to change notification settings - Fork 489
Move managed fields in YAML tab to metadata #2388
Move managed fields in YAML tab to metadata #2388
Conversation
We should use https://github.com/josdejong/jsoneditor to show managed fields. |
7134728
to
e896c00
Compare
Signed-off-by: Sam Foo <[email protected]>
5b251f6
to
0ce32ed
Compare
web/src/app/modules/shared/components/presentation/json-editor/json-editor.component.ts
Show resolved
Hide resolved
0ce32ed
to
377a122
Compare
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. |
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? |
377a122
to
ada2db7
Compare
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? |
Signed-off-by: Sam Foo <[email protected]>
ada2db7
to
65646c3
Compare
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:
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?