Skip to content

Commit

Permalink
Add new enterprise product sections to release notes (#4645)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanndago authored Dec 19, 2024
1 parent 5b9a927 commit 52c6c7d
Show file tree
Hide file tree
Showing 5 changed files with 459 additions and 262 deletions.
102 changes: 90 additions & 12 deletions client-src/elements/chromedash-enterprise-release-notes-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {SHARED_STYLES} from '../css/shared-css.js';
import {Feature} from '../js-src/cs-client.js';
import {
ENTERPRISE_FEATURE_CATEGORIES,
ENTERPRISE_PRODUCT_CATEGORY,
PLATFORM_CATEGORIES,
PLATFORMS_DISPLAYNAME,
STAGE_ENT_ROLLOUT,
Expand All @@ -27,9 +28,17 @@ interface Channels {
@customElement('chromedash-enterprise-release-notes-page')
export class ChromedashEnterpriseReleaseNotesPage extends LitElement {
@state()
currentFeatures: Feature[] = [];
currentChromeBrowserUpdates: Feature[] = [];
@state()
upcomingFeatures: Feature[] = [];
upcomingChromeBrowserUpdates: Feature[] = [];
@state()
currentChromeEnterpriseCore: Feature[] = [];
@state()
upcomingChromeEnterpriseCore: Feature[] = [];
@state()
currentChromeEnterprisePremium: Feature[] = [];
@state()
upcomingChromeEnterprisePremium: Feature[] = [];
@state()
features: Feature[] = [];
@state()
Expand Down Expand Up @@ -249,7 +258,7 @@ export class ChromedashEnterpriseReleaseNotesPage extends LitElement {
}));

// Features with a rollout stage in the selected milestone sorted with the highest impact.
this.currentFeatures = this.features
const currentFeatures = this.features
.filter(({stages}) =>
stages.some(s => s.rollout_milestone === this.selectedMilestone)
)
Expand All @@ -269,9 +278,25 @@ export class ChromedashEnterpriseReleaseNotesPage extends LitElement {
return impactB - impactA;
});

this.currentChromeBrowserUpdates = currentFeatures.filter(
f =>
f.enterprise_product_category ===
ENTERPRISE_PRODUCT_CATEGORY.CHROME_BROWSER_UPDATE[0]
);
this.currentChromeEnterpriseCore = currentFeatures.filter(
f =>
f.enterprise_product_category ===
ENTERPRISE_PRODUCT_CATEGORY.CHROME_ENTERPRISE_CORE[0]
);
this.currentChromeEnterprisePremium = currentFeatures.filter(
f =>
f.enterprise_product_category ===
ENTERPRISE_PRODUCT_CATEGORY.CHROME_ENTERPRISE_PREMIUM[0]
);

// Features that are rolling out in a future milestone sorted with the closest milestone
// first.
this.upcomingFeatures = this.features
const upcomingFeatures = this.features
.filter(
({stages}) =>
!stages.some(s => s.rollout_milestone === this.selectedMilestone) &&
Expand All @@ -296,6 +321,21 @@ export class ChromedashEnterpriseReleaseNotesPage extends LitElement {
) || 0;
return minA - minB;
});
this.upcomingChromeBrowserUpdates = upcomingFeatures.filter(
f =>
f.enterprise_product_category ===
ENTERPRISE_PRODUCT_CATEGORY.CHROME_BROWSER_UPDATE[0]
);
this.upcomingChromeEnterpriseCore = upcomingFeatures.filter(
f =>
f.enterprise_product_category ===
ENTERPRISE_PRODUCT_CATEGORY.CHROME_ENTERPRISE_CORE[0]
);
this.upcomingChromeEnterprisePremium = upcomingFeatures.filter(
f =>
f.enterprise_product_category ===
ENTERPRISE_PRODUCT_CATEGORY.CHROME_ENTERPRISE_PREMIUM[0]
);
}

connectedCallback() {
Expand Down Expand Up @@ -424,12 +464,28 @@ export class ChromedashEnterpriseReleaseNotesPage extends LitElement {
renderReleaseNotesSummary() {
return html` <table id="release-notes-summary">
${this.renderReleaseNotesSummarySection(
'Chrome browser updates',
this.currentFeatures
'Chrome Browser updates',
this.currentChromeBrowserUpdates
)}
${this.renderReleaseNotesSummarySection(
'Chrome Enterprise Core (CEC)',
this.currentChromeEnterpriseCore
)}
${this.renderReleaseNotesSummarySection(
'Chrome Enterprise Premium (CEP, paid SKU)',
this.currentChromeEnterprisePremium
)}
${this.renderReleaseNotesSummarySection(
'Upcoming Chrome Browser updates',
this.upcomingChromeBrowserUpdates
)}
${this.renderReleaseNotesSummarySection(
'Upcoming Chrome browser updates',
this.upcomingFeatures
'Upcoming Chrome Enterprise Core (CEC)',
this.upcomingChromeEnterpriseCore
)}
${this.renderReleaseNotesSummarySection(
'Upcoming Chrome Enterprise Premium (CEP, paid SKU)',
this.upcomingChromeEnterprisePremium
)}
</table>`;
}
Expand Down Expand Up @@ -512,13 +568,35 @@ export class ChromedashEnterpriseReleaseNotesPage extends LitElement {

renderReleaseNotesDetails() {
return html` ${this.renderReleaseNotesDetailsSection(
'Chrome browser updates',
this.currentFeatures,
'Chrome Browser updates',
this.currentChromeBrowserUpdates,
m => m === this.selectedMilestone
)}
${this.renderReleaseNotesDetailsSection(
'Chrome Enterprise Core (CEC)',
this.currentChromeEnterpriseCore,
m => m === this.selectedMilestone
)}
${this.renderReleaseNotesDetailsSection(
'Chrome Enterprise Premium (CEP, paid SKU)',
this.currentChromeEnterprisePremium,
m => m === this.selectedMilestone
)}
${this.renderReleaseNotesDetailsSection(
'Upcoming Chrome browser updates',
this.upcomingFeatures,
'Upcoming Chrome Browser updates',
this.upcomingChromeBrowserUpdates,
(m, milestones) =>
milestones.find(x => parseInt(x) > this.selectedMilestone!) === m
)}
${this.renderReleaseNotesDetailsSection(
'Upcoming Chrome Enterprise Core (CEC)',
this.upcomingChromeEnterpriseCore,
(m, milestones) =>
milestones.find(x => parseInt(x) > this.selectedMilestone!) === m
)}
${this.renderReleaseNotesDetailsSection(
'Upcoming Chrome Enterprise Premium (CEP, paid SKU)',
this.upcomingChromeEnterprisePremium,
(m, milestones) =>
milestones.find(x => parseInt(x) > this.selectedMilestone!) === m
)}`;
Expand Down
Loading

0 comments on commit 52c6c7d

Please sign in to comment.