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 YAML switcher to pipeline builder form #7028
Add YAML switcher to pipeline builder form #7028
Conversation
f206a60
to
1233afb
Compare
@rottencandy On clicking Create button in yaml view does nothing for me, Please confirm if it is working for you. Reset button works fine. |
1233afb
to
33b04b9
Compare
@karthikjeeyar updated the validation schema. It should work properly now. |
/retest |
/assign |
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.
First pass to clean things up. Will try to review more tomorrow.
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderForm.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/validation-utils.ts
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/utils.ts
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/types.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/utils.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/utils.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/utils.ts
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/types.ts
Outdated
Show resolved
Hide resolved
...kages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderVisualization.tsx
Outdated
Show resolved
Hide resolved
25f2d46
to
b186c03
Compare
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderPage.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderPage.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/utils.ts
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderForm.tsx
Show resolved
Hide resolved
b186c03
to
b8bdf6c
Compare
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderForm.tsx
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderForm.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/utils.ts
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/utils.ts
Outdated
Show resolved
Hide resolved
const { status } = useFormikContext<PipelineBuilderFormikValues>(); | ||
|
||
return ( | ||
<StackItem isFilled className="odc-pipeline-builder-form__content"> |
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.
So when adding wrapping containers, you have to be careful what the elements you're wrapping are.
This is a StackItem
, which should be inside a Stack
- but if you look at the rendered output, the form gets in the way:
<StackItem isFilled className="odc-pipeline-builder-form__content"> |
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.
Thanks, makes sense. Removed. I wonder if it's okay to have something that is not a StackItem
directly under Stack
.
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderForm.tsx
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/pipelines/pipeline-builder/PipelineBuilderForm.tsx
Show resolved
Hide resolved
b8bdf6c
to
9dbdf84
Compare
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.
Enums in types are not the end of the world, but we should try to keep the items together.
export enum UpdateOperationType { | ||
ADD_LIST_TASK, | ||
CONVERT_LIST_TO_TASK, | ||
UPDATE_TASK, | ||
REMOVE_TASK, | ||
DELETE_LIST_TASK, | ||
FIX_INVALID_LIST_TASK, | ||
} | ||
|
||
export enum TaskErrorType { | ||
MISSING_REQUIRED_PARAMS = 'missingParams', | ||
MISSING_NAME = 'nameMissing', | ||
MISSING_RESOURCES = 'missingResources', | ||
} |
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.
So types can have circular references. TypeScript handles this better than JS imports of code. You should be able to return these enums to the other file.
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.
The linter didn't let me commit, which is why I did the suffling. I've disabled the warnings now.
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.
Hmm, damn, that was not necessary. I didn't see the lint error on my side. I didn't try to commit naturally haha... and I didn't run the linter. Must be something my IDE is not picking up on. 🤦 This is worse actually then what you originally did... but I think we can leave it. I'll LGTM this PR and just get it merged. We can clean up once it's in it's own package.
9dbdf84
to
c204275
Compare
c204275
to
02a7870
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, rottencandy 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 |
Story:
https://issues.redhat.com/browse/ODC-3662
Description:
Add a YAML switcher allowing the ability to dynamically switch between YAML view and form view, including persisting form data including errors in both views.
Screen shots / Gifs for design review:
Browser conformance:
cc: @openshift/team-devconsole-ux @andrewballantyne @karthikjeeyar