Skip to content

fix(web): clarify rolling collected date filters - #1885

Open
misaelalves99 wants to merge 1 commit into
DouglasNeuroInformatics:mainfrom
misaelalves99:fix/1785-collected-rolling-periods
Open

misaelalves99 wants to merge 1 commit into
DouglasNeuroInformatics:mainfrom
misaelalves99:fix/1785-collected-rolling-periods

Conversation

@misaelalves99

Copy link
Copy Markdown
Contributor

Closes #1785.

Summary

Clarify the Datahub's rolling collection-date filters so their labels accurately describe the applied time windows.

Changes

  • Replace ambiguous calendar-period labels with explicit rolling-period labels in English, Spanish, and French.
  • Make the remaining collection-date presets consistently describe past periods.
  • Clamp month and year offsets to valid calendar dates, preventing rollover errors at month-end and leap-year boundaries.
  • Reuse shared timeframe calculation logic.
  • Add unit and Playwright regression tests for filter labels and date-window behavior.

Validation

Validated against the original pinned contribution base:

  • Vitest: 29/29 targeted unit tests passed.
  • ESLint / Prettier: all 7 changed files passed.
  • TypeScript: Web, Testing, and API checks passed.
  • Playwright: 8/8 passed (5 setup, 2 targeted regressions, 1 teardown).
  • Scope: exactly 7 files changed, with no additional dependencies or migrations.

The full monorepo suite was not run. The target main has advanced by 41 commits since the validated base; integration with the latest upstream remains subject to CI verification.

Implementation notes

  • Preserves the intended rolling-window semantics instead of introducing calendar-period behavior.
  • Includes regression coverage for shorter months and month-end boundaries.
  • Keeps the change limited to collection-date filtering, shared timeframe logic, and associated tests.

This branch has not been deployed

No deployments
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.

Datahub Collected filter labels rolling windows as This week, This month and This year

1 participant