Skip to content

[Feature]: Replace Storefront static home dashboard with registered Dashboard component #71

Description

@roncodes

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

  • Storefront home renders the shared <Dashboard /> component instead of hardcoded widget components.
  • Storefront registers a dedicated storefront dashboard through the widget service.
  • Storefront widgets shown on the current home page are available as registered widgets for the storefront dashboard.
  • Default Storefront dashboard widgets load automatically for a first-time user.
  • Existing Storefront widgets continue to fetch metrics, orders, and customers correctly.
  • The global dashboard widget registration behavior is preserved or intentionally limited to the appropriate Storefront widget subset.
  • Frontend lint and Ember tests/build are run, or skipped validation is explained.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent:approvedHuman approved AI agent implementationagent:readyIssue is ready for AI agent triage or implementationtype:featureFeature or enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions