Skip to content

feat(get-help-statistics): adjust date/numeric picker logic#8434

Open
adi-herwana-nus wants to merge 1 commit into
masterfrom
adi/start-end-date-switching
Open

feat(get-help-statistics): adjust date/numeric picker logic#8434
adi-herwana-nus wants to merge 1 commit into
masterfrom
adi/start-end-date-switching

Conversation

@adi-herwana-nus

Copy link
Copy Markdown
Contributor
  • clamp date ranges to valid values on user edit
  • maintain date range if new start > previous end or vice versa
  • adjust spreadsheet randomization management

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the “Get Help” activity filters to share a common filter component, improves date-range editing behavior, updates validation messaging, and tweaks spreadsheet randomization clamping behavior.

Changes:

  • Introduces a reusable GetHelpFilter core component (with preset date chips and range-clamping logic).
  • Splits date validation messages into “invalid date” vs “end before start” across locales and translation descriptors.
  • Adjusts spreadsheet randomization managers to clamp min/max based on which field was edited.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
client/locales/en.json Updates/introduces validation strings for invalid dates and end-before-start.
client/locales/zh.json Same validation string updates for Chinese locale.
client/locales/ko.json Same validation string updates for Korean locale.
client/app/lib/translations/getHelp.ts Adds endDateBeforeStartDate and updates invalidDateSelection message.
client/app/lib/components/core/GetHelpFilter.tsx New shared filter UI + date range adjustment helper (getFilterForDateChange).
client/app/lib/components/core/test/GetHelpFilter.test.tsx New tests for shared filter behavior and date change helper.
client/app/bundles/system/admin/instance/instance/pages/InstanceGetHelpActivityIndex.tsx Uses new filter fields type + updated date validation messaging.
client/app/bundles/system/admin/instance/instance/components/misc/InstanceGetHelpFilter.tsx Replaces bespoke filter UI with shared GetHelpFilter.
client/app/bundles/system/admin/admin/pages/SystemGetHelpActivityIndex.tsx Uses new filter fields type + updated date validation messaging.
client/app/bundles/system/admin/admin/components/misc/SystemGetHelpFilter.tsx Replaces bespoke filter UI with shared GetHelpFilter.
client/app/bundles/course/statistics/pages/StatisticsIndex/get_help/CourseGetHelpStatistics.tsx Uses new filter fields type + updated date validation messaging.
client/app/bundles/course/statistics/pages/StatisticsIndex/get_help/CourseGetHelpFilter.tsx Replaces bespoke filter UI with shared GetHelpFilter.
client/app/bundles/course/assessment/question/text-responses/components/SpreadsheetRandomizationManager.tsx Clamps numeric/date min/max based on which input was edited.
client/app/bundles/course/assessment/question/text-responses/components/NumericRandomizationManager.tsx Changes onBlur signature to report which key blurred.
client/app/bundles/course/assessment/question/text-responses/components/DateRandomizationManager.tsx Changes onBlur signature to report which key blurred.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/app/bundles/system/admin/admin/pages/SystemGetHelpActivityIndex.tsx Outdated
Comment thread client/app/lib/components/core/GetHelpFilter.tsx
Comment thread client/app/lib/components/core/GetHelpFilter.tsx
Comment thread client/app/lib/components/core/__test__/GetHelpFilter.test.tsx
- clamp date ranges to valid values on user edit
- maintain date range if new start > previous end or vice versa
- adjust spreadsheet randomization management
@adi-herwana-nus adi-herwana-nus force-pushed the adi/start-end-date-switching branch from 1355bfc to 2e3cfae Compare June 11, 2026 03:45
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