Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#2376 closed change (fixed)

Implement custom filters in new options page

Reported by: greiner Assignee: saroyanm
Priority: P2 Milestone:
Module: User-Interface Keywords:
Cc: saroyanm Blocked By: #1524
Blocking: #1688, #2372, #2708 Platform: Unknown
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29321198/
https://codereview.adblockplus.org/29322488/

Description (last modified by greiner)

Background

We want to have the same custom filter management capabilities that we have in the current version of the options page also in the new one. For that we need to add this feature to the "Blocking lists" section under the "Edit or create own blocking list" tab.

What to change

  • Implement list view of custom filters (as seen in the design mockup)
    • Ensure that filters are always sorted alphabetically
  • Implement edit view of custom filters
    • Show <textarea> element instead of the list view and the area for adding custom filters
    • <textarea> element should behave the same as textarea#rawFiltersText does in the current version of the options page
  • Clicking on the "add" button or pressing the Enter key on the text input field should add the entered filter
  • Clicking on the "edit rules" link should toggle between "list view" and "edit view" and save the filters in "edit view" when clicked on "save filters" button, same time switch to "list view"
  • The filters in the list should be kept up-to-date using filters.listen
  • Make both list view and edit view horizontally scrollable if filter length exceeds the container element's width
  • Include any kind of filter validation that occurs in the current version of the options page

Attachments (4)

cancel_10.png (20.0 KB) - added by sven 4 years ago.
save.png (18.2 KB) - added by sven 4 years ago.
options_page_105-2.jpg (264.2 KB) - added by sven 4 years ago.
options_page_105-2-styleguide.jpg (270.2 KB) - added by sven 4 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 5 years ago by greiner

  • Blocked By 1524 added

comment:2 follow-up: Changed 4 years ago by saroyanm

I wonder whether the lazy loading implementation is going to be separate, I can't find related ticket, in case it's not yet created I'll create one.

comment:3 Changed 4 years ago by saroyanm

  • Cc saroyanm added
  • Owner set to saroyanm

comment:4 Changed 4 years ago by saroyanm

  • Blocking 1688 added

comment:5 in reply to: ↑ 2 ; follow-up: Changed 4 years ago by greiner

Replying to saroyanm:

I wonder whether the lazy loading implementation is going to be separate, I can't find related ticket, in case it's not yet created I'll create one.

Yes, that one can be tackled separately. There's no ticket for it yet so feel free to create it.

comment:6 Changed 4 years ago by saroyanm

  • Blocking 2708 added

comment:7 in reply to: ↑ 5 ; follow-up: Changed 4 years ago by saroyanm

Replying to greiner:

Replying to saroyanm:

I wonder whether the lazy loading implementation is going to be separate, I can't find related ticket, in case it's not yet created I'll create one.

Yes, that one can be tackled separately. There's no ticket for it yet so feel free to create it.

Here you go - #2708.

Here is another question. What should trigger saving the data back to custom filters after job in edit view done by user ?
Should it be triggered after click on "list view" button ? Bit confusing, I can suggest to do it so and figure out better solution afterward.

comment:8 in reply to: ↑ 7 Changed 4 years ago by greiner

  • Description modified (diff)

Replying to saroyanm:

Here is another question. What should trigger saving the data back to custom filters after job in edit view done by user ?
Should it be triggered after click on "list view" button ? Bit confusing, I can suggest to do it so and figure out better solution afterward.

Currently, only the "Apply changes" button saves the data while the list view toggle button doesn't make any changes and acts as a way to cancel editing.

But because we don't have an "Apply changes" button I tend to agree with you, that a click on the toggle button should save the data. I modified the ticket description accordingly.

comment:9 Changed 4 years ago by saroyanm

  • Description modified (diff)

Updated description.
While we decided to have 2 buttons, one for switching to "list view" another for "saving" and switching to "list view".

comment:10 Changed 4 years ago by saroyanm

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

comment:11 Changed 4 years ago by saroyanm

  • Resolution set to fixed
  • Status changed from reviewing to closed
  • Tester set to Unknown

comment:13 Changed 4 years ago by saroyanm

  • Review URL(s) modified (diff)

Added Review for error noticed after the changes were pushed.
Changeset for review mentioned Above:
https://hg.adblockplus.org/adblockplusui/rev/482971cb0b03

Changed 4 years ago by sven

Changed 4 years ago by sven

Changed 4 years ago by sven

comment:14 Changed 4 years ago by sven

  • Description modified (diff)

Changed 4 years ago by sven

comment:15 Changed 4 years ago by sven

  • Description modified (diff)

comment:16 Changed 4 years ago by greiner

  • Description modified (diff)

This ticket is already closed and the changes have already landed. Therefore those change requests cannot be considered anymore as part of this ticket. I added a note to #2377 so that we can tackle them as part of that ticket instead.

Note: See TracTickets for help on using tickets.