-
Notifications
You must be signed in to change notification settings - Fork 28.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: push eol notifications for windows 8 and 8.1 #177668
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -697,23 +697,44 @@ export class NativeWindow extends Disposable { | |
} | ||
} | ||
|
||
// Windows 7 warning | ||
// Windows 7/8/8.1 warning | ||
if (isWindows) { | ||
const version = this.environmentService.os.release.split('.'); | ||
const majorVersion = version[0]; | ||
const minorVersion = version[1]; | ||
const eolReleases = new Map<string, Map<string, string>>([ | ||
['6', new Map<string, string>([ | ||
['1', 'Windows 7 / Windows Server 2008 R2'], | ||
['2', 'Windows 8 / Windows Server 2012'], | ||
['3', 'Windows 8.1 / Windows Server 2012 R2'], | ||
])], | ||
]); | ||
|
||
// Refs https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-osversioninfoa | ||
if (parseInt(version[0]) === 6 && parseInt(version[1]) === 1) { | ||
const message = localize('windows 7 eol', "{0} on Windows 7 will no longer receive any further updates.", this.productService.nameLong); | ||
if (eolReleases.get(majorVersion)?.has(minorVersion)) { | ||
const message = localize('windowseolmessage', "{0} on {1} will soon stop receiving updates. Consider upgrading your windows version.", this.productService.nameLong, eolReleases.get(majorVersion)?.get(minorVersion)); | ||
const actions = [{ | ||
label: localize('windowseolBannerLearnMore', "Learn More"), | ||
href: 'https://aka.ms/vscode-faq-old-windows' | ||
deepak1556 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}]; | ||
|
||
this.bannerService.show({ | ||
id: 'windowseol.banner', | ||
message, | ||
ariaLabel: localize('windowseolarialabel', "{0}. Use navigation keys to access banner actions.", message), | ||
actions, | ||
icon: Codicon.warning | ||
}); | ||
Comment on lines
+721
to
+727
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice 👌 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @deepak1556 Please add a neverShowAgain option to the windowseol bannerService in line 721. It's annoying to have to close it every time I start Insiders. I know I'm running an unsupported Windows version and I don't really need a reminder every time. I want to be able to dismiss it forever. Is that possible to do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @deepak1556 I second @lorand-horvath request, we do not need a nag every time a project is opened! |
||
|
||
this.notificationService.prompt( | ||
Severity.Warning, | ||
message, | ||
[{ | ||
label: localize('learnMore', "Learn More"), | ||
run: () => this.openerService.open(URI.parse('https://aka.ms/vscode-faq-win7')) | ||
run: () => this.openerService.open(URI.parse('https://aka.ms/vscode-faq-old-windows')) | ||
}], | ||
{ | ||
neverShowAgain: { id: 'windows7eol', isSecondary: true, scope: NeverShowAgainScope.APPLICATION }, | ||
neverShowAgain: { id: 'windowseol', isSecondary: true, scope: NeverShowAgainScope.APPLICATION }, | ||
priority: NotificationPriority.URGENT, | ||
sticky: true | ||
} | ||
|
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.
Should this be extracted outside of this method?
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.
Version mappings are different between Windows and MacOS, so keeping them separate is better for simplicity.