Opened 22 months ago

Closed 6 months ago

#3241 closed change (fixed)

Make filter list URL configurable in devbuilds

Reported by: mario Assignee: jand
Priority: P2 Milestone: Adblock-Plus-for-iOS-next
Module: Adblock-Plus-for-iOS Keywords: salsita 2015q4
Cc: lisabielik, mario, salsita, sebastian, philll Blocked By:
Blocking: #4321 Platform: iOS
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://github.com/adblockplus/adblockplussafariios/pull/30
https://github.com/adblockplus/adblockplussafariios/pull/34

Description (last modified by mario)

Background

This Issue is based on #3093, which enables the app to automatically/manually update the filter lists.

In order to perform proper QA for filter list updates we need to be able to manually configure the filter list update URL (i.e. the URL where ABP fetches the filter list from). This is the only reliable way to be able to test various filter list locations and thus test various filter list updates before they are published.

What to change

  • In the app's settings, right above "Update Filter Lists", add a new menu item called "Configure Filter Lists" as shown in this screenshot.
    • Text of the button: "Configure Filter Lists"
  • After clicking the "Configure Filter Lists" button, the options should appear as shown in this screenshot. This page should include:
    • The headline "Configure Filter Lists" (the plural 's' is missing in the screenshots)
    • A back button with the label "Done"
    • An options with the label "Default Filter List" and an on/off switch
    • The date, when this filter list was updated
    • A headline "Other Filter Lists"
    • Another option called "Custom Filter List" with an on/off switch
    • An input field where you can edit the URL of the custom filter list. This field is grayed out as long the "Custom Filter List" option is not turned on. As default the URL of the custom filter list should already appear, which is: "https://easylist-downloads.adblockplus.org/easylist_content_blocker.json". The validation begins after pressing "return" on the keyboard. The "Last filter list update..." message should disappear after changing the URL
    • The date, when this filter list was updated + status messages, which show if the URL is invalid or valid. If the URL is invalid, a red text appears with the wording "Invalid URL". If the URL is valid a green text appears with the wording "Valid URL, downloading...". After the download the text changes again and shows, when the filter list was last updated.
    • An "Update Filter Lists" button which, after tapping, updates the filter list (same functionality as the "Update Filter Lists" button on the options overview)

URL validation:

  • Validation 1: Validate the URL for completeness
  • Validation 2: Test the URL for an existing resource (i.e. HTTP status code 200)

Logic:

  • If "Default Filter List" is checked (as shown in this screenshot), ABP will from this point on always use the default filter list URL to fetch its filter list from. ABP will use the default URL for automatic filter list updates in the background and for manual filter list updates as soon as the user taps one of the two "Update Filter Lists" buttons.
  • If "Custom Filter List" is checked (as shown in this screenshot) and the entered URL was validated (as shown in this screenshot), ABP will from this point on always use the custom filter list URL to fetch its filter list from. ABP will use the the custom URL for automatic filter list updates in the background and for manual filter list updates as soon as the user taps one of the two "Update Filter Lists" buttons.
  • If "Custom Filter List" is checked but the entered URL could not be validated (as shown in this screenshot), ABP will use the default filter list URL to fetch its filter list from.

Screenshots:

Enable this feature for devbuilds only (i.e. the "Configure Filter Lists"-button and the new settings page are shown only in devbuilds).

Change History (29)

comment:1 Changed 22 months ago by mario

  • Description modified (diff)

comment:2 Changed 22 months ago by mario

  • Keywords 2015q4 added

comment:3 Changed 22 months ago by sven

  • Description modified (diff)

comment:4 Changed 22 months ago by sven

  • Cc mario salsita added
  • Description modified (diff)

comment:5 Changed 22 months ago by sven

  • Description modified (diff)

comment:6 Changed 22 months ago by mario

  • Priority changed from Unknown to P2

Changed 2015q4-issues to P2

comment:7 Changed 21 months ago by mario

  • Description modified (diff)

comment:8 Changed 20 months ago by mario

  • Ready set

comment:9 Changed 18 months ago by jand

  • Owner set to jand

comment:10 Changed 18 months ago by jand

@mario:
I do not understand this story much. What is the difference between Default Filter List and Custom Filter List switches?

Also, why there is need for two Update Filter Lists buttons, one in this controller and second one in the controller below? Should those two buttons do the same?

comment:11 Changed 18 months ago by mario

  • Description modified (diff)

@jand, I've updated the description and addressed your questions.

comment:12 Changed 17 months ago by jand

@mario:
I still have questions to this issue:

Regarding "Update Filter List" (no plural) button. Should it update active filter list or just custom filter? Because there is "Update Filter Lists" button in menu bellow, which updates active filter lists.

comment:13 Changed 17 months ago by mario

  • Description modified (diff)

@jand, I actually introduced a naming error. I've corrected that error which may solve the misunderstanding: It should be named "Update Filter Lists" instead of "Update Filter List". I was under the impression the original button was singular.

Regarding your question:
Both buttons, "Update Filter Lists" at the settings overview and the "Update Filter Lists" at the newly introduced custom filter list settings behave exactly the same:

  • If "Default Filter List" is checked: "Update Filter Lists" will download and update the default filter list from the predefined URL.
  • If "Custom Filter List" is checked: "Update Filter Lists" will download and update the custom filter list from the individual URL which is provided by the user below "Custom Filter List".

I've modified the description to make this more clear.

comment:14 Changed 17 months ago by mario

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:15 Changed 12 months ago by sebastian

  • Cc sebastian philll added

Any reason to have that feature only in the devbuilds? Since list updates are independent of updates to the app, I suppose it might make sense to be able to test new lists with the current release version as well. Also, this would make testing the list easier since you can simply install the app from the app store. Moreover, any diverge between development and release builds bear the risk of bugs that can only be reproduced in either environment, which is generally a bad thing. If you are bothered to confuse regular users with that feature, I guess there are other ways to hide that feature (e.g. like the developer options on Android).

comment:16 Changed 12 months ago by sebastian

  • Blocking 4321 added

comment:17 Changed 11 months ago by philll

I agree with Sebastian that there's no need to limit this to the dev builds at all, we can instead have it as a feature, alike how we allow filter list subscriptions with custom URLs on ABP for Chrome or Firefox.

comment:18 Changed 10 months ago by abpbot

A commit referencing this issue has landed:
Issue 3241 - Make filter list URL configurable in devbuilds

comment:19 Changed 9 months ago by pavelz

Additional pull request
https://github.com/adblockplus/adblockplussafariios/pull/34
Configurable filterlist UI was appearing only in debug builds, not in release devbuild.

This may not be merged at all, if the feature is decided to be available across all build types.
But until that decision is made, it should behave as specified and this pull request fixes it.

comment:20 Changed 9 months ago by mario

  • Review URL(s) modified (diff)

Added second PR to review URLs

comment:21 Changed 9 months ago by mario

--comment removed, covered by #4661--

Last edited 9 months ago by mario (previous) (diff)

comment:23 Changed 6 months ago by fhd

  • Milestone set to Adblock-Plus-for-iOS-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

Seems like this is done then.

Note: See TracTickets for help on using tickets.