-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
feat: made spent time format configurable #1341
Conversation
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i really like this! a few suggestions though:
- validate
GameTimeFormat
- this prevents issues where a user may have input improper or invalid formatting and having weird things appear in the ui. i think it would be best to revert back to the defaults in this case
- maybe ignore the
GameTimeFormat
when it doesn't apply to the given instance- in cases where i only specify
%d%d
, thetotal played:
line has no characters following it. i think it would be best to revert back to the default here as well or try to convert the playtime to that format; another solution could be to allow for per instance configuration. imo reverting to the default or converting to the measurement specified by the formatting string would be the best option here, while still being pretty simple
- in cases where i only specify
- simply the syntax
- similar to
date
in linux, i think just specifying%d
for day,%h
for hour,%m
for minute, and%s
for seconds would make more sense. using the same character twice in most cases (while also having two different formatting strings only for minutes) is a little odd to me and i don't believe it's something users would do on purpose a lot of the time
- similar to
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Made most of the suggested changes. Here are some small notes:
|
I don't think we need this much granularity for this, though? I think a simple checkbox to show the playtime in hours is fine. |
fair: I will close this after I open the other one |
closing this in favor of:#1536 |
I still think this would be neat as an advanced/optional feature that could be hidden behind a dropdown (with three options: days/hours, just hours, or "advanced", which shows the text input below the dropdown to type a custom format). I always like having more options, but it's fine if they're hidden behind more clicks in order to keep the "basic behaviors" quick and accessible. |
Advanced users can just go and extract the play time in seconds from the |
fixes #554
Small changes that differ from the requirement:
The precision can be set exactly by suffixing the option with a dot and the wanted precision, e.g. %d.4 => days with digits of precision.