BangleApps icon indicating copy to clipboard operation
BangleApps copied to clipboard

[alarm/sched] feature: show time elapsed since alarm triggered

Open bobrippling opened this issue 10 months ago • 13 comments

It'd be useful to see how long has elapsed since the alarm fired, for more time-sensitive events

bobrippling avatar Apr 16 '25 16:04 bobrippling

Hi! What do you mean by that? Should it show when the alarm rings, or wakes up from snoozing, or should it be shown if you go into the alarm in app itself? I think it would be more useful when the alarm rings :)

RKBoss6 avatar Jun 29 '25 19:06 RKBoss6

Yes I agree - I'm thinking something like displaying {n}s (seconds) below the alarm name (here, "1m"). The amount would then tick up as time goes on to show how long the alarm's been sounding for.

Image

bobrippling avatar Jun 29 '25 19:06 bobrippling

So would it be for alarms, timers, or both?

RKBoss6 avatar Jun 29 '25 20:06 RKBoss6

I can get to work on this :)

RKBoss6 avatar Jun 29 '25 20:06 RKBoss6

Oh yes both I think, would you agree? Happy to get involved, feel free to tag me in any work-in-progress PRs :)

bobrippling avatar Jun 29 '25 20:06 bobrippling

Of course!

RKBoss6 avatar Jun 29 '25 21:06 RKBoss6

For this, is there a way to update the prompt without needing to do a new E.showPrompt(...) for every second? (for timers, as precision might matter...)

RKBoss6 avatar Sep 10 '25 21:09 RKBoss6

For that case I would probably just do a clearRect on the area for the second and write the next second manually with setInterval. Should be easy and light weight? Just be careful to clear the interval when the user navigates away.

thyttan avatar Sep 10 '25 21:09 thyttan

Nice, would I get the area manually? I don't think there's a function to get the area one part of text covers...

If we do do it manually, it needs testing for Bangle.js 1

RKBoss6 avatar Sep 10 '25 21:09 RKBoss6

Hm, I think there may not be a way to work it out programmatically. So it's a bit hacky and maybe a bit of a head ache to maintain. I guess we opted to avoid that with the long press snooze menu...

thyttan avatar Sep 10 '25 21:09 thyttan

I guess it would not be impossible to integrate something like it inside showPrompt both for Bangle.js 1 and 2. It just feels a little overkill at first thought to me.

thyttan avatar Sep 10 '25 22:09 thyttan

Yeah, I suppose unlike showMenu, there's no object we can update and redraw. Bit of a tricky one...

bobrippling avatar Sep 11 '25 07:09 bobrippling

Short of doing the prompt manually, I suppose

bobrippling avatar Sep 11 '25 07:09 bobrippling