Fix: refactor booking flow search params * wip: apply codemod and upgrade swc plugin * wip: design-system to react 19, fix issues from async (search)params * Prepare new parse function for booking flow search params * Prepare serialize function for booking flow search params * Improve handling of comma separated arrays * Slightly refactor for readability * Next abstracts URLSearchParams so handle the abstraction instead * Refactor booking widget to use new search params parsing * Rename search param functions * Refactor select-hotel to use new search param parser * Use new search params parser in select-rate and details * Fix hotelId type * Avoid passing down search params into BookingWidget components * More updates to use new types instead of SearchParams<T> * Remove types SelectHotelSearchParams and AlternativeSelectHotelSearchParams * Fix parseBookingWidgetSearchParams return type * Add error handling to booking search param parsers * Fix modifyRateIndex handling in details page * Clean up * Refactor booking widget search param serializing to util function * Move start page booking widget search param parsing to page * Use new search param serializer in HandleErrorCallback * Delete convertSearchParamsToObj & convertObjToSearchParams Approved-by: Michael Zetterberg
Booking flow
The booking flow is the user journey of booking one or more rooms at our hotels. Everything from choosing the date to payment and confirmation is part of the booking flow.
Booking widget
On most of the pages on the website we have a booking widget. This is where the user starts the booking flow, by filling the form and submit. If they entered a city as the destination they will land on the select hotel page and if they entered a specific hotel they will land on the select rate page.
Select hotel
Lists available hotels based on the search criteria. When the user selects a hotel they land on the select rate page.
Select rate, room, breakfast etc
This is a page with an accordion like design, but every accordion is handled as its own page with its own URL.
State management
The state, like search parameters and selected alternatives, is kept throughout the booking flow in the URL.