mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix to open ADS release notes instead of VS Code (#7418)
* Open latest ADS release notes in browser * Only show release notes for stable builds * Update config description text * Have release notes notification prompt user before opening * Remove unneeded import
This commit is contained in:
@@ -48,7 +48,7 @@ configurationRegistry.registerConfiguration({
|
|||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: true,
|
default: true,
|
||||||
scope: ConfigurationScope.APPLICATION,
|
scope: ConfigurationScope.APPLICATION,
|
||||||
description: localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are fetched from a Microsoft online service."),
|
description: localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are opened in a new web browser window."), // {{SQL CARBON EDIT}} Update text to be correct for ADS
|
||||||
tags: ['usesOnlineServices']
|
tags: ['usesOnlineServices']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,11 +39,20 @@ const CONTEXT_UPDATE_STATE = new RawContextKey<string>('updateState', StateType.
|
|||||||
let releaseNotesManager: ReleaseNotesManager | undefined = undefined;
|
let releaseNotesManager: ReleaseNotesManager | undefined = undefined;
|
||||||
|
|
||||||
function showReleaseNotes(instantiationService: IInstantiationService, version: string) {
|
function showReleaseNotes(instantiationService: IInstantiationService, version: string) {
|
||||||
|
/* // {{SQL CARBON EDIT}} just open release notes in browser until we can get ADS release notes from the web
|
||||||
if (!releaseNotesManager) {
|
if (!releaseNotesManager) {
|
||||||
releaseNotesManager = instantiationService.createInstance(ReleaseNotesManager);
|
releaseNotesManager = instantiationService.createInstance(ReleaseNotesManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
return instantiationService.invokeFunction(accessor => releaseNotesManager!.show(accessor, version));
|
return instantiationService.invokeFunction(accessor => releaseNotesManager!.show(accessor, version));
|
||||||
|
*/
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}} Open release notes in browser until we can get ADS notes from web
|
||||||
|
return instantiationService.invokeFunction(async accessor => {
|
||||||
|
const action = accessor.get(IInstantiationService).createInstance(OpenLatestReleaseNotesInBrowserAction);
|
||||||
|
await action.run();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class OpenLatestReleaseNotesInBrowserAction extends Action {
|
export class OpenLatestReleaseNotesInBrowserAction extends Action {
|
||||||
@@ -138,9 +147,11 @@ export class ProductContribution implements IWorkbenchContribution {
|
|||||||
|
|
||||||
// was there an update? if so, open release notes
|
// was there an update? if so, open release notes
|
||||||
const releaseNotesUrl = productService.releaseNotesUrl;
|
const releaseNotesUrl = productService.releaseNotesUrl;
|
||||||
if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && releaseNotesUrl && lastVersion && productService.version !== lastVersion) {
|
if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && releaseNotesUrl && lastVersion && productService.version !== lastVersion && productService.quality === 'stable') { // {{SQL CARBON EDIT}} Only show release notes for stable build
|
||||||
|
/* // {{SQL CARBON EDIT}} Prompt user to open release notes in browser until we can get ADS release notes from the web
|
||||||
showReleaseNotes(instantiationService, productService.version)
|
showReleaseNotes(instantiationService, productService.version)
|
||||||
.then(undefined, () => {
|
.then(undefined, () => {
|
||||||
|
*/
|
||||||
notificationService.prompt(
|
notificationService.prompt(
|
||||||
severity.Info,
|
severity.Info,
|
||||||
nls.localize('read the release notes', "Welcome to {0} v{1}! Would you like to read the Release Notes?", productService.nameLong, productService.version),
|
nls.localize('read the release notes', "Welcome to {0} v{1}! Would you like to read the Release Notes?", productService.nameLong, productService.version),
|
||||||
@@ -153,7 +164,7 @@ export class ProductContribution implements IWorkbenchContribution {
|
|||||||
}],
|
}],
|
||||||
{ sticky: true }
|
{ sticky: true }
|
||||||
);
|
);
|
||||||
});
|
// }); // {{SQL CARBON EDIT}}
|
||||||
}
|
}
|
||||||
|
|
||||||
// should we show the new license?
|
// should we show the new license?
|
||||||
|
|||||||
Reference in New Issue
Block a user