Skip to content
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

MM-27009 - Show workflow duration #225

Merged
merged 3 commits into from Jul 28, 2020
Merged

Conversation

cpoile
Copy link
Member

@cpoile cpoile commented Jul 27, 2020

Summary

UX review questions:

  • I assumed you wanted to hide leading 0's, like: 2h 3m 4s instead of 0d 2h 3m 4s.
  • I also assumed you wanted to hide internal 0's, like: 1d 3m 4s instead of 1d 0h 3m 4s. Let me know if you want to show internal 0's. (Personally, I think we /should/ show the internal 0s -- it's less cognitive load.)

Looks like:
image
image

Ticket Link

@cpoile cpoile added 1: UX Review Requires review by a UX Designer 2: Dev Review Requires review by a core committer labels Jul 27, 2020
webapp/src/components/rhs/incident_details.tsx Outdated Show resolved Hide resolved
if (duration.minutes() > 0) {
durationString += duration.minutes() + 'm ';
}
durationString += duration.seconds() + 's';
Copy link
Member

Choose a reason for hiding this comment

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

Do we have to show seconds? I think that might be more distracting then helpful.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what it says in the UX prototype, and the ticket. @asaadmahmood?

webapp/src/components/rhs/incident_details.tsx Outdated Show resolved Hide resolved
webapp/src/components/rhs/incident_details.tsx Outdated Show resolved Hide resolved
@cpoile cpoile requested a review from crspeller July 27, 2020 20:44
Copy link
Member

@crspeller crspeller left a comment

Choose a reason for hiding this comment

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

Code looks good. The only issue might be the sample rate on the seconds counter making it behave strangely if you are watching it. But I think we shouldn't have seconds.

Deferring to @itao and @asaadmahmood on the design question.

Copy link
Contributor

@asaadmahmood asaadmahmood left a comment

Choose a reason for hiding this comment

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

Duration looks good to me.

Copy link
Member

@agarciamontoro agarciamontoro left a comment

Choose a reason for hiding this comment

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

Great! 🎉

I left the nittiest nits you could imagine, of course nothing blocking. Also, I think I share Christopher Speller's feelings about the seconds.

const tick = () => {
setNow(moment());
};
const timerId = setInterval(() => tick(), 1000);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: can we do this here?

Suggested change
const timerId = setInterval(() => tick(), 1000);
const timerId = setInterval(tick, 1000);

Copy link
Member

Choose a reason for hiding this comment

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

Also, a nittier nit: can we make const oneSecond = 1000 or something similar and use it inside setInterval? I never know what units setInterval (or any other time-related function, for that matter) uses.

@cpoile
Copy link
Member Author

cpoile commented Jul 28, 2020

Maybe it's good we're not designers. :P
I upped the res of the timer; the seconds shouldn't hiccup too badly, even if it falls close to the clock's second tick.

@cpoile cpoile merged commit 6beaab9 into master Jul 28, 2020
@cpoile cpoile deleted the MM-27014-show-workflow-duration branch July 28, 2020 18:03
@lieut-data lieut-data added this to the v0.6.0 milestone Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1: UX Review Requires review by a UX Designer 2: Dev Review Requires review by a core committer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants