Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Replacing last tab closed with a new tab (Rather than closing browser window) #13577

Closed
wants to merge 1 commit into from

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Mar 23, 2018

Fixes #5873

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

(Should be tested with multiple windows open to ensure containment)

  1. Open a few tabs (Test with some pinned)
  2. Close all but one
  3. Upon closing the last tab, ensure that it is 'replaced' with about:newtab rather than closing the browser window
  4. If multiple windows are open, ensure this only happens in the intended window and there are no misfires.

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

There seemed to be some ambivalence on the issue as to whether we should have a toggle for this behavior or enforce it as a standard. I'll be happy to add in this preference to preferences#tabs if we feel it should be there.

@bradleyrichter @srirambv let me know your thoughts, thanks!

@codecov-io
Copy link

codecov-io commented Mar 23, 2018

Codecov Report

Merging #13577 into master will increase coverage by 0.05%.
The diff coverage is 90.9%.

@@            Coverage Diff             @@
##           master   #13577      +/-   ##
==========================================
+ Coverage   56.71%   56.77%   +0.05%     
==========================================
  Files         285      285              
  Lines       28797    28784      -13     
  Branches     4755     4756       +1     
==========================================
+ Hits        16332    16341       +9     
+ Misses      12465    12443      -22
Flag Coverage Δ
#unittest 56.77% <90.9%> (+0.05%) ⬆️
Impacted Files Coverage Δ
app/browser/reducers/tabsReducer.js 41.47% <90.9%> (+1.47%) ⬆️
js/stores/windowStore.js 28.75% <0%> (+0.29%) ⬆️
app/renderer/components/reduxComponent.js 61.2% <0%> (+3.44%) ⬆️
js/stores/appStoreRenderer.js 100% <0%> (+8.33%) ⬆️

@NejcZdovc NejcZdovc added this to the Completed work milestone May 7, 2018
@petemill
Copy link
Member

petemill commented May 8, 2018

I believe this is something requested by @bradleyrichter cc @davidtemkin so maybe should be discussed and prioritized to an upcoming milestone.

@bsclifton
Copy link
Member

Closing as the issue this fixes has been closed

@bsclifton bsclifton closed this Sep 10, 2018
@bsclifton bsclifton removed this from the Completed work milestone Sep 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants