Skip to content

Conversation

@vkareh
Copy link
Contributor

@vkareh vkareh commented Jan 9, 2025

This change prevents accidentally turning off alarm by ensuring that there is a deliberate long press, similar to resetting the Timer app.

InfiniSim_2025-03-27_213657

@github-actions
Copy link

github-actions bot commented Jan 9, 2025

Build size and comparison to main:

Section Size Difference
text 383100B 320B
data 944B 0B
bss 22632B 0B

Run in InfiniEmu

@mark9064 mark9064 added the enhancement Enhancement to an existing app/feature label Jan 10, 2025
@vkareh vkareh force-pushed the alarm-long-press branch 3 times, most recently from 5290eae to 1959b3a Compare January 10, 2025 20:19
@mark9064
Copy link
Member

I haven't had a chance to test this with hardware since the ringing screen has been redesigned. Does the progress bar need to move at all? Maybe it could go between the time and the button in the blank space. Also if it looks a bit blocky (again I need to test), it will render more nicely if it is thinner since there will be fewer pixels to push.

Copy link
Member

@mark9064 mark9064 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially with the bigger button, I think this is a good addition. Thanks for the contribution! The only suggestion I have is calculating the bar progress more consistently and making sure it's super clear to the user that they have to hold the button

@minacode
Copy link
Contributor

Is the animation in the description still up to date? If not, can you please provide a new one? :)

I like the idea of a separate screen if the alarm goes off, but this PR is still very good for making sure that less alarms will be missed due to ghost touches.

@vkareh
Copy link
Contributor Author

vkareh commented May 14, 2025

@minacode

Is the animation in the description still up to date? If not, can you please provide a new one? :)

I've just updated it

@vkareh vkareh force-pushed the alarm-long-press branch from 026527d to 97f0d87 Compare May 14, 2025 14:29
@minacode
Copy link
Contributor

Thank you 🙂

Can we make one more design iteration?

Maybe you can put the bar on the top of the screen, make it a little slimmer and also maybe not orange? Or feel free to suggest something else if you have another idea. Let's just see if we can make it fit in better.

Another more free idea would be to have a red background with the time in the middle and a transparent circle around it that fills clockwise while pressing the screen.

@vkareh
Copy link
Contributor Author

vkareh commented May 15, 2025

@minacode

Maybe you can put the bar on the top of the screen, make it a little slimmer and also maybe not orange? Or feel free to suggest something else if you have another idea. Let's just see if we can make it fit in better.

The orange bar is similar to the one in the timer reset button, so it's intended to keep it consistent/visible. However, I moved to bar to the top of the screen and made it a bit slimmer. What do you think?
InfiniSim_2025-05-15_085055

Another more free idea would be to have a red background with the time in the middle and a transparent circle around it that fills clockwise while pressing the screen.

This seems like an unnecessary large change. This PR uses lv_bar, which is a native construct for this type of progress bar, and so has very little code/overhead.

@minacode
Copy link
Contributor

Thank you 🙂
I like the new version and think it looks cleaner.

@tituscmd
Copy link
Contributor

What if the stop button gradually loses saturation while it’s being pressed? The progress bar is helpful, but it might not be clear enough on its own that something’s actually happening when the button is being held down.

@vkareh
Copy link
Contributor Author

vkareh commented May 15, 2025

@tituscmd

What if the stop button gradually loses saturation while it’s being pressed? The progress bar is helpful, but it might not be clear enough on its own that something’s actually happening when the button is being held down.

My first iteration had the bar as part of the button (similar to the timer), but with the finger on the button itself, I couldn't see anything happening.

@tituscmd
Copy link
Contributor

tituscmd commented May 15, 2025

The problem I'm seeing here is that, going from a single press button like before to a long press button now, the old version is visually indistinguishable to the new one, which might be confusing for new users. It would be helpful to include a visual cue, for example one could replace the icon on the button with text like 'Hold to stop'.

Gradually changing the button's color should also work for visibility, since the button is large enough that it wouldn’t be fully covered by a finger if held down.

@minacode
Copy link
Contributor

Thinking about it, we need a sufficient visual hint either from the start ("hold to stop") or at least after a short touch didn't work. Otherwise people might just press repeatedly and wonder why the button doesn't work.

What do you all think about using "Hold to stop" on the button without any other animation to get the alarm protection part of this PR merged soon and then we have more time to think about cool visual hints?

@mark9064
Copy link
Member

If you just tap it, the bar starts appearing immediately right? So there's feedback, and the eye sees motion so I guess it's reasonably clear it needs holding?

Changing the button colour might not look too good because it requires too much drawing to happen smoothly I think, but I guess we'd need to test

@minacode
Copy link
Contributor

Ok, then I am fine with merging the current version :)

Copy link
Member

@mark9064 mark9064 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current visual design looks good to me, but I'd like to see code comments addressed (immediately rendering the bar on press and using total elapsed hold time rather than incrementing the position)

@vkareh vkareh force-pushed the alarm-long-press branch from 93cf96a to 4d325f7 Compare June 4, 2025 17:19
@vkareh vkareh force-pushed the alarm-long-press branch 2 times, most recently from 66fbf24 to fd89c9d Compare June 19, 2025 17:50
@vkareh vkareh force-pushed the alarm-long-press branch from fd89c9d to 386f863 Compare June 30, 2025 14:19
@vkareh vkareh force-pushed the alarm-long-press branch from 386f863 to 75b54a5 Compare July 31, 2025 12:37
@vkareh vkareh force-pushed the alarm-long-press branch 2 times, most recently from 8fd8061 to c8d5aae Compare November 7, 2025 20:42
@vkareh vkareh force-pushed the alarm-long-press branch 3 times, most recently from 23041bd to ce203f8 Compare November 14, 2025 17:01
@vkareh
Copy link
Contributor Author

vkareh commented Nov 14, 2025

Current visual design looks good to me, but I'd like to see code comments addressed (immediately rendering the bar on press and using total elapsed hold time rather than incrementing the position)

Done!
InfiniSim_2025-11-14_120056

@vkareh vkareh requested a review from mark9064 November 17, 2025 20:29
Copy link
Member

@mark9064 mark9064 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! Haven't tested on hardware yet

Couple refactoring suggestions that hopefully will only take a few mins

Copy link
Member

@mark9064 mark9064 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great :)

@mark9064 mark9064 added this to the 1.17.0 milestone Nov 18, 2025
@mark9064
Copy link
Member

I've stuck it on 1.17 but IMO it's all good to be included in 1.16 if someone else reviews it in time

This change prevents accidentally turning off alarm by ensuring that
there is a deliberate long press, similar to resetting the Timer app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement to an existing app/feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants