-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Toggle panels and no-Distraction mode #11732
Conversation
…ore which cannot be satisfied in build tests.
Should it be hide panels or toggle panels? toggle seems to be troublesome at times. |
/** | ||
* hide all open panels | ||
*/ | ||
function _hidePanlesIfRequired() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo: Panles
-> `Panels"
I think that Made a few comments on the code, just some small typos. The strings use "No distractions" and "Code view only" as the names, should those be unified to one of them? |
CMD_TOGGLE_PURE_CODE = "view.togglePureCode", | ||
CMD_TOGGLE_PANELS = "view.togglePanels"; | ||
|
||
//key biding keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
binding
Thanks @petetnt for reviewing. |
…fter a hide panels command is issued.
@@ -61,12 +62,13 @@ define(function (require, exports, module) { | |||
// Load dependent modules | |||
var AppInit = require("utils/AppInit"), | |||
EventDispatcher = require("utils/EventDispatcher"), | |||
viewUtils = require("utils/ViewUtils"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ViewUtils, in ProperCase
@zaggino There seems to be a bug. If you hide the git panel, the blue active icon for the git extension still remains in the main-toolbar. So added events when panels are shown or hidden so that extensions can listen to panel close events. |
thanks for the info @abose |
Tested this out again against 51c0232 , love the No distractions mode. There's a small issue with toggle panels though (other than the shortcut not showing up/working)
That issue that affects |
Looks good to me. And agree, that the no distraction mode is a nice touch. Do we have an idea of how often people will want to jump into this? Main question is wether we can set an easier shortcut. I also like that it doesn't go full screen the way Sublime Text does, but any thought about whether we need that? |
@ryanstewart there was an issue about "true" fullscreen some while ago (#11594) and when checking out that one I saw that CEF got updated to support fullscreen quite recently so it could be implemented relatively easily (needs a |
@petetnt ahh, awesome. And I'm definitely not advocating for that, just wanted to throw it out there. Sounds like it's been covered though! |
|
@@ -0,0 +1,155 @@ | |||
/* | |||
* Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change copyright from 2013 to 2015
Couple of quick comments.
Overall it looks good 👍 It is good to merge, provided the review comments are addressed. |
@nethip thanks for reviewing. Made the changes. |
@abose No problem :) I took the liberty to add unit tests checkbox to your first comment. Also I created a waffle card for tracking the unit tests for this feature I am going ahead merging this. Thanks for this feature @abose ! |
Toggle panels and no-Distraction mode
Comment on pull request |
1 similar comment
Comment on pull request |
Full code view with all other panels/toolbars hidden.
Also minor refactoring of variable names for toggle/hide for sidebar.
shortcut : ctrl+shift+` for toggle panels
shortcut : ctrl+shift+2 for no distraction mode
Also added panel management API's to workspace manager.
@nethip