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
user-local-time
shows empty time for people with no commits
#2612
Comments
user-local-time
- empty time for people with no commits
user-local-time
- empty time for people with no commitsuser-local-time
shows empty time for people with no commits
In my system, it comes only when I hover over that time area. |
Right, it's a |
Will that be enough? How about not adding time part for such users? |
Yeah ideally we wouldn't show the icon at all, but sometimes it might take several seconds until it appears, so we have a "loading" in place. The loading is then replaced by the time or
|
👍 |
I believe that it would be better if no icon nor message was displayed for people with no commits,
I agree with the OP that having a plain clock icon (followed by a |
What if we do |
If we show the clock icon while loading and then hide it without a reason, it might look like a bug. If we don't show the clock icon while loading, the user doesn't know whether some information is coming… or if it tried and failed. "Timezone unknown" would be the more appropriate response. There could be an additional optimization: if the time is already cached as "missing", then don't show the icon at all. |
That's what I also had in mind. Just to summarize:
|
Code-wise, this could be done with a timer instead of manually checking the cache, etc. Example to be inserted on line 104 const timeout = delay(300);
const date = getLastCommitDate();
// This will delay adding the icon for 300ms, enough to check if the date is store as "not found"
const race = await Promise.race([timeout, date]);
if (race === false) {
// `date` was cached as "not found", so don't add the icon at all
return;
} The code and comments might be improvable. |
Thank you both for fixing this. |
Maybe a nicer message will help.
The text was updated successfully, but these errors were encountered: