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

Filters settings rework #1806

Closed
ameshkov opened this issue Mar 29, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@ameshkov
Copy link
Member

@ameshkov ameshkov commented Mar 29, 2018

First of all, we should no more use the local database to store filters metadata.

Instead of that, use the filters metadata in a JSON format.

Get it from here when building AdGuard:
https://filters.adtidy.org/android/filters.json

And get the localization from here:
https://filters.adtidy.org/android/filters_i18n.json

Note the tags we have there.

These tags have multiple purposes:

  1. purpose: tags define the filters purposes. We will use it to divide filters into different groups.
  2. lang: tags mark the language-specific filters.
  3. recommended tag marks filters that will be enabled by default when the user enables a filter group for the first time.

Filters settings screen

The first screen shows a list of groups:
https://uploads.adguard.com/up04_o1fxy_05-filters.psd.png

Every filter group can be enabled or disabled.
It has nothing to do with the individual filters status.

Groups we have:

  1. Ads (filters with purpose:ads)
  2. Privacy (filters with purpose:privacy)
  3. Social Widgets (filters with purpose:social)
  4. Security (filters with purpose:security)
  5. Annoyances (filters with purpose:annoyances)
  6. Language-specific (filters with any lang: tag)
  7. Other (filters that do not fall into any of the categories above)
  8. Custom (subscriptions added by the user)

Filters group

Mockup: https://uploads.adguard.com/up04_cm3go_05-filters-template.psd.png

On the group screen, filters are not divided into groups (unlike the mockup), and sorted by: "enabled filters, displayNumber".

One more difference: we need to display tags as material "chips" under every filter. Tap on a chip shows its name & description (check the filters_i18n.json).

What happens when you enable or disable a filter group

  1. First of all, it does not change the filters statuses. What changes is the group status and that's all.
  2. By default, only recommended filters are enabled.
  3. When you open the group screen of a disabled group, status "switches" should be in a disabled state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.