-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add support toggling json view of schemas in CreateSchemaForm #939
Conversation
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Just adding to note to hold any merging until after Emiliano cuts the next release for Traction to go to Test and Prod. |
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Deployment URLs ready for review. |
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
16d633c
to
dd67b25
Compare
This is a really good feature. We should have others tickets to do this for other objects, when we see them. It aligns for with the swagger api, which I think will be good in training scenarios and following existing documentation. |
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.
Really nice work!
Unit tests are annoying, but some could be considered. Especially in the ToggleJson component which will likely be reused or changed in the future.
Sure thing I'll try adding them now |
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
This pr resolves #921 by introducing a standard way to toggle between the json representation of a schema as seen below.
*: For consistency invalid JSON is not allowed in this new component. How this error is indicated will be handled by the parent components.
Regular representation:
JSON representation:
The two are always kept in sync when switching. This way users can enter
some fields via the JSON view and other fields using the regular list view.
Here is an example of the attribute list being updated and reflected in the regular list view.
Change made in the JSON view:
Resulting change seen in the list view:
To reduce duplication of code I have adapted the code used in
EnterCredentialValues.vue
and extracted the functionality of toggling to a JSON view into it's own common componentToggleJson
.