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

[CLOSED] "Restart in Safe Mode" #4678

Open
core-ai-bot opened this issue Aug 29, 2021 · 23 comments
Open

[CLOSED] "Restart in Safe Mode" #4678

core-ai-bot opened this issue Aug 29, 2021 · 23 comments

Comments

@core-ai-bot
Copy link
Member

Issue by njx
Thursday Sep 05, 2013 at 20:53 GMT
Originally opened as adobe/brackets#5078


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.)

@core-ai-bot
Copy link
Member Author

Comment by bchintx
Friday Sep 06, 2013 at 16:07 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by njx
Friday Sep 06, 2013 at 17:14 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by bchintx
Friday Sep 06, 2013 at 18:19 GMT


"Restart Without Extensions" makes a lot of sense. Thanks!

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Sep 06, 2013 at 21:10 GMT


What do Chrome and/or Firefox call their equivalent modes (no plugins, no extensions)? Following their naming lead might make sense to web developers...

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Wednesday Sep 11, 2013 at 19:03 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Wednesday Sep 11, 2013 at 19:07 GMT


@njx, I'm going to take a shot at this one. I have been wanting this functionality for quite a while.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Sep 11, 2013 at 19:13 GMT


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?

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Wednesday Sep 11, 2013 at 19:23 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Thursday Sep 12, 2013 at 21:55 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Friday Sep 13, 2013 at 00:04 GMT


how about disabling the Extension Manager menu item and pulling the icon from the toolbar?

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.

since I am reusing the Reload Brackets functionality to create this new functionality, should we call it Reload Without Extensions?

Sounds good. Might even want to say "Reload Without User Extensions" since default extensions should still be loaded.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Friday Sep 13, 2013 at 02:45 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Friday Sep 13, 2013 at 15:42 GMT


I can remove the menu item instead of disabling it.

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.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Friday Sep 13, 2013 at 20:34 GMT


Issue #5210 makes extension menu clean up more difficult. It needs to be addressed before this functionality can be finished.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Saturday Sep 14, 2013 at 16:17 GMT


Assigning to myself since I am working on a fix.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Sunday Sep 15, 2013 at 14:56 GMT


@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 removeMenu() to hide the Extension Manager menu item. (I think removeMenu() is still valuable for other uses cases -- e.g. extensions that want to replace a default menu item with their own version -- so no reason to stop PR #5217 or anything). But I also agree with Randy that hiding the menu item is confusing. I'd suggest we either disable it, or leave it enabled but show an explanatory error message when it's clicked.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Sunday Sep 15, 2013 at 14:58 GMT


CC@gruehle &@JeffryBooher because of the native menu bar question/issue. (Actually -- does the dark shell fix the above user story already?)

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Sep 15, 2013 at 15:07 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Sunday Sep 15, 2013 at 23:44 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Tuesday Oct 22, 2013 at 14:52 GMT


@njx, final pull request to add this feature is submitted.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Wednesday Nov 06, 2013 at 14:31 GMT


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.

  1. Mac menu dividers are disappearing and not coming back
  2. UrlParams has a bug and needs remove() and isEmpty() methods, and a unit test file.
  3. addIndicator() needs to be fixed (issue [CLOSED] [Core][FindReplace]: The layout issue of FindReplace bar when resizing Brackets window. #5682) so we can add a UI indicator in the status bar.

When these three issues are addressed, I will submit a new, clean PR for this feature.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Sunday Dec 22, 2013 at 15:49 GMT


Update:

  1. Disappearing Mac menu dividers: issue [CLOSED] Relax schedule dates #6300 posted and assigned to@redmunds.
  2. UrlParams bugs: Pull request [CLOSED] [Linux] cannot create new file at Brackets. #6246 submitted.
  3. StatusBar.addIndicator() bug: Pull request [CLOSED] easy access to all the commands ctrl+shift+p #6304 submitted.

When these three issues are addressed, I will submit a new, clean PR for this feature.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Saturday Jan 04, 2014 at 18:13 GMT


FBNC back to@njx

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Jan 09, 2014 at 21:34 GMT


Very cool - seems to work as expected. Thanks for sticking with this@lkcampbell! Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant