Content Production Dashboard: Adding metrics section [MAPS-123] #10351
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This update adds the metrics section as well as the extraction of the main logic, so we can reuse it in both the Home and Page locations.
Approach
IMP: In this PR the refresh button was removed, it does the same as a navigator refresh. In other apps (Homebase) we removed this type of button for that reason, so I follow the same approach here.
Implemented a metrics dashboard that calculates and displays 5 content production metrics from Contentful entries and scheduled actions:
The metrics use configurable time periods from installation parameters (
needsUpdateMonths,recentlyPublishedDays,timeToPublishDays) and are rendered as styled cards.The
MetricsCalculatorclass performs all calculations in the constructor, and theDashboardcomponent is reusable across both Page and Home locations.Testing steps
Automated tests added.
With entries and scheduled actions:
Without any entry or scheduled actions:
With negative published percentage:
How the flow works:
Grabacion.de.pantalla.2025-12-18.a.la.s.4.27.55.p.m.mov
Breaking Changes
N/A
Dependencies and/or References
Link to MAPS-123
Deployment
N/A