Skip to content

Conversation

Assem-Uber
Copy link
Contributor

@Assem-Uber Assem-Uber commented May 16, 2025

Summary

Create a component to display duration for workflow events group. The way it computes the duration is as following:

  • Show gray badge if both startTime and closeTime are passed
  • Show accent badge with incrementing duration if startTime is passed without closeTime and workflow is still running
  • Show gray badge if startTime and workflowCloseTime are passed for a completed workflow
  • Hide the badge if there is no closeTimeandworkflowCloseTimefor a completed workflow

Screenshots

Screen.Recording.2025-05-16.at.09.36.28.mov

Screenshot 2025-05-16 at 09 35 21

const singleEvent = eventsCount === 1 && !hasMissingEvents;
const noDuration = singleEvent || (workflowEnded && !endTime);

const calculateDuration = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be moved to a helper function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move it and mock it for the component, the intention was to keep it and test its behaviour through the component.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mocking it in the component unit test is not too necessary IMO, see what works better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Assem-Uber and others added 8 commits May 19, 2025 10:23
…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
@Assem-Uber Assem-Uber merged commit 00c1683 into cadence-workflow:master May 20, 2025
1 check passed
@Assem-Uber Assem-Uber deleted the feature/11535/add-events-duration-component branch May 20, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants