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

Show elapsed minutes on scoreboard #2133

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

vmcj
Copy link
Member

@vmcj vmcj commented Aug 31, 2023

This should be an implementation for: #2064

There is a micro optimization to deduplicate the now by merging the last elseif...else and than introducing an if, I found that less readable and moving this now higher would trigger this always for every scoreboard and given that its a public page that felt annoying.

I'm not sure if the printremainingminutes & printelapsedminutes shouldn't be merged with a boolean flag to keep them together, now they are basically each others inverse.

image

@meisterT
Copy link
Member

meisterT commented Sep 1, 2023

Looks a bit cluttered IMHO. Don't have a great idea though that's better than this.

@vmcj
Copy link
Member Author

vmcj commented Sep 2, 2023

Looks a bit cluttered IMHO. Don't have a great idea though that's better than this.

I can put it behind a config flag if that is better.

started:
{{ current_contest.starttime | printelapsedminutes(now) }} at
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to keep it simple and use printtimediff here. That also renders something like 221 minutes more readably as 3:41.

Copy link
Member

Choose a reason for hiding this comment

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

I think the point was to show exactly 221 minutes since you don't need to do further math to relate to the numbers in the scoreboard.

@vmcj vmcj marked this pull request as draft September 13, 2023 19:52
@vmcj
Copy link
Member Author

vmcj commented Sep 13, 2023

This should be updated based on whats in the linked issue.

@vmcj vmcj force-pushed the scoreboard_show_time_remaining branch from 77d0b6b to 26fd96b Compare September 19, 2023 06:09
@vmcj vmcj force-pushed the scoreboard_show_time_remaining branch from 26fd96b to 73b959e Compare September 19, 2023 16:01
@vmcj vmcj force-pushed the scoreboard_show_time_remaining branch from b4baf75 to cfad1a5 Compare September 19, 2023 18:44
@vmcj vmcj marked this pull request as ready for review September 19, 2023 18:44
@vmcj vmcj merged commit 1403241 into DOMjudge:main Oct 1, 2023
18 checks passed
@vmcj vmcj deleted the scoreboard_show_time_remaining branch October 1, 2023 12:29
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.

4 participants