Improvement #31535
openImprovement #31248: New Theme based Nextjs application dev analysis
Implement flight search panel
70%
Updated by Sachin Suresh 4 months ago
- Status changed from Assigned to In Progress
Updated by Sachin Suresh 4 months ago
- Due date changed from 12/23/2025 to 12/24/2025
Updated by Sachin Suresh 4 months ago
- % Done changed from 0 to 70
Refactor Airport Selector & Implement Search Validations
- Refactored Airport Selector to use Core/View pattern.
- Removed AirportSelector wrapper; FlightSearchView now composes Core/View directly.
- Implemented Flight Search validations (Empty selection, Same Origin/Dest search).
- Implemented Passenger count validations (Max 9, Infant <= Adult).
- Added ValidationToast component for error handling.
- Integrated validations into FlightSearchCore and PassengerCounterCore.
Fix Passenger Modal Z-Index using React Portal
- Refactored PassengerSelector to use ReactDOM.createPortal.
- This renders the modal at the document root, ensuring it resolves stacking context issues and appears above the header.
Refactor Flight Core components to Hook pattern and reorganize folders
- Refactored AirlineSelectorCore, PassengerCounterCore, FlightSearchCore to use custom hooks (useAirlineAutocomplete, usePassengerCounter, useFlightSearch). - Reorganized src/components/core/flight into grouped directories (airlineselector, airportselector, passengercounter, flightsearch). - Added unit tests for new hooks. - Updated all consumer imports.
Refactor Home Page and Flight Search to use Core Components
- Refactored Home Page to use FlightDealsCore, HotelDealsCore, and TravelPackagesCore. - Added React Query prefetching for Airlines and Packages in Home Page. - Updated FlightSearchPanel to use new Airline/Airport/Passenger Selector components. - Created new Core wrapper components for Airline/Airport selectors using absolute imports. - Added unit tests for useAirlineAutocomplete.
Updated by Sachin Suresh 4 months ago
Simplified Strict Sync Logic (useFlightSearch.ts):
Round Trip: When the Departure Date changes, the Return Date is now updated to be exactly the same as the new Departure Date.
MultiCity: When a leg's date changes, all subsequent legs are automatically updated to match that date strictly, ensuring no gaps.
Smart "Add Flight" Default (flight-store.ts):
When adding a new leg in MultiCity, the default date for the new leg is now set to the previous leg's date (instead of today's date), making it easier to continue the itinerary.
Verification (useFlightSearch.test.ts):
Updated unit tests to verify these strict synchronization rules and ensure the logic is robust.
Updated by Sachin Suresh 4 months ago
- Status changed from In Progress to On hold