Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu items & keyboard shortcuts to launch private windows with Tor #1387

Closed
2 tasks
tildelowengrimm opened this issue Oct 1, 2018 · 11 comments · Fixed by brave/brave-core#605
Closed
2 tasks

Comments

@tildelowengrimm
Copy link
Contributor

tildelowengrimm commented Oct 1, 2018

Two changes need to be made to the UI for launching private windows with Tor:

  • Instead of being launched from the People menu, Private Windows with Tor should be launched from a menu item named "New Private Window with Tor" in all the same places that the "New Private Window" menu item appears.
  • Additionally, the "New Private Window with Tor" should have the keyboard shortcut Ctrl + Alt + N / Cmd + Opt + N.

The Incognito window menu item exists in three places:

  1. the File menu
  2. the three-dots menu in the top right of the browser
  3. the three-dots / alternate click menu on items in the bookmarks manager
@bbondy
Copy link
Member

bbondy commented Oct 2, 2018

The menu item "New Incognito Window" should be renamed to "New Private Window", everywhere it appears.

Renaming for Incognito will be done here:
#738

@tildelowengrimm tildelowengrimm changed the title Private window menu/launch changes Menu items & keyboard shortcuts to launch private windows with Tor Oct 2, 2018
@bbondy bbondy added the QA/Yes label Oct 10, 2018
riastradh-brave added a commit to brave/brave-core that referenced this issue Oct 11, 2018
fix brave/brave-browser#1387

- Main hamburger menu in non-Tor windows:
  New private window with Tor

- Context menu for right-click on links:
  Open link in private window with Tor

This pushes IsTorProfile() into BrowserContext where it now resides
alongside IsOffTheRecord(), since we need it in order to determine
whether the 'Open link in private window with Tor' item should be
greyed out or not.  (Is this a little silly?  Maybe, but it's what the
browser already does with 'Open link in incognito window' item.)

Test plan:

1. 1. Open a fresh browser instance.
   2. Confirm that hamburger -> 'New private window with Tor' (NPWWT)
      opens a private window with Tor.
   3. In the _Tor_ window, open <https://check.torproject.org/>.
   4. Confirm that you are using Tor.
   5. Right-click any link on the page.
   6. Confirm that items to open in a private window, with or without
      Tor, are greyed out.
   7. Confirm that in the _normal_ window's hamburger, NPWWT switches
      to the private window with Tor it just opened.
   8. Confirm that in the _Tor_ window's hamburger, 'New window' opens
      a new private window with Tor.
   9. Confirm that in the _Tor_ window's hamburger, there is no NPWWT.

3. 1. Open a fresh browser instance.
   2. In a _normal_ window, open <https://www.example.com/>.
   3. Right-click the 'More information...' link.
   4. Select 'Open link in private window with Tor'.
   5. Confirm that the link opens in a Tor window.
   6. In the normal window, do it again.
   7. Confirm that the link opens in a new tab in the existing Tor
      window.

TODO: Rename IsTorProfile to make more sense for BrowserContext.
@riastradh-brave
Copy link
Contributor

PR ready for review now: brave/brave-core#605

Caveats:

  • 'New private window with Tor' does not always create a new one -- it switches to an existing one if there is one. In that window, 'New window' will open a new private window with Tor.
  • If you do 'Open link in private window with Tor' when there is no such window open, it will create two tabs, one of which is left at about:newtab.

Neither of these is critical, so I figured it's better to make progress on getting the baseline functionality merged before worrying about these details.

@darkdh
Copy link
Member

darkdh commented Oct 12, 2018

That is expected behavior, it should behave just like "Open Tor window" in avatar menu. If users need new tor window, use "New Window" in tor window. The main purpose of the item in regular profile is making users easier to access tor window

@riastradh-brave
Copy link
Contributor

PR actually addresses the whole issue including keyboard shortcut now: fb73c75eeafa87aa035e55ff84d97f02d7a1fc16

@riastradh-brave
Copy link
Contributor

The key sequence Ctrl-Alt-N is apparently problematic in Chromium on Windows, as is Ctrl-Alt-anythingelse. So, we need to find an alternative.

(I wonder what Emacs does on Windows, when every third keyboard command is control-meta-something?)

@tildelowengrimm
Copy link
Contributor Author

If the way to create a new private window with Tor from an existing one is the "New Window" menu option, then that menu option needs to be renamed to "New Private Window with Tor" with the same keyboard shortcut when within an existing private window with Tor. I understand that we made the technical decision to implement this as a separate user profile. But nobody using their browser needs to understand that. All they need is for it to feel the same as regular private windows.

@riastradh-brave
Copy link
Contributor

Correction: brave/brave-core#605 did not update the File menu on macOS.

@bbondy
Copy link
Member

bbondy commented Oct 16, 2018

@riastradh-brave could you leave this one closed and rename it and then post a new one with the remaining items? Typically if some part is fixed it's best to post a new issue for the remaining issues.

@riastradh-brave
Copy link
Contributor

Superseded by #1627.

@srirambv
Copy link
Contributor

srirambv commented Oct 17, 2018

Verification Passed on

Brave 0.55.16 Chromium: 70.0.3538.54 (Official Build) (64-bit)
Revision 4f8e578b6680574714e9ed3bb9f02922b4dde40d-refs/branch-heads/3538@{#937}
OS Linux
  • Verified ALT+SHIFT+N launched a new Tor window on Linux from a normal window/private window

Verification Passed on

Brave 0.55.16 Chromium: 70.0.3538.54 (Official Build) (64-bit)
Revision 4f8e578b6680574714e9ed3bb9f02922b4dde40d-refs/branch-heads/3538@{#937}
OS Windows
  • Verified ALT+SHIFT+N launched a new Tor window on Linux from a normal window/private window

Verified passed with

Brave 0.55.17 Chromium: 70.0.3538.67 (Official Build) (64-bit)
Revision 9ab0cfab84ded083718d3a4ff830726efd38869f-refs/branch-heads/3538@{#1002}
OS Mac OS X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment