History events duration badge#907
Merged
Assem-Uber merged 16 commits intocadence-workflow:masterfrom May 20, 2025
Merged
Conversation
adhityamamallan
requested changes
May 16, 2025
...ow-history/workflow-history-events-duration-badge/workflow-history-events-duration-badge.tsx
Show resolved
Hide resolved
| const singleEvent = eventsCount === 1 && !hasMissingEvents; | ||
| const noDuration = singleEvent || (workflowEnded && !endTime); | ||
|
|
||
| const calculateDuration = () => { |
Member
There was a problem hiding this comment.
Can this be moved to a helper function?
Contributor
Author
There was a problem hiding this comment.
I can move it and mock it for the component, the intention was to keep it and test its behaviour through the component.
Member
There was a problem hiding this comment.
Mocking it in the component unit test is not too necessary IMO, see what works better
…nce-workflow#909) Update local types to be up-to-date with IDL changes that add new fields for active-active domains
* Expand the selected event when first loading page * Highlight event groups on both timeline and compact view even when the selected event is a non-start event * Fix timeline event header styling so that it's no longer necessary for the title div to span the entire screen width * Add a link copy button to expanded event titles that copies the link to a specific event
adhityamamallan
approved these changes
May 20, 2025
...flow-history/workflow-history-events-duration-badge/helpers/get-formatted-events-duration.ts
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Create a component to display duration for workflow events group. The way it computes the duration is as following:
startTimeandcloseTimeare passedstartTimeis passed withoutcloseTimeand workflow is still runningstartTimeandworkflowCloseTimeare passed for a completed workflowcloseTimeandworkflowCloseTimefor a completed workflowScreenshots
Screen.Recording.2025-05-16.at.09.36.28.mov