-
Notifications
You must be signed in to change notification settings - Fork 7.6k
"Restart in Safe Mode" #5078
Comments
I like the idea, but could we pick a different name for this feature? Restarting in "Safe Mode" implies something completely different to a Windows user (ie. rebooting Windows into a new session with limited device drivers, startup services, etc), and this menu item might lead to confusion when a user first it. |
Sure, we could be more specific ("Restart Without Extensions") -- I thought "Safe Mode" was a reasonable analogy, but it's probably not exactly the same since we would reopen the same project, keep all their prefs, etc. |
"Restart Without Extensions" makes a lot of sense. Thanks! |
What do Chrome and/or Firefox call their equivalent modes (no plugins, no extensions)? Following their naming lead might make sense to web developers... |
Firefox calls it Safe Mode. Chrome doesn't have this mode but the "tips and tricks" pages that simulate the action allude to Firefox's Safe Mode moniker as well. Either sounds fine to me but I think "Restart Without Extensions" is more precise. |
@njx, I'm going to take a shot at this one. I have been wanting this functionality for quite a while. |
My concern is how does Brackets indicate that it is running in this "mode"? A user could leave brackets open for long enough to forget that they're in this mode. Can an Extension be installed, updated, or removed in this mode? Seems like this should be disallowed, and Extension Manager should indicate this somehow. Are any other features affected? Does shutdown/restart get Brackets out of this mode? If not, then how? |
@redmunds, how about disabling the Extension Manager menu item and pulling the icon from the toolbar? If the user can't get to Extension Manager, all of those scenarios should be addressed and that would give two UI indications as well. Yes, I would expect shutdown/restart to be the only way to get out of the mode. |
Minor point, but since I am reusing the Reload Brackets functionality to create this new functionality, should we call it Reload Without Extensions? The main window never actually closes and restarts. |
That's a good start. But have you ever stared at a disabled menu item and have no idea why it's disabled? Yeah, me too.
Sounds good. Might even want to say "Reload Without User Extensions" since default extensions should still be loaded. |
I can remove the menu item instead of disabling it. The thing is, though, the common scenario for using this tool has a pretty short lifespan. I typically discover a bug, move all of my extensions to the disabled folder, try to reproduce the bug, post the bug report, then move all of my extensions right back again. I spend very little time in Brackets without my extensions if I can help it. Actually, my bigger current problem is the menu items that are added by the extensions are sticking around on the reload. I'm going to look into how to revert back to a default menu setting tomorrow. |
That doesn't solve the issue for me -- instead I'd be staring at the menu wondering where my favorite command went :) Disabling it is OK. |
Issue #5210 makes extension menu clean up more difficult. It needs to be addressed before this functionality can be finished. |
Assigning to myself since I am working on a fix. |
@lkcampbell Actually there's an even bigger issue here: extensions themselves may add menu items, and restarting via a reload will leave them there. To fix that properly I think we really need to implement https://trello.com/c/7eOfSdya/950-reload-brackets-safely-without-breaking-menu-bar. As a side effect, that should also mean we wouldn't need to use |
CC @gruehle & @JeffryBooher because of the native menu bar question/issue. (Actually -- does the dark shell fix the above user story already?) |
@peterflynn, I'm not using removeMenu() to remove the Extension Manager menu item, I'm using it to remove the entire menu bar. That's why I need the getAllMenus() method as well, to iterate through all menus and remove them all. The Extension Manager menu item I just decided to disable. Easier than removing it. My solution is to remove the entire menu bar just before reloading the Brackets window in "Without User Extensions" mode, essentially a clean slate menu bar. Then, on reload, the default menu code and the default extension code repopulates the menu bar again, effectively filtering out all user extension menu changes. |
@peterflynn I don't think the dark shell changes will fix the menu bar story and, if it does happen to fix part of the menu story, it would only be fixed on Windows. |
@njx, final pull request to add this feature is submitted. |
Update: after discussing the latest PR with @njx, there are still some other issues that need to be addressed before this feature can be added to Brackets.
When these three issues are addressed, I will submit a new, clean PR for this feature. |
Update:
When these three issues are addressed, I will submit a new, clean PR for this feature. |
FBNC back to @njx |
Very cool - seems to work as expected. Thanks for sticking with this @lkcampbell! Closing. |
I was thinking that it might be easy to add a menu item, "Debug > Restart in Safe Mode", that would reload Brackets with a URL parameter that tells Brackets not to load any non-default extensions. Might be useful for people who are having issues with Brackets to quickly determine whether it's really a Brackets issue or an extension issue, and it's easier than having them temporarily delete or move aside individual extensions. (Of course, once they've figured out that it is an extension issue, they'd still have to narrow it down, but it would be a quick way to know that the priority isn't as high for us to track it down.)
The text was updated successfully, but these errors were encountered: