Skip to content

Commit 42335e3

Browse files
committed
feat: show waring that deprecated extension is not loaded in installed view
1 parent 8d43a8a commit 42335e3

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/extensibility/ExtensionManagerView.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ define(function (require, exports, module) {
4343
PathUtils = require("thirdparty/path-utils/path-utils"),
4444
itemTemplate = require("text!htmlContent/extension-manager-view-item.html"),
4545
PreferencesManager = require("preferences/PreferencesManager"),
46-
warnExtensionIDs = new Set(JSON.parse(require("text!extensions/default/DefaultExtensions.json"))
47-
.warnExtensionStoreExtensions.extensionIDs),
46+
DefaultExtensions = JSON.parse(require("text!extensions/default/DefaultExtensions.json")),
47+
warnExtensionIDs = new Set(DefaultExtensions.warnExtensionStoreExtensions.extensionIDs),
48+
dontLoadExtensionIDs = new Set(DefaultExtensions.dontLoadExtensions.extensionIDs),
4849
Metrics = require("utils/Metrics");
4950

5051

@@ -364,6 +365,7 @@ define(function (require, exports, module) {
364365
(entry.installInfo.metadata.name === ThemeManager.getCurrentTheme().name);
365366

366367
context.defaultFeature = warnExtensionIDs.has(info.metadata.name);
368+
context.isDeprecatedExtension = dontLoadExtensionIDs.has(info.metadata.name);
367369

368370
context.allowInstall = context.isCompatible && !context.isInstalled;
369371

@@ -419,9 +421,9 @@ define(function (require, exports, module) {
419421
var isDefaultOrInstalled = this.model.source === "default" || this.model.source === "installed";
420422
var isDefaultAndTheme = this.model.source === "default" && context.metadata.theme;
421423
context.disablingAllowed = isDefaultOrInstalled && !isDefaultAndTheme && !context.disabled
422-
&& !hasPendingAction && !context.metadata.theme;
424+
&& !hasPendingAction && !context.metadata.theme && !context.isDeprecatedExtension;
423425
context.enablingAllowed = isDefaultOrInstalled && !isDefaultAndTheme && context.disabled
424-
&& !hasPendingAction && !context.metadata.theme;
426+
&& !hasPendingAction && !context.metadata.theme && !context.isDeprecatedExtension;
425427

426428
// Copy over helper functions that we share with the registry app.
427429
["lastVersionDate", "authorInfo"].forEach(function (helper) {

src/htmlContent/extension-manager-view-item.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
</div>
4040
</td>
4141
<td class="ext-desc">
42+
{{#isDeprecatedExtension}}
43+
{{#isInstalled}}
44+
<div class="alert warning">{{Strings.EXTENSION_DEPRECATED_NOT_LOADED}}</div>
45+
{{/isInstalled}}
46+
{{/isDeprecatedExtension}}
4247
{{#showInstallButton}}
4348
<!-- Warnings when trying to install extension where latest/all versions not compatible -->
4449
{{#defaultFeature}}

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ define({
809809
"EXTENSION_INCOMPATIBLE_NEWER": "This extension requires a newer version of {APP_NAME}.",
810810
"EXTENSION_INCOMPATIBLE_OLDER": "This extension currently only works with older versions of {APP_NAME}.",
811811
"EXTENSION_DEFAULT_FEATURE_PRESENT": "You may not need this extension. {APP_NAME} already has this feature.",
812+
"EXTENSION_DEPRECATED_NOT_LOADED": "Extension is deprecated and not loaded.",
812813
"EXTENSION_LATEST_INCOMPATIBLE_NEWER": "Version {0} of this extension requires a newer version of {APP_NAME}. But you can install the earlier version {1}.",
813814
"EXTENSION_LATEST_INCOMPATIBLE_OLDER": "Version {0} of this extension only works with older versions of {APP_NAME}. But you can install the earlier version {1}.",
814815
"EXTENSION_NO_DESCRIPTION": "No description",

0 commit comments

Comments
 (0)