-
Notifications
You must be signed in to change notification settings - Fork 121
Add reset button to history timeline #882
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 reset button to history timeline #882
Conversation
4904ce0
to
0b344ca
Compare
Fix styling for JSON copy buttons to have a transparent background
* Fix page filters styling, by aligning all items to flex-end instead of only the filters clear button being aligned so * Add an optional "mini" field to the page filter config that allows the filter to render in the minimum required size instead of being equally sized like the other page filters * Modify domain listing logic to filter out deleted and invalid domains * Add checkbox filter that shows deprecated domains when toggled
...w-history/workflow-history-timeline-group/__tests__/workflow-history-timeline-group.test.tsx
Outdated
Show resolved
Hide resolved
...s/workflow-history/workflow-history-timeline-group/workflow-history-timeline-group.styles.ts
Outdated
Show resolved
Hide resolved
src/views/workflow-history/workflow-history-timeline-group/workflow-history-timeline-group.tsx
Outdated
Show resolved
Hide resolved
src/views/workflow-history/workflow-history-timeline-group/workflow-history-timeline-group.tsx
Show resolved
Hide resolved
...ews/workflow-history/helpers/get-history-group-from-events/get-decision-group-from-events.ts
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.
Pull Request Overview
This PR introduces a reset button for closed decision groups in the workflow history timeline. It enables users to click the reset button to open a modal pre-populated with the corresponding decision event ID.
- Added a new optional property (resetToDecisionEventId) to the history group types and integrated it into the reset button logic.
- Modified WorkflowHistory and WorkflowHistoryTimelineGroup to manage and propagate the reset state and added tests to verify the reset button behavior.
- Updated the WorkflowActionsModal and its tests to support initial form values.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/views/workflow-history/workflow-history.types.ts | Added resetToDecisionEventId field to the history group type. |
src/views/workflow-history/workflow-history.tsx | Introduced state management for the reset modal and passed correct props to child components. |
src/views/workflow-history/workflow-history-timeline-reset-button/tests/workflow-history-timeline-reset-button.test.tsx | Updated tests to use userEvent and verify the reset button functionality. |
src/views/workflow-history/workflow-history-timeline-group/* | Updated types, component, and styles to support and display the reset button when applicable. |
src/views/workflow-history/helpers/get-history-group-from-events/get-decision-group-from-events.ts | Updated logic to compute resetToDecisionEventId based on event conditions. |
src/views/workflow-actions/* | Modified modal components to accept and use initialFormValues for the reset action. |
Summary
Show reset button for closed decision groups in history timeline. Clicking the reset button opens the reset modal with event Id initialised to the close event id.
Changes
resetToDecisionEventId
to decision groupsWorkflowActionsModal
with initial form valuesWorkflowHistoryTimelineResetButton
for groups withresetToDecisionEventId
Screenshots