Show number of days left for long lasting contests.
When a contest lasts for a couple of weeks, showing the exact number of seconds counting down is strange and distracting. This change keeps everything as it was if there are less than 72 hours left in a contest. However, when there is more time left it only displays the number of days left.
Codecov Report
Merging #1094 into master will decrease coverage by
0.21%. The diff coverage isn/a.
@@ Coverage Diff @@
## master #1094 +/- ##
==========================================
- Coverage 62.2% 61.98% -0.22%
==========================================
Files 229 230 +1
Lines 16520 16585 +65
==========================================
+ Hits 10276 10280 +4
- Misses 6244 6305 +61
| Flag | Coverage Δ | |
|---|---|---|
| #functionaltests | 45.78% <ø> (-0.28%) |
:arrow_down: |
| #unittests | 43.28% <ø> (-0.04%) |
:arrow_down: |
| Impacted Files | Coverage Δ | |
|---|---|---|
| cms/server/contest/handlers/main.py | 42.48% <0%> (-12.86%) |
:arrow_down: |
| cms/server/contest/handlers/tasksubmission.py | 43.1% <0%> (-3.45%) |
:arrow_down: |
| cms/db/base.py | 85.1% <0%> (-3.2%) |
:arrow_down: |
| cms/grading/Job.py | 86.25% <0%> (-2.85%) |
:arrow_down: |
| cms/server/contest/handlers/contest.py | 85.85% <0%> (-2.03%) |
:arrow_down: |
| cms/service/ProxyService.py | 57.44% <0%> (-1.6%) |
:arrow_down: |
| cms/db/util.py | 52.59% <0%> (-0.75%) |
:arrow_down: |
| cms/io/rpc.py | 91.8% <0%> (-0.69%) |
:arrow_down: |
| cms/db/filecacher.py | 77.04% <0%> (-0.66%) |
:arrow_down: |
| cms/server/contest/handlers/taskusertest.py | 43.03% <0%> (-0.61%) |
:arrow_down: |
| ... and 15 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 9335527...c2b9741. Read the comment docs.
Not everyone speaks uses English language. "days" should use the same translation mechanism as everything else.
Maybe a good solution could be to show DD:HH:MM:SS instead of HH:MM:SS
No translation mechanism needed, would still retain the "precise" feeling, while at the same time solving the problem of "72 hours left"...
OR... we could just use a library to handle both the "humanization" of the time and its localization (e.g. moment or luxon)
Maybe a good solution could be to show DD:HH:MM:SS instead of HH:MM:SS
No translation mechanism needed, would still retain the "precise" feeling, while at the same time solving the problem of "72 hours left"...
The issue I have with the current system (besides the many hours that are left for a contest that lasts for two weeks) is that the ticking hours, minutes and seconds distract from the fact that they have plenty of time left.
I can definitely live with using moment.js or something similar, but even then you'd have to figure out what you want to show when. The way the system works is great for short term contests, but a bit over precise for longer term things.