feat(F0AnalyticsDashboard): add reusable location item - #5272
Conversation
Implemented-with: factorial-f0
🔍 Review policy: FeatureThe PR title starts with Required approvals
How this was decided
Policy source: |
✅ No untranslated copy addedEvery user-visible string in this PR comes from the i18n layer. Codebase total unchanged at 132. |
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
✅ Storybook docs — no pages lostEvery page reachable on ➕ 4 added · ✏️ 32 updated ➕ Added (4)1 new docs page(s) and 3 new story/stories.
✏️ Updated — 32 page(s)/story/stories across 6 file(s)The source file behind each of these changed. Detection is per file, so editing one story flags its siblings too.
🔇 Added but not in the sidebar — 23Expected for snapshot-only and internal stories (
…and 3 more added but hidden. Links point at this PR's Storybook build — browse the full Storybook. Snapshot of the Storybook index (docs pages + stories) compared against |
📦 Alpha Package Version PublishedUse Use |
🔍 Visual review for your branch is published 🔍Here are the links to: |
|
♿ Accessibility (axe) — components changed in this PR✅ No a11y issues in the stories this PR changed. Scope: only stories in the files/component folders this PR changed. It can't yet flag downstream ripple from shared-code/token changes, or diff against |
Implemented-with: factorial-f0
Implemented-with: factorial-f0
Implemented-with: factorial-f0 Implemented-with: factorial-pr
Implemented-with: factorial-f0 Implemented-with: factorial-pr
Product review
This draft is currently intended for product review of the location-based analytics experience, its responsive behavior, and the reusable component API.
The first planned adoption is a new Time Tracking analytics template. That template will use the widget to help customers understand clock-ins and clock-outs by location, location density, the employees associated with a selected workplace, and activity across a 24-hour period.
This PR provides the reusable F0 analytics building block; it does not yet ship the final Time Tracking template or connect it to the production Time Tracking cube. The component lives in
F0AnalyticsDashboardand deliberately stays domain-neutral so future analytical-dashboard templates can reuse it for IT inventory, software and asset distribution, or other location-based datasets without introducing domain-specific UI into F0.Description
Add a generic location item to
F0AnalyticsDashboardfor map-based analytical datasets. Consumers provide domain data and labels through the public contract and can independently show or hide the summary, location details, density legend, and timeline; omit timeline data entirely; and supply a partial F0-token density palette that stays consistent between markers, clusters, and the legend.Type of change
experimental/)experimental/→ stable)@deprecated+@removeIn+@migration)@removeIn)Lifecycle phase (if applicable)
Not applicable. This extends the existing experimental
F0AnalyticsDashboardpattern.Screenshots (if applicable)
Visual and responsive states are covered by the consolidated
AnalyticsDashboard/Location item / Snapshotstory and dedicated Default, SideBySide, IntermediateWidth, Narrow, Dark, NoSelection, CrowdedDetails, MapUnavailable, CustomDensityPalette, WithoutSummary, WithoutDetails, WithoutDensityLegend, WithoutTimeline, and MapOnly stories.Implementation details
F0AnalyticsDashboard.densityPaletteAPI using F0 color tokens. One resolved palette drives markers, clusters, and the legend, with contrast-safe normalization.Validation
pnpm --dir packages/react build:typesoxfmt --checkplusoxlint --max-warnings 0pnpm --filter @factorialco/f0-react build-storybook