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 for dynamic forms in helm install and upgrade #5790
Add support for dynamic forms in helm install and upgrade #5790
Conversation
/retest |
/hold This PR depends on components being added in #5789. |
22265b0
to
a56aa3c
Compare
/hold cancel |
/retest |
1 similar comment
/retest |
6c21ed9
to
35c5f27
Compare
/retest |
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.
@rohitkrai03 Since we have the Form and YAML view now,The message shown under 'Install Helm Chart' heading has changed.The message displayed changes based on the view shown.
Both the messages for Form view and YAML view can found in this High level design doc https://docs.google.com/document/d/1PCCE8rh1_URGVhaBYBYsGO9ghwwsGAec80XK53FJfvs/edit#heading=h.647eyup2doth
Also the message shown for Upgrade form will have to change.I will work on those messages and update in my final design document.Thanks!
@rohitkrai03 is it possible to keep the expanded state of the form view when switching between form or yaml? |
@christianvogt Don't think it's possible to maintain that state, it's handled by |
@rohitkrai03 There may be something lost here... The "Root Schema" feels weird: Would we not want to auto-expand the first level of the schema to avoid the collapsed block? |
@andrewballantyne That actually depends on the schema provided by the chart. If any part of the schema has a |
35c5f27
to
b339f2f
Compare
Overall it seems to work well. Very annoying that the form collapses when switching from yaml to form; discarding the previous expanded states. I think if this merges as is we should raise an issue to capture this request and discuss with UX. cc @openshift/team-devconsole-ux |
This is looking great @rohitkrai03 ! Agree with the comment made by @christianvogt around remember expansion. Is this being handled differently for the operator backed services/operator OLM based forms? |
b339f2f
to
494bfab
Compare
494bfab
to
cf2cd63
Compare
@serenamarie125 Even OLM forms don't have a way to keep the expansion state while switching between form and yaml views. I can create a issue to look into this later. |
@christianvogt @serenamarie125 Bug to track the issue - https://issues.redhat.com/browse/ODC-4228 |
cf2cd63
to
a2eea96
Compare
import * as Ajv from 'ajv'; | ||
import { JSONSchema6 } from 'json-schema'; |
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.
We should have dependencies on these these 2 packages in our package.json
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.
json-schema
is being used just for its JSONSchema6
type definition all over the console. Is it necessary to add it to package.json
if only type definition is being used?
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.
react-jsonschema-form
has a dependency on ajv
but it's probably better to make it a direct dependency for dev-console
package.
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.
Updated package.json
with new dependencies.
a2eea96
to
e085a9d
Compare
e085a9d
to
c231342
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, parvathyvr, rohitkrai03 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes:
Depends on: #5789
Analysis / Root cause: We have YAML editor as default editor for values in Helm install and upgrade form. We need to support dynamic form generation if the helm chart has a value.schema.json present.
Solution Description: Once we have the custom formik fields to handle dynamic forms and toggle between form and yaml editor without loosing context, we need to use that to add support for synced editor in helm install and upgrade form.
Screen shots / Gifs for design review:
Helm Install -
Helm Upgrade -
Browser conformance: