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
Bug 1998575: Fix that insert yaml does nothing when yaml is provided via an extension (also hide samples when user edits a resource) #9909
Conversation
/kind bug |
@jerolimov: This pull request references Bugzilla bug 1998575, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (gamore@redhat.com), skipping review request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test e2e-gcp-console |
/retest |
1 similar comment
/retest |
Also show samples in YAMLEditorField only if the user creates a new resource
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jerolimov, 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 |
@jerolimov: All pull requests linked via external trackers have merged: Bugzilla bug 1998575 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-6301
https://bugzilla.redhat.com/show_bug.cgi?id=1998575
Analysis / Root cause:
When the user presses on insert it doesn't insert any YAML because the YAML templates was provided by an extension.
It also shows an error just in development mode because the YAML was undefined.
It was also incorrect that the YAML (field) editor shows the samples at all. At least our generic YAML editor shows samples only if the user creates a new resource.
Solution Description:
editor.setValue
is called. This fixes the error which was only shown in development mode. (With this change alone we still have a button which do nothing.)edit-yaml.jsx
only if the user creates a new resource. Added a new propshowSamples
for this to make the decision in the parent component.BuildConfigForm
,EditDeploymentForm
,HPAForm
andPipelineBuilderForm
only when editoring a resource (a resource is loaded successfully)HelmInstallUpgradeForm
never (the helm itself is the "sample", right?)add/EventSourceForm
,add/brokers/AddBrokerForm
andadd/channels/form-fields/ChannelYamlEditor
always because these forms are obviously add only formsScreen shots / Gifs for design review:
BuildConfig before:
BuildConfig after (no samples anymore):
Create Pipeline with Pipeline Builder before:
Create Pipeline with Pipeline Builder after (same as expected):
Edit Pipeline with Pipeline Builder before:
Edit Pipeline with Pipeline Builder after (no samples anymore):
Unit test coverage report:
Unchanged
Test setup:
Unchanged
Browser conformance: