-
Notifications
You must be signed in to change notification settings - Fork 166
Content Production Dashboard: Adding content publish trends chart structure [MAPS-124] #10453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content Production Dashboard: Adding content publish trends chart structure [MAPS-124] #10453
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
apps/content-production-dashboard/src/locations/ConfigScreen.tsx
Outdated
Show resolved
Hide resolved
apps/content-production-dashboard/src/components/ChartWrapper.tsx
Outdated
Show resolved
Hide resolved
apps/content-production-dashboard/src/components/ChartTooltip.tsx
Outdated
Show resolved
Hide resolved
apps/content-production-dashboard/test/components/ChartWrapper.spec.tsx
Outdated
Show resolved
Hide resolved
apps/content-production-dashboard/test/components/ContentTrendsTabs.spec.tsx
Outdated
Show resolved
Hide resolved
JuliRossi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| const startDate = getStartDateForTimeRange(options.timeRange); | ||
| const now = new Date(); | ||
| const monthMap = new Map<string, number>(); | ||
|
|
||
| const filteredEntries = filterEntriesByContentTypes(entries, contentTypes); | ||
|
|
||
| filteredEntries.forEach((entry) => { | ||
| const createdAt = DateCalculator.parseDate(entry?.sys?.createdAt); | ||
| if (!createdAt || createdAt < startDate) return; | ||
|
|
||
| const monthYear = DateCalculator.formatMonthYear(createdAt); | ||
| monthMap.set(monthYear, (monthMap.get(monthYear) || 0) + 1); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable since this logic is complex. Let me know if you need help to refactor this, as it can be quite complex
Purpose
This update includes the base structure for the content publishing trends chart.
IMP: This is not the final version, it's just a checkpoint to avoid having a really long PR. The filtering feature will be included in another PR.
Approach
Adding:
Testing steps
Several automated tests were added.
Grabacion.de.pantalla.2026-01-15.a.la.s.5.12.41.p.m.mov
Breaking Changes
N/A
Dependencies and/or References
Link to MAPS-124
Deployment
N/A