Skip to content
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

Introduce a small delay between toggling a check mark and hiding the habit or sorting the list #1055

Closed
iSoron opened this issue Aug 6, 2021 · 6 comments
Labels
small-enhancement Small improvements to an existing functionality
Milestone

Comments

@iSoron
Copy link
Owner

iSoron commented Aug 6, 2021

Description

When "hide completed" is enabled, the app currently hides the habit as soon as the user toggles a check mark, making it impossible to mark the habit as failed or skipped. We should introduce a small delay between toggling a check mark and hiding the habit, so that the user can toggle through different states.

Originally suggested in #1053.

Implementation

One potential way to implement this is to modify CheckmarkButtonView.performToggle. Instead of calling onToggle immediately, we could wait a few seconds before calling it.

    // CheckmarkButtonView.kt
    fun performToggle() {
        value = if (preferences.isSkipEnabled) {
            Entry.nextToggleValueWithSkip(value)
        } else {
            Entry.nextToggleValueWithoutSkip(value)
        }
        onToggle(value) // Delay this call
        performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
        invalidate()
    }
@iSoron iSoron added the small-enhancement Small improvements to an existing functionality label Aug 6, 2021
@iSoron iSoron modified the milestones: Loop 2.1, Loop 2.0.3 Aug 6, 2021
@hiqua
Copy link
Collaborator

hiqua commented Aug 6, 2021

Ideally it should also delay the sort.

@iSoron iSoron changed the title Introduce a small delay between toggling a check mark and hiding the habit Introduce a small delay between toggling a check mark and hiding the habit or sorting the list Aug 8, 2021
@hiqua
Copy link
Collaborator

hiqua commented Aug 22, 2021

The problem with a sleep in performToggle is that the user does not get feedback that their action had any result. This makes it confusing, and does not help much to correct mistakes. So maybe it's not the right approach.

I think we should keep the feedback for the checkmark from performToggle and just delay the habit list refresh itself.

@iSoron
Copy link
Owner Author

iSoron commented Aug 22, 2021

The problem with a sleep in performToggle is that the user does not get feedback that their action had any result.

For this solution to work, we would need to run onToggle(value) asynchronously, instead of just adding sleep before it. By the way, I think adding a sleep there would also lead to an "application not responding" warning.

I think we should keep the feedback for the checkmark from performToggle and just delay the habit list refresh itself.

That could also work.

@hiqua
Copy link
Collaborator

hiqua commented Nov 5, 2021

I think we fixed this in #1147.

Leaving it open because I don't know how you want to handle the milestone / if there's another branch where you want to cherry-pick it.

@hiqua hiqua closed this as completed Nov 5, 2021
@hiqua hiqua reopened this Nov 5, 2021
@iSoron
Copy link
Owner Author

iSoron commented Nov 12, 2021

@hiqua Thanks, I'm currently planning to relase this in Loop 2.1. If we have a 2.0.4 release, I might cherry pick it.

@aubreyz
Copy link

aubreyz commented Nov 17, 2022

A really terrible delay that messes up the user experience and leads to mis-clicking and lost habits. I really don't want habits jumping around while I am checking them off. I have lost hours of effort trying to figure out what I just clicked by mistake (hint to users until this is fixed - always check off tasks from lower down on the screen working upwards). I know this is a free app (and a good one), but this is so sad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small-enhancement Small improvements to an existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants