Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29712599: Issue 6420 - Fixed poping up whitelisted website notification for several custom filter lists (Closed)

Created:
March 1, 2018, 12:13 p.m. by saroyanm
Modified:
March 6, 2018, 6:07 p.m.
Reviewers:
Thomas Greiner
Visibility:
Public.

Description

Issue 6420 - Fixed popping up whitelisted website notification for several custom filter lists

Patch Set 1 #

Total comments: 9

Patch Set 2 : Addressed Thomas's comment #

Patch Set 3 : Updated as discussed with Thomas #

Total comments: 9

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -21 lines) Patch
M ext/content.js View 1 2 3 1 chunk +17 lines, -9 lines 2 comments Download
M js/desktop-options.js View 1 2 3 3 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 15
saroyanm
Thomas can you please have a look
March 1, 2018, 12:15 p.m. (2018-03-01 12:15:59 UTC) #1
Thomas Greiner
https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; Why not instead just move `isCustomFiltersLoaded ...
March 2, 2018, 11:43 a.m. (2018-03-02 11:43:57 UTC) #2
saroyanm
https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; On 2018/03/02 11:43:57, Thomas Greiner wrote: ...
March 2, 2018, 3:59 p.m. (2018-03-02 15:59:14 UTC) #3
Thomas Greiner
Also note the typo in the commit message for which I'd suggest replacing "poping" with ...
March 2, 2018, 4:40 p.m. (2018-03-02 16:40:44 UTC) #4
saroyanm
https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; On 2018/03/02 16:40:43, Thomas Greiner wrote: ...
March 2, 2018, 4:43 p.m. (2018-03-02 16:43:46 UTC) #5
Thomas Greiner
https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; On 2018/03/02 16:43:46, saroyanm wrote: > ...
March 2, 2018, 5:09 p.m. (2018-03-02 17:09:05 UTC) #6
saroyanm
https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; On 2018/03/02 17:09:04, Thomas Greiner wrote: ...
March 2, 2018, 5:16 p.m. (2018-03-02 17:16:51 UTC) #7
Thomas Greiner
https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; On 2018/03/02 17:16:51, saroyanm wrote: > ...
March 2, 2018, 5:24 p.m. (2018-03-02 17:24:16 UTC) #8
saroyanm
Notes, from the discussion with Thomas https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; ...
March 5, 2018, 12:14 p.m. (2018-03-05 12:14:52 UTC) #9
saroyanm
Ready for the review. https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29712600/js/desktop-options.js#newcode1161 js/desktop-options.js:1161: isCustomFiltersLoaded = false; On 2018/03/05 ...
March 5, 2018, 2:52 p.m. (2018-03-05 14:52:27 UTC) #10
Thomas Greiner
https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options.js#newcode1150 js/desktop-options.js:1150: getSubscriptionFilters(subscription)); Detail: This arrow function is redundant because you ...
March 5, 2018, 4:43 p.m. (2018-03-05 16:43:33 UTC) #11
saroyanm
https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options.js#newcode1150 js/desktop-options.js:1150: getSubscriptionFilters(subscription)); On 2018/03/05 16:43:33, Thomas Greiner wrote: > Detail: ...
March 5, 2018, 4:51 p.m. (2018-03-05 16:51:13 UTC) #12
saroyanm
https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options.js File js/desktop-options.js (right): https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options.js#newcode1337 js/desktop-options.js:1337: browser.runtime.sendMessage({ On 2018/03/05 16:51:13, saroyanm wrote: > On 2018/03/05 ...
March 5, 2018, 5:18 p.m. (2018-03-05 17:18:39 UTC) #13
saroyanm
Thanks Thomas Ready for review https://codereview.adblockplus.org/29712599/diff/29714617/ext/content.js File ext/content.js (right): https://codereview.adblockplus.org/29712599/diff/29714617/ext/content.js#newcode77 ext/content.js:77: let resolvePromise = null; ...
March 5, 2018, 8:28 p.m. (2018-03-05 20:28:33 UTC) #14
Thomas Greiner
March 6, 2018, 1:08 p.m. (2018-03-06 13:08:48 UTC) #15
LGTM

https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options.js
File js/desktop-options.js (right):

https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options....
js/desktop-options.js:1154: loadCustomFilters([].concat(...filters));
On 2018/03/05 16:51:13, saroyanm wrote:
> It's for flattening the array.
> 
> Promise.all returns a matrix in this case, because getSubscriptionFilters
> promises an array.

Sorry, I missed that. Maybe because I'm used to writing this as
`Array.prototype.concat.apply([], filters)`. Your approach is actually cleaner
so looks good.

https://codereview.adblockplus.org/29712599/diff/29714581/js/desktop-options....
js/desktop-options.js:1337: browser.runtime.sendMessage({
On 2018/03/05 17:18:39, saroyanm wrote:
> Hmm, Apparently the polyfill doesn't return Promise ->
> https://hg.adblockplus.org/adblockplusui/file/tip/ext/content.js#l67

It's not actually a polyfill and more of a mock so I don't know why we label it
as such in ext/content.js. But yes, we need to update that.

https://codereview.adblockplus.org/29712599/diff/29714617/ext/content.js
File ext/content.js (right):

https://codereview.adblockplus.org/29712599/diff/29714617/ext/content.js#newc...
ext/content.js:77: let resolvePromise = null;
On 2018/03/05 20:28:33, saroyanm wrote:
> I noticed that it took me longer than needed to implement the Error handling
in
> current Mock, if you would like me to do that in current review please let me
> know, but otherwise this should work for now.

We're not handling errors yet so we don't need to worry about adding that
capability to the mock at this point either.

Powered by Google App Engine
This is Rietveld