-
Notifications
You must be signed in to change notification settings - Fork 7.6k
After extension is updated/removed, reload Brackets instead of quitting #6487
Conversation
There is one issue with this. If you remove the Debug extension, then it will not work, and in Edge Code there is no Debug extension. Maybe it could be time to move the reload commands to the core code. |
@TomMalbran, good point and your solution is the only one that makes sense. Bleh, I was hoping this one was going to be really easy. Oh well...back to the drawing board. |
@TomMalbran, since you are around tonight, any suggestions on where to move the Reload code? |
The menu items could probably stay in the Debug menu, just the code would need to be moved, but not sure where to move the code. Moving the reload code would mean that we could also move the change language menu to Help or View. |
All of the "quit" commands are handled in |
@@ -402,23 +402,23 @@ define({ | |||
"EXTENSION_ERROR" : "Extension error", | |||
"EXTENSION_KEYWORDS" : "Keywords", | |||
"EXTENSION_INSTALLED" : "Installed", | |||
"EXTENSION_UPDATE_INSTALLED" : "This extension update has been downloaded and will be installed when you quit {APP_NAME}.", | |||
"EXTENSION_UPDATE_INSTALLED" : "This extension update has been downloaded and will be installed after {APP_NAME} automatically reloads.", |
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.
I don't think that the word "automatically" is necessary in any of these messages.
@redmunds, also, what do you think about changing the name from I also considered keeping the concept of browserReload around as well, but that makes the functionality platform-dependent. A browserReload in HTML mode is not the same as a browserReload in native mode. We should probably abstract up a level and call the whole thing appReload. The behavior is the same as closing and opening the application without the user having to do anything. Same on all platforms. |
If you create a second window using |
@redmunds, |
Yes, register |
"CHANGE_AND_RELOAD_MESSAGE" : "Pro aktualizaci nebo odstranění označených doplňků musíte ukončit a restartovat aplikaci {APP_NAME}. Budete vyzváni k uložení změn.", | ||
"REMOVE_AND_RELOAD" : "Odstranit doplňky a ukončit program", | ||
"CHANGE_AND_RELOAD" : "Změnit doplňky a ukončit program", | ||
"UPDATE_AND_RELOAD" : "Aktualizovat doplňky a ukončit program", |
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.
@redmunds, I hope I did this correctly. I changed all of the language files. I don't know how the automated translation services work so, are you sure changing the constant names won't mess anything up? Will the service still be able to flag the strings that need updating even if we changed the constant names?
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.
You should only edit the nls/root/strings.js file, so remove changes to all of the other nls/*/strings.js files.
FYI, for fr and ja, the automated system will remove the old ids, add the new ids, and then re-translate. All of the other languages must be updated manually. They will default to the root (English) string until then.
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.
When we change something that is not a translation, many times we change all the languages besides the fr and ja, so that they work, since several translations are not updated for every sprint.
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.
Yes, I forgot to mention that other possibility: do a quick translation using something such as Google Translate.
FYI, we have an internal event going on today, and last day of sprint was pushed to tomorrow, so I may not get to reviewing this today.
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.
I didn't noticed that the string also changed, so it might be better to not touch it, unless we are sure that the Google translations are accurate enough.
@redmunds, updates committed. |
@@ -23,11 +23,13 @@ | |||
|
|||
|
|||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, regexp: true */ | |||
/*global define, $, brackets, window */ | |||
/*global define, $, brackets, window, WebSocket */ |
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.
I don't think this and a few other changes to this file were not made by you, so it looks like a bad merge.
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.
Nevermind -- I see you had to also move the disableCache()
code.
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.
You should remove "Mustache" "WebSocket" from the jslint global define list in DebugCommands/main.js.
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.
I think you mean "WebSocket" since "Mustache" is still required in DebugCommands.
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.
You mean "WebSocket", correct?
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.
Yes, "WebSocket".
@redmunds, incorrect changes rolled back. |
@redmunds, code review changes committed. |
AppInit.htmlReady(function () { | ||
// If in Reload Without User Extensions mode, update UI and log console message | ||
var USER_EXT_STATUS_ID = "status-user-exts"; |
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.
Doesn't seem like there's any benefit to putting "status-user-exts" in a local variable since it's only used once.
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.
Oh, I see it was already like this and you just moved it, so I'll leave it to your discretion.
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.
No, that's all me, old file and new file. I wrote it like that out of force of habit, throwing hard-wired strings into a constant. I can change it.
There are 2 ExtensionManager unit tests that no longer pass:
|
@redmunds, code review changes committed. |
Looks good. Merging. |
After extension is updated/removed, reload Brackets instead of quitting
This PR is a fix for issue #6350. After extension is updated/removed, Brackets will automatically reload with the new extension changes in place.