Skip to content

[PZB-1286] VIIRS fire alerts widget x-axis shows "invalid date" - #5277

Merged
willian-viana merged 1 commit into
developfrom
fix/fires-alerts-invalid-date-PZB-1286
Oct 19, 2026
Merged

willian-viana merged 1 commit into
developfrom
fix/fires-alerts-invalid-date-PZB-1286

Conversation

@willian-viana

Copy link
Copy Markdown
Collaborator

The Weekly Fire Alerts widget's x-axis displays "invalid date" when the time-range slider is adjusted. Flagged by Tatiana as donor-visible — noted by a donor supporting fire work.

Steps to Reproduce

  • Go to the Dashboard for Indonesia: https://gfw.global/KYgths
  • Click the Fire tab
  • Scroll to the "Weekly Fire Alerts in [country]" widget
  • Move the slider at the bottom to adjust the time period in both directions

Observed Behaviour

The x-axis shows "invalid date" instead of the correct date labels.

Expected Behaviour

The x-axis should show correctly formatted dates for the selected time period.

###Tests
Adjust the time-range slider on the Weekly Fire Alerts widget across several countries and verify the x-axis always shows valid dates.

Hints

Likely a date-parsing bug triggered by a specific slider position or date format edge case. Given the donor visibility, this is worth prioritizing for a fix regardless of general severity ranking.

Reported by: Sarah Carter (1 report)
Airtable cluster: https://airtable.com/appxosPj0F7hthw32/tblDbSDchhSfnl0dT/reco2mErRL0xSvKEv

For windows under 10 weeks the x-axis kept monthLabel ("Mar") as its
dataKey while formatting ticks as dates, rendering "Invalid date".
Use the ISO `date` key instead.

Also honor the brush's endIndex in getStartEndIndexes (clamped to the
data length) so the right handle actually narrows the chart.

PZB-1286
@willian-viana willian-viana self-assigned this Oct 14, 2026
@willian-viana
willian-viana marked this pull request as ready for review October 14, 2026 14:06
@willian-viana
willian-viana temporarily deployed to gfw-staging-pr-5277 October 14, 2026 14:10 Inactive
@willian-viana willian-viana mentioned this pull request Oct 15, 2026
@willian-viana
willian-viana merged commit 5e5c3e9 into develop Oct 19, 2026
4 checks passed
@willian-viana
willian-viana deleted the fix/fires-alerts-invalid-date-PZB-1286 branch October 19, 2026 13:18

This branch was previously deployed

1 inactive deployment
gfw-staging-pr-5277 — 5137ba1c Deployed Oct 14, 2026 by willian-viana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants