InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

Add time since last weather update to weather app

Open JustScott opened this issue 10 months ago • 16 comments

Provides the time since the last weather update, incrementing the duration from seconds to minutes at 60 seconds, and minutes to hours at 3600 seconds. I'm open to suggestions on changes to the texts position and/or color. This should resolve #2140.

Also, on the simulator the seconds old count is only updated when you open the app, while on hardware the seconds count up live while in the app... I'm not sure why this is.

weather_0s_old weather_32s_old weather_1m_old

JustScott avatar Feb 03 '25 18:02 JustScott

Build size and comparison to main:

Section Size Difference
text 379444B 240B
data 944B 0B
bss 22536B 0B

Run in InfiniEmu

github-actions[bot] avatar Feb 03 '25 18:02 github-actions[bot]

Personally, I would prefer to see the minutes instead of the seconds when I have recently updated my weather. For instance, instead of displaying “32 seconds old,” I would like to see “Now” and only show the number of minutes after one has passed.

Another aspect that feels more natural to me is using the phrase “X minutes ago” instead of “X minutes old.”

liamcharger avatar Feb 05 '25 02:02 liamcharger

Personally, I would prefer to see the minutes instead of the seconds when I have recently updated my weather. For instance, instead of displaying “32 seconds old,” I would like to see “Now” and only show the number of minutes after one has passed.

Another aspect that feels more natural to me is using the phrase “X minutes ago” instead of “X minutes old.”

I agree with you on using ago instead of old. As for using Now instead of displaying the seconds, I feel this looks a little akward and personally prefer the seconds count, I'd like to hear what others think about this.

now_instead_of_seconds seconds_instead_of_now

Have to move the label up -1px to prevent the g from being cut off like in the picture above move_update_text_up

And I move the temp up as well to prevent crowding: move_all_up

JustScott avatar Feb 05 '25 04:02 JustScott

I like Now as well, but also agree that it looks a bit awkward. I have some propositions as to how this could be perhaps made better:

Updated now / Updated 12s ago Fetched now / Fetched 12s ago Refreshed now / Refreshed 12s ago

Adding another word results in a less awkward look, as well as being more direct and intuitive to understand.

tituscmd avatar Feb 06 '25 10:02 tituscmd

seconds_instead_of_now

test

In these two images the label doesn't seem to be centered. Is that just me?

tituscmd avatar Feb 06 '25 10:02 tituscmd

@tituscmd I fixed the centering issue by dynamically positioning the label depending on weather there is one or two digits. I just tried out a bunch of examples of how this could look, everyone should let me know which they prefer!

With a seconds counter (with dynamic alignment)

InfiniSim_2025-02-06_170016 InfiniSim_2025-02-06_170034

Two version of up to date

InfiniSim_2025-02-06_170114 up_to_date

variations of "updated now"

now_instead_of_seconds InfiniSim_2025-02-06_170643 InfiniSim_2025-02-06_170704 InfiniSim_2025-02-06_170812

"Updated:" with dynamic alignment

InfiniSim_2025-02-06_171040 InfiniSim_2025-02-06_171427

I can make more examples if anyones curious. Just let me know. I personally prefer to just include the seconds count, as it may be useful to some and keeps the label consistent... also the live second count on hardware makes the app feel more lively.

JustScott avatar Feb 06 '25 23:02 JustScott

InfiniSim_2025-02-06_170034

In this image, if you look at the weather icon up top it still doesn't look centered. I would suggest aligning the label with a pointer to the weather icon or the day in the middle of the table, those always seem to be centered.

I may be a bit of a perfectionist ;D

tituscmd avatar Feb 07 '25 07:02 tituscmd

@JustScott Thank you so much for making all these options!

I think after looking at everything, I like Now and 58s ago / 53m ago / 15h ago the most. The others seem to make the app look too crowded.

tituscmd avatar Feb 07 '25 07:02 tituscmd

In this image, if you look at the weather icon up top it still doesn't look centered. I would suggest aligning the label with a pointer to the weather icon or the day in the middle of the table, those always seem to be centered.

I may be a bit of a perfectionist ;D

Ah I see what you mean about it not looking centered, I was just trying to keep the space between the 1m and ago above the second letter of whatever the third day is, so it doesn't look like the label is moving when it moves from 9m to 10m.

JustScott avatar Feb 07 '25 08:02 JustScott

@JustScott Thank you so much for making all these options!

I think after looking at everything, I like Now and 58s ago / 53m ago / 15h ago the most. The others seem to make the app look too crowded.

I agree with you on this, but am curious as to how long you think the app should displayNow before switching to Xs ago?

JustScott avatar Feb 07 '25 08:02 JustScott

In this image, if you look at the weather icon up top it still doesn't look centered. I would suggest aligning the label with a pointer to the weather icon or the day in the middle of the table, those always seem to be centered. I may be a bit of a perfectionist ;D

Ah I see what you mean about it not looking centered, I was just trying to keep the space between the 1m and ago above the second letter of whatever the third day is, so it doesn't look like the label is moving when it moves from 9m to 10m.

I see, that makes sense. I'd prefer it centered, but I like the idea of making it look like the label isn't moving! :)

tituscmd avatar Feb 07 '25 08:02 tituscmd

I agree with you on this, but am curious as to how long you think the app should displayNow before switching to Xs ago?

Oh, right. What about at 30s ago? Or maybe 31s ago, so that the first 30 seconds are displayed as "Now" and the next 30 seconds are displayed as Xs ago

tituscmd avatar Feb 07 '25 09:02 tituscmd

I agree with you on this, but am curious as to how long you think the app should displayNow before switching to Xs ago?

Oh, right. What about at 30s ago? Or maybe 31s ago, so that the first 30 seconds are displayed as "Now" and the next 30 seconds are displayed as Xs ago

Okay, just so anyone reading this is caught up, here's what it'll look like:

now 31s_ago

I'd prefer it centered, but I like the idea of making it look like the label isn't moving! :)

I personally prefer it to be centered over the third words second letter, so I say we see what the others think. I'm open to changing it if people agree it doesn't look centered. one_minute

JustScott avatar Feb 07 '25 10:02 JustScott

Just a summary of what I would expect to see—"Now" until a minute has passed, "Xmin ago" until an hour has passed, and so on. Support for "Xd ago" and "Xw ago" would also make sense so I'm not looking at "80h ago," or something similar in case my weather isn't updated for a while.

As far as positioning, I like the way the label looks in @JustScott's comment above.

Here's an idea for another PR: instead of squeezing everything onto one screen, what if it's separated into two that the user can scroll vertically—one for the current weather and one for the forecast? The forecast days could be laid out horizontally, and this would fix the text wrap issue in #2240 and would eliminate the need to pick an element to center on in this PR.

liamcharger avatar Feb 12 '25 17:02 liamcharger

Support for "Xd ago" and "Xw ago" would also make sense so I'm not looking at "80h ago," or something similar in case my weather isn't updated for a while.

I believe the weather service only keeps the weather data for 24 hours, so after that it wouldn't display anything until updated again.

(I tested this before on hardware)

JustScott avatar Feb 12 '25 18:02 JustScott

I believe the weather service only keeps the weather data for 24 hours, so after that it wouldn't display anything until updated again.

👍 Just ignore that part then, haha

liamcharger avatar Feb 12 '25 21:02 liamcharger

Hello, I have been using this for some time now and really like it, thank you @JustScott. I did a small review to help this get merged. I have not experienced any issues or bugs.

dariusarnold avatar Jul 31 '25 19:07 dariusarnold

@dariusarnold Thank you for the review, I've applied all of your suggestions outside of the final else statement instead of the explicit else if as I prefer this over a comment. Thank you for helping! Also, I don't really use weather much anymore on my pinetime... so if you find any bugs with these changes please let me know!

JustScott avatar Aug 04 '25 22:08 JustScott