From 95e6a0e2142d267ff827c86b8e8155fa055a73df Mon Sep 17 00:00:00 2001 From: Karl Burtram Date: Fri, 7 Feb 2025 15:35:08 -0800 Subject: [PATCH] Adding banner to notify users of Azure Data Studio's retirement announcement. (#26191) (#26192) * Adding banner to welcome page * Adding notification * Updating README * Update label text from "Okay" to "OK" --------- Co-authored-by: Benjin Dubishar --- README.md | 5 +++ .../welcome/browser/az_data_welcome_page.ts | 11 +++++ .../retirementAnnouncement.contribution.ts | 13 ++++++ .../welcome/browser/retirementAnnouncement.ts | 44 +++++++++++++++++++ .../contrib/welcome/browser/welcomePage.css | 11 +++++ src/vs/workbench/workbench.desktop.main.ts | 3 ++ src/vs/workbench/workbench.web.main.ts | 3 ++ 7 files changed, 90 insertions(+) create mode 100644 src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution.ts create mode 100644 src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.ts diff --git a/README.md b/README.md index ab93ef2ee4ae..9523481b6257 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Azure Data Studio +> [!IMPORTANT] +> Azure Data Studio will be retired on **February 28, 2026**. [Read more](https://aka.ms/ads-retirement) + +---- + [![Join the chat at https://gitter.im/Microsoft/sqlopsstudio](https://badges.gitter.im/Microsoft/sqlopsstudio.svg)](https://gitter.im/Microsoft/sqlopsstudio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://dev.azure.com/ms/azuredatastudio/_apis/build/status/AzureDataStudio-Localization-CI?branchName=main)](https://dev.azure.com/ms/azuredatastudio/_build/latest?definitionId=453&branchName=main) [![Twitter Follow](https://img.shields.io/twitter/follow/azuredatastudio?style=social)](https://twitter.com/azuredatastudio) diff --git a/src/sql/workbench/contrib/welcome/browser/az_data_welcome_page.ts b/src/sql/workbench/contrib/welcome/browser/az_data_welcome_page.ts index 8c5fd3dd05c3..0fa6b532b2e8 100644 --- a/src/sql/workbench/contrib/welcome/browser/az_data_welcome_page.ts +++ b/src/sql/workbench/contrib/welcome/browser/az_data_welcome_page.ts @@ -31,6 +31,17 @@ export default () => ` +
+
+

+ ${escape(localize('welcomePage.adsRetirementAnnouncement', "Azure Data Studio will be retired on February 28, 2026."))} + + ${escape(localize('welcomePage.adsRetirementAnnouncementLink', "Read more"))} + + +

+
+
diff --git a/src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution.ts b/src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution.ts new file mode 100644 index 000000000000..d6d5babb24a0 --- /dev/null +++ b/src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution.ts @@ -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(WorkbenchExtensions.Workbench) + .registerWorkbenchContribution(RetirementAnnouncement, LifecyclePhase.Eventually); diff --git a/src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.ts b/src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.ts new file mode 100644 index 000000000000..e21d5589c749 --- /dev/null +++ b/src/sql/workbench/contrib/welcome/browser/retirementAnnouncement.ts @@ -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); + } + } + ] + ); + } + +} diff --git a/src/sql/workbench/contrib/welcome/browser/welcomePage.css b/src/sql/workbench/contrib/welcome/browser/welcomePage.css index 91754823aabd..8fccf3b21334 100644 --- a/src/sql/workbench/contrib/welcome/browser/welcomePage.css +++ b/src/sql/workbench/contrib/welcome/browser/welcomePage.css @@ -828,6 +828,17 @@ background-repeat: no-repeat } +.ads-homepage .retirement-banner { + width: 100%; + padding: 20px; + background-color: #ffcc00; + color: #000; + text-align: center; + font-size: 16px; + font-weight: bold; + border-radius: 4px; +} + .ads-homepage .middle-section { display: flex; flex-direction: column; diff --git a/src/vs/workbench/workbench.desktop.main.ts b/src/vs/workbench/workbench.desktop.main.ts index 313d805395a4..5ee3137d4de7 100644 --- a/src/vs/workbench/workbench.desktop.main.ts +++ b/src/vs/workbench/workbench.desktop.main.ts @@ -205,3 +205,6 @@ import 'sql/workbench/contrib/commandLine/electron-sandbox/commandLine.contribut //getting started import 'sql/workbench/contrib/welcome/electron-sandbox/gettingStarted.contribution'; + +// Azure Data Studio Retirement announcent +import 'sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution'; diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index a3f081b20639..8820d8b3c1d3 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -225,4 +225,7 @@ import 'sql/workbench/contrib/welcome/browser/gettingStarted.contribution'; // Telemetry Opt Out import 'sql/workbench/contrib/telemetry/browser/telemetryOptOut.contribution'; +// Azure Data Studio Retirement announcent +import 'sql/workbench/contrib/welcome/browser/retirementAnnouncement.contribution'; + //#endregion