feat(editor): Add What's New notification callout (#16718)

This commit is contained in:
Jaakko Husso
2025-06-27 17:42:05 +03:00
committed by GitHub
parent 5fe68f38df
commit 1934e6fc0f
11 changed files with 518 additions and 198 deletions

View File

@@ -424,6 +424,10 @@ input[type='checkbox'] + label {
iframe {
aspect-ratio: 16/9 auto;
}
summary {
cursor: pointer;
}
}
.spacer {

View File

@@ -3231,7 +3231,6 @@
"insights.upgradeModal.perks.1": "Zoom into last 24 hours with hourly granularity",
"insights.upgradeModal.perks.2": "Gain deeper visibility into workflow trends over time",
"insights.upgradeModal.title": "Upgrade to Enterprise",
"whatsNew.modal.title": "What's New in n8n {version}",
"whatsNew.versionsBehind": "{count} version behind | {count} versions behind",
"whatsNew.update": "Update",
"whatsNew.updateAvailable": "You're currently on version {currentVersion}. Update to {latestVersion} to get {count} versions worth of new features, improvements, and fixes. See what changed",

View File

@@ -29,15 +29,22 @@ export interface Version {
securityIssueFixVersion: string;
}
export interface WhatsNewSection {
title: string;
calloutText: string;
footer: string;
items: WhatsNewArticle[];
createdAt: string;
updatedAt: string | null;
}
export interface WhatsNewArticle {
id: number;
title: string;
createdAt: string;
updatedAt: string | null;
publishedAt: string;
title: string;
content: string;
calloutTitle: string;
calloutText: string;
}
export async function getNextVersions(
@@ -49,11 +56,11 @@ export async function getNextVersions(
return await get(endpoint, currentVersion, {}, headers);
}
export async function getWhatsNewArticles(
export async function getWhatsNewSection(
endpoint: string,
currentVersion: string,
instanceId: string,
): Promise<WhatsNewArticle[]> {
): Promise<WhatsNewSection> {
const headers = {
[INSTANCE_ID_HEADER as string]: instanceId,
[INSTANCE_VERSION_HEADER as string]: currentVersion,