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

Issue 29595588: Issue 5952 - Clicking Cancel in the issue reporter doesn't close the tab (Closed)

Created:
Nov. 2, 2017, 11:39 a.m. by Wladimir Palant
Modified:
Nov. 2, 2017, 6:47 p.m.
Reviewers:
Thomas Greiner
CC:
kzar
Base URL:
https://hg.adblockplus.org/adblockplusui/
Visibility:
Public.

Description

Issue 5952 - Clicking Cancel in the issue reporter doesn't close the tab

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -3 lines) Patch
M issue-reporter.js View 4 chunks +11 lines, -3 lines 3 comments Download
M messageResponder.js View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4
Wladimir Palant
Nov. 2, 2017, 11:39 a.m. (2017-11-02 11:39:50 UTC) #1
Thomas Greiner
https://codereview.adblockplus.org/29595588/diff/29595589/issue-reporter.js File issue-reporter.js (right): https://codereview.adblockplus.org/29595588/diff/29595589/issue-reporter.js#newcode71 issue-reporter.js:71: }).then(tabId => browser.tabs.remove(tabId)); Wouldn't it make more sense to ...
Nov. 2, 2017, 12:39 p.m. (2017-11-02 12:39:51 UTC) #2
Wladimir Palant
https://codereview.adblockplus.org/29595588/diff/29595589/issue-reporter.js File issue-reporter.js (right): https://codereview.adblockplus.org/29595588/diff/29595589/issue-reporter.js#newcode71 issue-reporter.js:71: }).then(tabId => browser.tabs.remove(tabId)); On 2017/11/02 12:39:51, Thomas Greiner wrote: ...
Nov. 2, 2017, 1:16 p.m. (2017-11-02 13:16:51 UTC) #3
Thomas Greiner
Nov. 2, 2017, 2:13 p.m. (2017-11-02 14:13:02 UTC) #4
I'm fine with either approach so LGTM for this one.

https://codereview.adblockplus.org/29595588/diff/29595589/issue-reporter.js
File issue-reporter.js (right):

https://codereview.adblockplus.org/29595588/diff/29595589/issue-reporter.js#n...
issue-reporter.js:71: }).then(tabId => browser.tabs.remove(tabId));
On 2017/11/02 13:16:51, Wladimir Palant wrote:
> On 2017/11/02 12:39:51, Thomas Greiner wrote:
> > Wouldn't it make more sense to leave it up to the background page to close
the
> > tab (e.g. "app.close") if we're already communicating with it anyway? That
way
> > we wouldn't need to deal with implementation details in the UI.
> 
> That's the approach I chose initially but so far we don't have any browser API
> calls in messageResponder. It seems that leaving implementation details out of
> messageResponder is intentional (makes testing easier).

Not sure either whether this choice was made intentionally. Anyway, no
objections with this approach for now.

Powered by Google App Engine
This is Rietveld