-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Reload Without User Extensions #6334
Changes from all commits
9dff969
3e335ad
dacd9bb
7b40ba8
8182f60
d85f302
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,6 +192,7 @@ define({ | |
"STATUSBAR_TAB_SIZE" : "Tab Size:", | ||
"STATUSBAR_LINE_COUNT_SINGULAR" : "\u2014 {0} Line", | ||
"STATUSBAR_LINE_COUNT_PLURAL" : "\u2014 {0} Lines", | ||
"STATUSBAR_USER_EXTENSIONS_DISABLED" : "User Extensions Disabled", | ||
|
||
// CodeInspection: errors/warnings | ||
"ERRORS_PANEL_TITLE" : "{0} Errors", | ||
|
@@ -436,6 +437,7 @@ define({ | |
"DEBUG_MENU" : "Debug", | ||
"CMD_SHOW_DEV_TOOLS" : "Show Developer Tools", | ||
"CMD_REFRESH_WINDOW" : "Reload {APP_NAME}", | ||
"CMD_RELOAD_WITHOUT_USER_EXTS" : "Reload Without User Extensions", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @redmunds @lkcampbell I think we should simply say "Extensions" in these strings -- as far as most users are concerned, the only "extensions" that exist are the ones that show up in Extension Manager. The average end user has no idea that, as an implementation detail, certain non-optional core functionality happens to be structured as extensions too. So I think we may be trying to parse hairs more than needed in the labels here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I support @peterflynn in this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this idea as well mainly because it is a shorter length and fits in the menu better, while retaining the important semantics. @SAplayer, @WebsiteDeveloper I know you guys were discussing this as part of the really long German translation (pull request #6366). Since I can't read German, what was the final translation, in English, that you guys agreed on? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lkcampbell We first had this: Then I changed it to this: But our reason to change this wasn't because it hadn't included the dev folder, it was just too long. |
||
"CMD_NEW_BRACKETS_WINDOW" : "New {APP_NAME} Window", | ||
"CMD_SWITCH_LANGUAGE" : "Switch Language", | ||
"CMD_RUN_UNIT_TESTS" : "Run Tests", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,9 +39,10 @@ define(function (require, exports, module) { | |
|
||
require("utils/Global"); | ||
|
||
var FileSystem = require("filesystem/FileSystem"), | ||
FileUtils = require("file/FileUtils"), | ||
Async = require("utils/Async"); | ||
var FileSystem = require("filesystem/FileSystem"), | ||
FileUtils = require("file/FileUtils"), | ||
Async = require("utils/Async"), | ||
UrlParams = require("utils/UrlParams").UrlParams; | ||
|
||
// default async initExtension timeout | ||
var INIT_EXTENSION_TIMEOUT = 10000; | ||
|
@@ -311,15 +312,23 @@ define(function (require, exports, module) { | |
* @return {!$.Promise} A promise object that is resolved when all extensions complete loading. | ||
*/ | ||
function init(paths) { | ||
var params = new UrlParams(); | ||
|
||
if (_init) { | ||
// Only init once. Return a resolved promise. | ||
return new $.Deferred().resolve().promise(); | ||
} | ||
|
||
if (!paths) { | ||
paths = ["default", "dev", getUserExtensionPath()]; | ||
params.parse(); | ||
|
||
if (params.get("reloadWithoutUserExts") === "true") { | ||
paths = ["default"]; | ||
} else { | ||
paths = ["default", "dev", getUserExtensionPath()]; | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block of code assumes that the only possible values for the paths array is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other than unit tests, the I like that a little better since it's actually hard to guess what the correct response is when the array contains unexpected additional elements -- are those elements more similar to "default" (i.e. we should still load them even in safe mode) or are they more similar to "dev"/"user" (we shouldn't load them)? Impossible to say if we don't know anything about them... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that is good enough for now, and it's a simpler fix. |
||
|
||
// Load extensions before restoring the project | ||
|
||
// Get a Directory for the user extension directory and create it if it doesn't exist. | ||
|
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.
If this comment is implemented, we may also want to display message in console log when user extensions are no longer disabled.
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.
If I put the code to display the message here, it gets cleared out of the console log as soon as the browser reloads, so the user can never see it.
The only other place I could add it is in the AppInit(), but then the message will be displayed every time the browser loads: start up and reload. That might be more spammy than helpful.
I'm not sure there is an easy way to distinguish between browser loads that occur after extensions have been disabled versus regular browser loads.
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.
OK, you can forget about this for now.