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

Issue 29339314: Issue 3870 - Rewrite legacy options page to use async messages (Closed)

Created:
April 3, 2016, 10:51 a.m. by kzar
Modified:
April 7, 2016, 2:04 p.m.
Reviewers:
Sebastian Noack
Visibility:
Public.

Description

Issue 3870 - Rewrite legacy options page to use async messages

Patch Set 1 #

Total comments: 19

Patch Set 2 : Addressed initial feedback #

Patch Set 3 : Fix Downloading... indicators #

Total comments: 13

Patch Set 4 : Removed redundant spaces and imports, fixed some typos #

Patch Set 5 : Handle subscription events properly ("Downloading...") #

Total comments: 2

Patch Set 6 : Make use of the subscription.isDownloading property #

Total comments: 4

Patch Set 7 : Update for adblockplusui changes and work around around a race condition with Downloading... label #

Total comments: 2

Patch Set 8 : Fetch acceptable ads URL once initially and re-use #

Total comments: 2

Patch Set 9 : Avoid another race condition #

Unified diffs Side-by-side diffs Delta from patch set Stats (+326 lines, -816 lines) Patch
M background.js View 1 2 3 1 chunk +1 line, -34 lines 0 comments Download
M dependencies View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M lib/notificationHelper.js View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M options.js View 1 2 3 4 5 6 7 8 18 chunks +320 lines, -299 lines 0 comments Download
M safari/ext/background.js View 2 chunks +0 lines, -229 lines 0 comments Download
M safari/ext/content.js View 3 chunks +0 lines, -250 lines 0 comments Download

Messages

Total messages: 22
kzar
Patch Set 1 https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339315/options.js#newcode57 options.js:57: ext.backgroundPage.sendMessage(message, callback); (I considered having this ...
April 3, 2016, 10:55 a.m. (2016-04-03 10:55:06 UTC) #1
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js (left): https://codereview.adblockplus.org/29339314/diff/29339315/options.js#oldcode15 options.js:15: * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. ...
April 3, 2016, 3:05 p.m. (2016-04-03 15:05:15 UTC) #2
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339315/options.js#newcode669 options.js:669: isSubscriptionDownloading(subscriptions[i].url, function (isDownloading) Nit: Redundant space after function statement.
April 3, 2016, 3:11 p.m. (2016-04-03 15:11:41 UTC) #3
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339315/options.js#newcode672 options.js:672: label.textContent = inProgressMessage; This will always be the label ...
April 3, 2016, 3:27 p.m. (2016-04-03 15:27:40 UTC) #4
kzar
Patch Set 2 : Addressed initial feedback https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js (left): https://codereview.adblockplus.org/29339314/diff/29339315/options.js#oldcode15 options.js:15: * along ...
April 3, 2016, 3:50 p.m. (2016-04-03 15:50:19 UTC) #5
kzar
Patch Set 3 : Fix Downloading... indicators https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339315/options.js#newcode672 options.js:672: label.textContent = ...
April 3, 2016, 4:11 p.m. (2016-04-03 16:11:34 UTC) #6
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339315/options.js#newcode61 options.js:61: var getDocLink = wrapper({type: "app.get", what: "doclink"}, "link"); On ...
April 3, 2016, 5:18 p.m. (2016-04-03 17:18:04 UTC) #7
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339334/background.js File background.js (left): https://codereview.adblockplus.org/29339314/diff/29339334/background.js#oldcode39 background.js:39: for (var i = 0; i < FilterStorage.subscriptions.length; i++) ...
April 3, 2016, 6:20 p.m. (2016-04-03 18:20:00 UTC) #8
kzar
Patch Set 4 : Removed redundant spaces and imports, fixed some typos https://codereview.adblockplus.org/29339314/diff/29339315/options.js File options.js ...
April 5, 2016, 11:10 a.m. (2016-04-05 11:10:16 UTC) #9
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339334/options.js File options.js (left): https://codereview.adblockplus.org/29339314/diff/29339334/options.js#oldcode664 options.js:664: function updateFilterLists() On 2016/04/05 11:10:15, kzar wrote: > On ...
April 5, 2016, 12:26 p.m. (2016-04-05 12:26:15 UTC) #10
kzar
https://codereview.adblockplus.org/29339314/diff/29339334/options.js File options.js (left): https://codereview.adblockplus.org/29339314/diff/29339334/options.js#oldcode664 options.js:664: function updateFilterLists() On 2016/04/05 12:26:15, Sebastian Noack wrote: > ...
April 5, 2016, 12:36 p.m. (2016-04-05 12:36:53 UTC) #11
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339334/options.js File options.js (left): https://codereview.adblockplus.org/29339314/diff/29339334/options.js#oldcode664 options.js:664: function updateFilterLists() On 2016/04/05 12:36:53, kzar wrote: > On ...
April 5, 2016, 12:44 p.m. (2016-04-05 12:44:03 UTC) #12
kzar
Handle subscription events properly ("Downloading...")
April 6, 2016, 7:33 a.m. (2016-04-06 07:33:21 UTC) #13
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339400/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339400/options.js#newcode467 options.js:467: downloading = true; What if the subscription is already/still ...
April 6, 2016, 8:50 a.m. (2016-04-06 08:50:17 UTC) #14
kzar
Patch Set 6 : Make use of the subscription.isDownloading property https://codereview.adblockplus.org/29339314/diff/29339400/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339400/options.js#newcode467 ...
April 6, 2016, 9:33 a.m. (2016-04-06 09:33:21 UTC) #15
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339411/dependencies File dependencies (right): https://codereview.adblockplus.org/29339314/diff/29339411/dependencies#newcode6 dependencies:6: adblockplusui = adblockplusui hg:667a6e6f5388 git:a0fb5d6 I guess this needs ...
April 6, 2016, 11 p.m. (2016-04-06 23:00:19 UTC) #16
kzar
Patch Set 7 : Update for adblockplusui changes and work around around a race condition ...
April 7, 2016, 11:47 a.m. (2016-04-07 11:47:52 UTC) #17
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339555/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339555/options.js#newcode480 options.js:480: subscription.isDownloading = true; That is because you asynchronously retrieve ...
April 7, 2016, 12:49 p.m. (2016-04-07 12:49:14 UTC) #18
kzar
Patch Set 8 : Fetch acceptable ads URL once initially and re-use https://codereview.adblockplus.org/29339314/diff/29339555/options.js File options.js ...
April 7, 2016, 1:04 p.m. (2016-04-07 13:04:53 UTC) #19
Sebastian Noack
https://codereview.adblockplus.org/29339314/diff/29339562/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339562/options.js#newcode98 options.js:98: $("#acceptableAdsLink").attr("href", acceptableAdsUrl); We have a race here. Dependent on ...
April 7, 2016, 1:15 p.m. (2016-04-07 13:15:51 UTC) #20
kzar
Patch Set 9 : Avoid another race condition https://codereview.adblockplus.org/29339314/diff/29339562/options.js File options.js (right): https://codereview.adblockplus.org/29339314/diff/29339562/options.js#newcode98 options.js:98: $("#acceptableAdsLink").attr("href", ...
April 7, 2016, 1:28 p.m. (2016-04-07 13:28:16 UTC) #21
Sebastian Noack
April 7, 2016, 1:51 p.m. (2016-04-07 13:51:36 UTC) #22
LGTM

Powered by Google App Engine
This is Rietveld