Opened on 10/27/2015 at 04:12:55 PM

Closed on 02/15/2017 at 11:49:16 AM

#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/macOS 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).

Attachments (6)

Adblock Plus iOS settings 1 layer 20-1-1.png (121.9 KB) - added by sven on 11/11/2015 at 12:17:00 PM.
Adblock Plus iOS settings 2 layers step 3 20-1-1.png (157.3 KB) - added by sven on 11/11/2015 at 12:17:06 PM.
Adblock Plus iOS settings configure filter list 20-1-1.png (123.3 KB) - added by sven on 11/11/2015 at 12:17:12 PM.
Adblock Plus iOS settings custom filter active20-1-1.png (123.9 KB) - added by sven on 11/11/2015 at 12:17:17 PM.
Adblock Plus iOS settings downloading 20-1-1.png (121.6 KB) - added by sven on 11/11/2015 at 12:17:23 PM.
Adblock Plus iOS settings invalid url 20-1-1.png (120.0 KB) - added by sven on 11/11/2015 at 12:17:28 PM.

Download all attachments as: .zip

Change History (29)

comment:1 Changed on 10/27/2015 at 04:57:44 PM by mario

  • Description modified (diff)

comment:2 Changed on 11/09/2015 at 02:55:46 PM by mario

  • Keywords 2015q4 added

comment:3 Changed on 11/11/2015 at 12:11:23 PM by sven

  • Description modified (diff)

Changed on 11/11/2015 at 12:17:00 PM by sven

Changed on 11/11/2015 at 12:17:06 PM by sven

Changed on 11/11/2015 at 12:17:12 PM by sven

Changed on 11/11/2015 at 12:17:17 PM by sven

Changed on 11/11/2015 at 12:17:23 PM by sven

Changed on 11/11/2015 at 12:17:28 PM by sven

comment:4 Changed on 11/11/2015 at 12:21:53 PM by sven

  • Cc mario salsita added
  • Description modified (diff)

comment:5 Changed on 11/11/2015 at 12:24:28 PM by sven

  • Description modified (diff)

comment:6 Changed on 11/13/2015 at 10:47:22 AM by mario

  • Priority changed from Unknown to P2

Changed 2015q4-issues to P2

comment:7 Changed on 12/08/2015 at 09:11:03 AM by mario

  • Description modified (diff)

comment:8 Changed on 12/14/2015 at 02:45:31 PM by mario

  • Ready set

comment:9 Changed on 03/07/2016 at 05:30:19 PM by jand

  • Owner set to jand

comment:10 Changed on 03/08/2016 at 10:37:06 AM 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 on 03/10/2016 at 10:30:36 AM by mario

  • Description modified (diff)

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

comment:12 Changed on 03/14/2016 at 09:11:33 AM 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 on 03/14/2016 at 09:22:50 AM 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 on 03/16/2016 at 09:49:34 AM by mario

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

comment:15 Changed on 08/12/2016 at 03:39:54 PM 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 on 08/12/2016 at 03:51:10 PM by sebastian

  • Blocking 4321 added

comment:17 Changed on 09/30/2016 at 08:50:53 AM 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 on 10/28/2016 at 10:24:41 AM by abpbot

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

comment:19 Changed on 11/18/2016 at 01:57:32 PM 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 on 11/18/2016 at 01:59:03 PM by mario

  • Review URL(s) modified (diff)

Added second PR to review URLs

comment:21 Changed on 11/21/2016 at 09:45:05 AM by mario

--comment removed, covered by #4661--

Last edited on 11/30/2016 at 03:21:48 PM by mario

comment:22 Changed on 02/15/2017 at 11:28:14 AM by abpbot

comment:23 Changed on 02/15/2017 at 11:49:16 AM 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.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from jand.
 
Note: See TracTickets for help on using tickets.