feat(get-help-statistics): adjust date/numeric picker logic#8434
Open
adi-herwana-nus wants to merge 1 commit into
Open
feat(get-help-statistics): adjust date/numeric picker logic#8434adi-herwana-nus wants to merge 1 commit into
adi-herwana-nus wants to merge 1 commit into
Conversation
adi-herwana-nus
commented
Jun 11, 2026
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
There was a problem hiding this comment.
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
GetHelpFiltercore 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.
- clamp date ranges to valid values on user edit - maintain date range if new start > previous end or vice versa - adjust spreadsheet randomization management
1355bfc to
2e3cfae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.