Page MenuHomeWildfire Games

Production queue progress to show time remaining
ClosedPublic

Authored by temple on May 22 2017, 8:47 PM.

Details

Summary

Currently the production queue progress is shown by a percentage, which is not that useful. In the top left picture below, we see that the four units are 56% complete. But how does that help us? What we really want to know is when these units will be ready.

In the top right picture I've changed it to show the time remaining. Now we know that the four units will be done in 14 seconds. (The green overlay gives us a rough indication of the percentage anyway.) The timer counts down so I think its meaning will be obvious to users.

Pictures here if they aren't shown above.

Test Plan

Test that everything looks and works okay.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

temple created this revision.May 22 2017, 8:47 PM
elexis added a subscriber: elexis.May 22 2017, 9:27 PM
elexis added inline comments.
binaries/data/mods/public/gui/session/selection_panels.js
642 ↗(On Diff #2136)

translaWithContext or translation comment

Tested it. Works great.

borg- added a subscriber: borg-.May 23 2017, 7:25 PM
This comment was removed by borg-.

Definitely agree with this change. :)

binaries/data/mods/public/gui/session/selection_panels.js
642 ↗(On Diff #2136)

Maybe rename queueProgress to queueTimeRemaining for the sake of consistency?

temple updated this revision to Diff 2189.May 25 2017, 8:04 PM
temple updated this revision to Diff 2190.May 25 2017, 9:01 PM

Changed the object name. Added a translation comment.

elexis accepted this revision.May 26 2017, 3:03 AM

Thanks for the patch.
All occurances are replaced.

Also 30 seconds for age 2 still seems too fast to me.

binaries/data/mods/public/gui/session/selection_panels.js
642 ↗(On Diff #2190)

Notice how this number + "%" is totally broken translation-wise.
That was the only occurance of "%"
Those (escaped) percentage numbers in the translation strings: "%%" are unrelated, so all percent numbers are changed as far as I can see.
The construction rate, capture progress is seen in a status bar, but not printed explicitly, neither in the tooltips.

642 ↗(On Diff #2136)

data.item.progress: Good that you didn't removed the "progress" property in ProductionQueue.prototype.GetQueue, since that is still used by stopAllProduction in entity.js to stop all queues below 45% if the AI is rushed afaics. (Still wonder if it wouldn't be clener to return totalTime instead of the percent number, but not our business)

String:
Probably correct that we don't want "mm:ss" here because it would imply a leading zero.

Another option would be showing the total number of seconds and no minutes, i.e. 68 or 190 to avoid those other leading zeroes if it's less than a minute and less than 10 seconds (which should be the average case even)

Context:
"time remaining" and "countdown" contain the same information
Adding the context to strings that aren't self explanatory seems good to me, so that translators know what they are used for, thus being abel to find a more accurate translation.

binaries/data/mods/public/gui/session/selection_panels_right/queue_panel.xml
9 ↗(On Diff #2190)

All occurances of queueProgress applied

This revision is now accepted and ready to land.May 26 2017, 3:03 AM
This revision was automatically updated to reflect the committed changes.