fix: exclude past events from All Dates view (#32)#133
Open
ayxsh678 wants to merge 5 commits into
Open
Conversation
✅ Deploy Preview for dueventboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
507b1ba to
a90b920
Compare
Author
|
All CI checks are now passing ✅ Summary of changes:
|
Contributor
|
@ayxsh678 , could you add screenshots or recording of the working feature? |
Author
|
Here's a screenshot @yuvimittal — the "All Dates" view now correctly shows only upcoming events (no past events): |
… past events from All Dates view (data-umbrella#32) - Add explicit 'all' case to date switch filtering out past events - Fix stray character causing 38 parse errors - Update tests to reflect correct All Dates behaviour
9a19927 to
9578cb3
Compare
9578cb3 to
c150b27
Compare
Author
|
I've just cleared the pre-commit cache and re-triggered the CI to ensure everything is running correctly. All checks are now passing green. The PR description and checkboxes are fully updated, and the screenshot of the fix is attached above. This is ready for a final review! @yuvimittal |
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.

This PR fixes [Issue #32] (#32) where past events were incorrectly appearing in the "All Dates" view. The logic has been updated to ensure that "All Dates" strictly refers to all upcoming events, maintaining consistency with the dashboard's purpose.
Changes made:
Added an explicit all case to the date filter switch to exclude events where the date is in the past.
Fixed a stray character in the codebase that was triggering 38 parse errors in the CI/CD pipeline.
Updated existing tests to align with the new expected behavior for the "All Dates" filter.
Cleaned up pre-commit cache issues to ensure a green build.
How to test these changes
Run the application locally: $ npm run dev
Open the web browser at localhost:5173.
Navigate to the event board and select "All Dates" from the date filter dropdown.
Verify: Only events scheduled for today or in the future are displayed. Past events should be hidden.
Run the test suite: $ npm test to verify all tests pass with the new logic.
Pull Request checklists
This PR is a:
[x] bug-fix
[ ] new feature
[ ] maintenance
About this PR:
[x] it includes tests.
[x] the tests are executed on CI.
[x] pre-commit hooks were executed locally.
[ ] this PR requires a project documentation update.
Author's checklist:
[x] I have reviewed the changes and it contains no misspelling.
[x] The code is well commented, especially in the parts that contain more complexity.
[x] New and old tests passed locally.