Filter Conferences by Date Range#761
Conversation
Work in progress tech-conferences#749
|
Looks good. But there is a compile error |
I finally got it lol |
|
Hey @JuanPabloDiaz, thank you for this proposal and this PR! In terms of usability, how about only showing months instead of full dates in the picker? I'm even thinking, only showing one month, to be like: "show me conference after this date". If we were to keep start and end date, I would like the filter to update as soon as I select the start date. Meaning: I don't need to select the end date to see the conference list change. |
|
|
||
| const handleStartDateSelect = (date: Date | null) => { | ||
| if (date) { | ||
| setStartDate(date) |
There was a problem hiding this comment.
Don't you want to handle when the user empties the input? (comment is meant for the line above)
| .dateRangePicker { | ||
| display: flex; | ||
| width: 400px; | ||
| padding: 2px; |
There was a problem hiding this comment.
wow, I had to zoom in to see that.
Great catch! I will work on it
Co-authored-by: Nima Izadi <[email protected]>
style: update formatting in .prettierrc refactor: add eslint-disable comments in heroku-start script
|
I am happy with how it turns out. Here is the summary of this PR: date.movThis pull request introduces a date range filter to the Conference List page, allowing users to filter conferences by start and end dates. It also includes styling updates and minor code improvements. Below is a summary of the most important changes: 🎉 New! Filter conferences by date range
Styling Updates
Minor Improvements
|
nimzco
left a comment
There was a problem hiding this comment.
A few comments, but it looks good!
When selecting a start date, I would expect the results to change. They don't until we select the end date.
We could also auto-open the end-date after selecting the start-date, but I would start filtering already.
UI:
- The height of the inputs are not the same with the search
- The X is not center-aligned.
- Filter results immediately on start date selection - Auto-focus end date picker for better UX - Fix alignment between search box and date inputs - Enhance date range overlap detection - Improve dark mode and accessibility
|
Thanks for your feedback @nimzco! I've implemented your suggestions, and everything should now be working as you requested. fixed.movfeat: improve date filtering UX and fix input alignment
|
I follow his feedback and I've implemented his suggestions
| .Search { | ||
| margin-bottom: spacing.spacing(); | ||
| width: 100%; | ||
| margin: 0; // Remove bottom margin that might affect alignment |
There was a problem hiding this comment.
I restored margin-bottom. I though it was conflicting with the aligment but its not longer a problem.
|
When testing locally, the conference list don't update anymore after I change the dates. |
Hmm, it doesn’t update when you only change the dates @nimzco? It works for me when I test the date filter alone. I still need to work on how this new feature interacts with other filters when combined. |
|
Thanks @nimzco! You're absolutely right. Date filtering was client-side while other filters were server-side, causing conflicts. Fixed! Moved date filtering to Algolia level so it works with other filters. Should be working now! 🎯 |
| .dateRangePicker { | ||
| display: flex !important; | ||
| flex-direction: row !important; // Force it to be in a row | ||
| gap: 0.5rem !important; | ||
| align-items: center !important; | ||
| padding: 0.5rem !important; | ||
|
|
||
| .customDatePicker { | ||
| border: 1px solid #d1d5db !important; | ||
| padding: 0.25rem !important; | ||
| width: auto !important; | ||
| max-width: 12rem !important; | ||
| height: 35px !important; | ||
| color: black !important; | ||
| border-radius: 0.375rem !important; | ||
| } | ||
| } |
There was a problem hiding this comment.
Are you sure all of this is needed? I don't see the CSS applied and if I remove the code, the behavior is still the same. 🤔
There was a problem hiding this comment.
you are right, I forgot to remove that. I add it in this commit but we no longer need it.
nimzco
left a comment
There was a problem hiding this comment.
Aside of my last comment. I've tested locally, and it works as expected. 🚢
Thanks for the feature addition!



Reference #749

react-datepicker