diff --git a/web/app/components/dashboard/new-features-banner.hbs b/web/app/components/dashboard/new-features-banner.hbs index 2117c2d01..0fc593958 100644 --- a/web/app/components/dashboard/new-features-banner.hbs +++ b/web/app/components/dashboard/new-features-banner.hbs @@ -1,28 +1,21 @@ -{{! @glint-nocheck: not typesafe yet }} {{#if this.isShown}} - New features available + New editor features. - {{/if}} diff --git a/web/app/components/dashboard/new-features-banner.ts b/web/app/components/dashboard/new-features-banner.ts index 050827870..71607209c 100644 --- a/web/app/components/dashboard/new-features-banner.ts +++ b/web/app/components/dashboard/new-features-banner.ts @@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking"; import window from "ember-window-mock"; import { action } from "@ember/object"; -let LOCAL_STORAGE_ITEM_NAME = "newFeaturesBanner"; +let LOCAL_STORAGE_ITEM_NAME = "july-20-2023-newFeatureBannerIsShown"; interface DashboardNewFeaturesBannerSignature { Args: {}; @@ -12,7 +12,12 @@ interface DashboardNewFeaturesBannerSignature { export default class DashboardNewFeaturesBanner extends Component { @tracked protected isDismissed = false; - isShown(): boolean { + /** + * Whether the banner should be shown. + * Set true on first visit to the dashboard and remains true + * until the user dismisses the banner. + */ + protected get isShown(): boolean { const storageItem = window.localStorage.getItem(LOCAL_STORAGE_ITEM_NAME); if (storageItem === null) { @@ -22,9 +27,12 @@ export default class DashboardNewFeaturesBanner extends Component + +

Welcome back, {{this.authenticatedUser.info.given_name}}

Here’s all the latest updates across the organization.