-
Notifications
You must be signed in to change notification settings - Fork 922
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding banner to notify users of Azure Data Studio's retirement annou…
…ncement. (#26191) (#26192) * Adding banner to welcome page * Adding notification * Updating README * Update label text from "Okay" to "OK" --------- Co-authored-by: Benjin Dubishar <[email protected]>
- Loading branch information
Showing
7 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { Registry } from 'vs/platform/registry/common/platform'; | ||
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; | ||
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; | ||
import { RetirementAnnouncement } from 'sql/workbench/contrib/welcome/browser/retirementAnnouncement'; | ||
|
||
Registry | ||
.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench) | ||
.registerWorkbenchContribution(RetirementAnnouncement, LifecyclePhase.Eventually); |
44 changes: 44 additions & 0 deletions
44
src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; | ||
import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; | ||
import { IHostService } from 'vs/workbench/services/host/browser/host'; | ||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; | ||
import { localize } from 'vs/nls'; | ||
|
||
export class RetirementAnnouncement { | ||
private static DO_NOT_SHOW_RETIREMENT_PROMPT = 'workbench.doNotShowRetirementPrompt'; | ||
|
||
constructor( | ||
@IStorageService private storageService: IStorageService, | ||
@INotificationService private notificationService: INotificationService, | ||
@IHostService hostService: IHostService, | ||
@IConfigurationService configurationService: IConfigurationService | ||
) { | ||
if (this.storageService.get(RetirementAnnouncement.DO_NOT_SHOW_RETIREMENT_PROMPT, StorageScope.APPLICATION)) { | ||
return; | ||
} | ||
|
||
const retirementNotice = localize('prompt.adsRetirementAnnouncement', "Azure Data Studio will be retired on February 28, 2026. [Read more](https://aka.ms/ads-retirement)"); | ||
this.notificationService.prompt( | ||
Severity.Info, | ||
retirementNotice, | ||
[ | ||
{ | ||
label: localize('okay', "OK"), | ||
run: () => { /* no-op, just an ack */ } | ||
}, | ||
{ | ||
label: localize('never', "Don't show again"), | ||
run: () => { | ||
this.storageService.store(RetirementAnnouncement.DO_NOT_SHOW_RETIREMENT_PROMPT, true, StorageScope.APPLICATION, StorageTarget.MACHINE); | ||
} | ||
} | ||
] | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters