Skip to content

feat(website): more relevant date range options for W-ASAP page - #801

Merged
fhennig merged 5 commits into
mainfrom
wasap-better-dates
Sep 25, 2025
Merged

fhennig merged 5 commits into
mainfrom
wasap-better-dates

Conversation

@fhennig

@fhennig fhennig commented Sep 15, 2025 •

Copy link
Copy Markdown
Contributor

resolves #814

Summary

  • There is a new weeklyAndMonthlyDateRangeOptions function to generate weekly and monthly date range options using labels like 2025-W23 for weeks, and 2025-08 for months.
  • There is a DynamicDateFilter which takes a field name, looks at the available date range for that field, and then filters down a given list of date range options to the ones that have overlap with the date range of the field.

Screenshot

image

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

@fhennig fhennig self-assigned this Sep 15, 2025
@vercel

vercel Bot commented Sep 15, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
dashboards Ready Ready Preview Comment Sep 25, 2025 11:22am

@gordonkoehn

Copy link
Copy Markdown
Contributor

I think the thought, but you need a start and an end date? A starting week and an ending week. Something like "Most recent 2 weeks", "Most Recent Month2, "Most recent 3 Months", Or Multiple select the recent weeks? The timeframe uploaded will always be consecutive.

@fhennig

fhennig commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

Hmm, I think I don't quite understand what you mean. I'm not sure what the start and end date is needed for, when computing the options. Maybe i can explain a bit better how it works now:

I calculate the date ranges for all months and weeks within the last 6 months or so, and then I fetch the start and end date of the available data. And then I look for overlaps. Which of the date ranges have any overlap with the data? And those ranges I put as options into the dropdown. So it is dynamic (maybe that's what you mean?), it fetches the available dates from the data, and then checks which ranges are useful.

Maybe we could also have something like "most recent month" or so, but given that it's maybe not the last month, but the one before, it might be confusing?

@fengelniederhammer fengelniederhammer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread website/src/components/pageStateSelectors/DynamicDateFilter.tsx Outdated
@fhennig
fhennig merged commit d9d159f into main Sep 25, 2025
9 checks passed
@fhennig
fhennig deleted the wasap-better-dates branch September 25, 2025 11:44

This branch was successfully deployed

1 active deployment
Preview — 3a1e7386 Deployed Sep 25, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

W-ASAP improve date range filter

3 participants