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

Made preferences searchable #7586

Merged
merged 27 commits into from
Jan 30, 2022
Merged

Conversation

litetex
Copy link
Member

@litetex litetex commented Dec 26, 2021

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This is one of the PR which will improve the search according to #3192 (comment).

  • Adds a (fuzzy) search to the preferences (based on https://github.com/ByteHamster/SearchPreference but heavily modified)
  • Minor code cleanups
  • (minor change) moves the "Clear reCAPTCHA cookies" preference to the "history & cache"-area and disables it by default.
    Currently it's under the "Content"-area and removed by default. I did this so that it's possible to search this setting.

Demo:

NPDemoPrefSearch1.gif.mp4

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@opusforlife2
Copy link
Collaborator

Sweeeeeet.

@litetex litetex added feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface labels Dec 26, 2021
@litetex litetex marked this pull request as ready for review December 27, 2021 18:04
@TacoTheDank
Copy link
Member

Good work! 👍

@litetex
Copy link
Member Author

litetex commented Dec 29, 2021

Here a quick "How to" for testing the release version with Android Studio:

  1. You need a JKS file with a signing key
    1. Menu bar>Build>Generate signed bundle or APK
    2. Choose APK
    3. Create new
    4. Fill the form out accordingly (Note: Certificate only needs one field filled in)
  2. Create a new signing config
    1. Menu bar>File>Project Structure
    2. Modules>app>Signing configs
    3. Add a new one
    4. Fill in the data from the above created JKS file
  3. Select the new signing config
    1. Menu bar>File>Project Structure
    2. Build Variants>app>Build Types>release
    3. Set Signing Config to above (created) one
  4. Change the active build variant to release
    1. On the bottom left side open (the collapsed) "Build Variants" view
    2. Change "Active Build Variant" to release

Run the app on your device/emulator as ususal.

@litetex litetex marked this pull request as draft December 29, 2021 21:42
@litetex
Copy link
Member Author

litetex commented Dec 30, 2021

Note: Set the PR status to draft because when you e.g. rotate the screen the UI crashes due to Androids super cool activity lifecycle.

@litetex litetex marked this pull request as ready for review December 31, 2021 13:51
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

I reviewed ~1/3 of the files, will continue later

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Great PR! The code you took, though not perfect, is easily readable and makes sense. I still haven't tested, will do later I tested, and it seems to work well :-D

@litetex litetex force-pushed the add-preference-search branch from 27bed01 to 6405a06 Compare January 23, 2022 14:44
Forgot to commit them before...
* Removed unused method
* Only index all settings once -> Saves performance
* Fixed some SonarLint reported problems
* Consolidated main-setttings into a single file
* Debug settings are only enabled in the DEBUG build
* Moved LeakCanary (debug) specific stuff into a small class that's only shipped with the debug build
* Other minor fixes
@litetex litetex force-pushed the add-preference-search branch from cef71f8 to 82de35d Compare January 24, 2022 20:08
Stypox
Stypox previously approved these changes Jan 25, 2022
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Thank you, code looks good :-)
I tested on API 19 emulated, API 31 emulated and API 29 device and everything worked as expected. The highlighting on API 19 correctly shows the play button next to the setting to highlight, debug & updates settings are correctly removed, every setting category shows up.

Co-authored-by: Stypox <stypox@pm.me>
@litetex
Copy link
Member Author

litetex commented Jan 25, 2022

@Stypox
Oh no the commit that removes the commented out code removed your approval :(

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.2% 0.2% Duplication

opusforlife2
opusforlife2 previously approved these changes Jan 25, 2022
Copy link
Collaborator

@opusforlife2 opusforlife2 left a comment

Choose a reason for hiding this comment

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

Oh no the commit that removes the commented out code removed your approval :(

@litetex No worries. Here you go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants