-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit Secure Variables as JSON #13461
Conversation
Ember Asset Size actionAs of 8b3129c Files that got Bigger 🚨:
Files that got Smaller 🎉:
|
Ember Test Audit comparison
|
* Trimmed the ivy from the codemirror * editedJSONItems removal * De-debugger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some potential bugs I see here that I've outlined. Also, because we're following atomic PRs, I haven't been able to give my input on API design, but I do make advocate for refactoring the save
method.
I totally understand that adding tests could bloat this PR past 1,000 lines of code and you already know this work inside and out, but seeing tests would've helped me grok this more quickly and provide more meaningful feedback.
* Replaced other instances of IvyCodeMirror throughout the app * PR requests for codemirror modifier * Screen reader setting as param * Trying a simpler codemirror test helper * Lint removal * Screen Reader Label added for a11y * JSONViewer cleanup
Non-blocking issue when editing json: If I have two of the same key and then press delete on the comma at the end, the whole like will disappear. This happened to me when I was copy/pasting to eventually change the dupe key, but I wanted to fix the json formatting before changing the key, but then the line disappeared. a.mov |
Also saving dupe keys with different values just made one disappear in non-JSON editing. Feels like this should be an error that blocks save rather than anything else. |
@mikenomitch duplicate keys and snap-json-to-top / delete block errors are both resolved. The duplicate error currently shows up as a warning to the user, but doesn't prohibit save. I think this is a good first step. |
* Toying with insert and update helpers before translation func * Working prototype that lets you switch between json and tabular * No longer add the bonus items row in json mode * Trimmed the ivy from the codemirror (#13503) * Trimmed the ivy from the codemirror * editedJSONItems removal * De-debugger * Replaced other instances of IvyCodeMirror throughout the app (#13528) * Replaced other instances of IvyCodeMirror throughout the app * PR requests for codemirror modifier * Screen reader setting as param * Trying a simpler codemirror test helper * Lint removal * Screen Reader Label added for a11y * JSONViewer cleanup * JSON editor added to /new and all variables stringified before save or translate * Give users a foothold when editing an empty item in JSON mode * Copy the empty KV * No duplicate keys in KV * Better handling of cursor snapping in json edit field * Catch formatting errors on the fly * Basic tests for JSON to Table and Table to JSON in form
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
{{code-mirror}}
modifier with more robust error states (more in line with Vault)TODO
[]
) and it's still valid JSON, but we should warn them / prevent save.