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

Perform automatically a search after 500 milliseconds #71

Merged
merged 4 commits into from
Mar 22, 2022
Merged

Conversation

kekkyojin
Copy link
Collaborator

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature

Fixes

Issue Number: #1

What is the current behavior?

User must explicitly request app to perform the search

What is the new behavior?

App will perform the search request automatically after text had been changed and half a second had elapsed

Other information

The initial text has also been changed as requested on Alpha bug meta-issue. As it is semantically different from the old -original one, it has been renamed and translations has been removed so translators see there is a new string to be translated.

The request is performed after 500 milliseconds had elapsed. I tried with 300 milliseconds but it looked too much automatic; trying with 1 second was ok but maybe a little too slow. Some other values could also be tested, but current one seems ok to me.

Search fragment has also been simplified. It is now using ConstraintLayout, so RelativeLayout is no longer needed; labels shown when there is no query or there are no results are now using the same TextView. This simplifies the layout without making code more difficult, as there are just a few places where that TextView was needed.

@kekkyojin kekkyojin requested a review from akinwale December 28, 2021 17:51
@akinwale
Copy link
Contributor

I'd like to hold off on this for now. Some users were complaining about the behaviour on iOS so we disabled auto search. Maybe we can make this an optional setting that can be toggled on.

@kekkyojin kekkyojin removed the request for review from akinwale January 17, 2022 18:23
@kekkyojin kekkyojin marked this pull request as draft January 17, 2022 18:24
@kekkyojin
Copy link
Collaborator Author

I have converted this into a draft again until the feature has been finally accepted to be added and to avoid accidental merging of this code.

@akinwale
Copy link
Contributor

akinwale commented Mar 9, 2022

@kekkyojin With the settings page restored in the latest code, can we update this PR to allow autosearch be a setting (disabled by default) that can be toggled?

@kekkyojin
Copy link
Collaborator Author

Sure, @akinwale . I will be working on it in about a few minutes

@kekkyojin kekkyojin marked this pull request as ready for review March 9, 2022 18:16
@kekkyojin kekkyojin requested a review from akinwale March 9, 2022 18:16
Copy link
Contributor

@akinwale akinwale left a comment

Choose a reason for hiding this comment

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

Looks good.

@kekkyojin kekkyojin merged commit 28a583b into master Mar 22, 2022
@kekkyojin kekkyojin deleted the autosearch branch March 22, 2022 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants