Skip to content

Add exam date range filter to the courses refine sidebar#4386

Draft
Copilot wants to merge 1 commit into
masterfrom
copilot/add-exam-date-filter
Draft

Add exam date range filter to the courses refine sidebar#4386
Copilot wants to merge 1 commit into
masterfrom
copilot/add-exam-date-filter

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 14, 2026

Adds exam-date filtering to /courses via optional start and end datetime-local inputs in Refine by. When either bound is set, course search applies a range filter on semesterData.examDate.

  • Sidebar filter UI

    • Adds a new DateTimeRangeFilter component for browser-native datetime range input.
    • Renders independent optional Start / End fields under a new Exam Date filter section.
    • Constrains the inputs with reciprocal min / max bounds to avoid inverted ranges.
  • Search query integration

    • Introduces a custom Searchkit accessor that stores partial or complete exam-date bounds.
    • Builds a nested Elasticsearch range filter on semesterData.examDate whenever either bound is present.
    • Exposes the selected range through Searchkit selected filters and clears the filter once both bounds are empty.
  • Courses page wiring

    • Integrates the new filter into ModuleFinderSidebar alongside the existing exam-related filters.
  • Illustrative query shape

    {
      nested: {
        path: 'semesterData',
        query: {
          range: {
            'semesterData.examDate': {
              gte: '2026-04-25T09:00:00.000Z',
              lte: '2026-04-27T18:30:00.000Z',
            },
          },
        },
      },
    }

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
nusmods-export Ignored Ignored Apr 14, 2026 1:11pm
nusmods-website Ignored Ignored Apr 14, 2026 1:11pm

Request Review

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