Summary
Replace the static dashboard content in Storefront's home.hbs with the shared <Dashboard /> component and register Storefront dashboard widgets through the widget service, following the pattern used by Ledger.
Problem / Use Case
Storefront currently hardcodes its home dashboard with specific widget components in addon/templates/home.hbs. This prevents the Storefront dashboard from using the shared dashboard system for default widgets, dashboard persistence, widget selection, and extension-scoped dashboard behavior.
Ledger already uses the intended pattern: it renders <Dashboard /> from its home template and registers a dedicated dashboard id plus widgets in addon/extension.js.
Proposed Solution
Update Storefront so the home route renders the shared dashboard component with a Storefront-specific dashboard id and name, for example:
<Dashboard @defaultDashboardId="storefront" @defaultDashboardName="Storefront Dashboard" @extension="storefront" ... />
Register a dedicated Storefront dashboard in addon/extension.js using the widget service, and register Storefront widgets against that dashboard namespace. Existing home widgets should become registered dashboard widgets instead of being statically rendered in home.hbs.
Affected Area
addon/templates/home.hbs
addon/extension.js
- Existing Storefront widget components under
addon/components/widget/*
- Dashboard/widget registration behavior from
@fleetbase/ember-core and @fleetbase/ember-ui
Acceptance Criteria
Implementation Notes
Use Ledger as the reference implementation:
packages/ledger/addon/templates/home.hbs
packages/ledger/addon/extension.js
Expected implementation shape:
- Replace the static widget list in
addon/templates/home.hbs with <Dashboard />.
- Move Storefront widget definitions into a
registerWidgets(widgetService) helper in addon/extension.js, matching Ledger's structure.
- Register
widgetService.registerDashboard('storefront').
- Register Storefront widgets with
widgetService.registerWidgets('storefront', widgets).
- Mark the intended default widgets with
default: true.
- Keep widget ids stable where possible, especially
storefront-key-metrics-widget.
Documentation Impact
No public documentation update appears required unless the implementation changes user-facing dashboard configuration behavior beyond replacing the internal Storefront home dashboard rendering.
API Reference Impact
No API reference update appears required. This should be an Ember/dashboard registration change only, with no Storefront API request or response schema changes.
Summary
Replace the static dashboard content in Storefront's
home.hbswith the shared<Dashboard />component and register Storefront dashboard widgets through the widget service, following the pattern used by Ledger.Problem / Use Case
Storefront currently hardcodes its home dashboard with specific widget components in
addon/templates/home.hbs. This prevents the Storefront dashboard from using the shared dashboard system for default widgets, dashboard persistence, widget selection, and extension-scoped dashboard behavior.Ledger already uses the intended pattern: it renders
<Dashboard />from its home template and registers a dedicated dashboard id plus widgets inaddon/extension.js.Proposed Solution
Update Storefront so the home route renders the shared dashboard component with a Storefront-specific dashboard id and name, for example:
<Dashboard @defaultDashboardId="storefront" @defaultDashboardName="Storefront Dashboard" @extension="storefront" ... />Register a dedicated Storefront dashboard in
addon/extension.jsusing the widget service, and register Storefront widgets against that dashboard namespace. Existing home widgets should become registered dashboard widgets instead of being statically rendered inhome.hbs.Affected Area
addon/templates/home.hbsaddon/extension.jsaddon/components/widget/*@fleetbase/ember-coreand@fleetbase/ember-uiAcceptance Criteria
<Dashboard />component instead of hardcoded widget components.storefrontdashboard through the widget service.storefrontdashboard.Implementation Notes
Use Ledger as the reference implementation:
packages/ledger/addon/templates/home.hbspackages/ledger/addon/extension.jsExpected implementation shape:
addon/templates/home.hbswith<Dashboard />.registerWidgets(widgetService)helper inaddon/extension.js, matching Ledger's structure.widgetService.registerDashboard('storefront').widgetService.registerWidgets('storefront', widgets).default: true.storefront-key-metrics-widget.Documentation Impact
No public documentation update appears required unless the implementation changes user-facing dashboard configuration behavior beyond replacing the internal Storefront home dashboard rendering.
API Reference Impact
No API reference update appears required. This should be an Ember/dashboard registration change only, with no Storefront API request or response schema changes.