-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Disable the fields of all CRUD workflow actions on readonly mode #9939
Conversation
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.
PR Summary
This PR implements readonly functionality across workflow action forms, focusing on consistent form field behavior in readonly mode.
Key changes:
- Added disabled state to
WorkflowStepHeader
component for readonly workflow visualizer mode - Implemented comprehensive Storybook test coverage with stories for Create/Update/Delete Record actions in both default and disabled states
- Added
testId
props throughout components for improved testability - Created
WorkflowStepDecorator
to set up workflow state for component testing - Introduced mock data and GraphQL handlers for workflow-related operations
Note: The PR raises an important issue about standardizing terminology between 'readonly' and 'disabled' states across components, which should be addressed in follow-up work.
15 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings | Greptile
...nt/src/modules/workflow/workflow-steps/components/__stories__/WorkflowStepHeader.stories.tsx
Outdated
Show resolved
Hide resolved
...odules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordFieldChip.tsx
Outdated
Show resolved
Hide resolved
...c/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordPicker.tsx
Show resolved
Hide resolved
...c/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordPicker.tsx
Show resolved
Hide resolved
...steps/workflow-actions/components/__stories__/WorkflowEditActionFormDeleteRecord.stories.tsx
Outdated
Show resolved
Hide resolved
...steps/workflow-actions/components/__stories__/WorkflowEditActionFormDeleteRecord.stories.tsx
Show resolved
Hide resolved
...steps/workflow-actions/components/__stories__/WorkflowEditActionFormUpdateRecord.stories.tsx
Outdated
Show resolved
Hide resolved
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, left a couple of comments
...odules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordFieldChip.tsx
Outdated
Show resolved
Hide resolved
...steps/workflow-actions/components/__stories__/WorkflowEditActionFormCreateRecord.stories.tsx
Outdated
Show resolved
Hide resolved
...steps/workflow-actions/components/__stories__/WorkflowEditActionFormDeleteRecord.stories.tsx
Outdated
Show resolved
Hide resolved
...steps/workflow-actions/components/__stories__/WorkflowEditActionFormUpdateRecord.stories.tsx
Outdated
Show resolved
Hide resolved
Log
|
Fixes https://discord.com/channels/1130383047699738754/1333822806504247467
In this PR:
Follow up:
readonly
anddisabled
alternatively; these are two different states when talking about a HTML<input />
element. I think we should settle on a single word.<WorkflowSingleRecordPicker />
component to behave as other selects