Fix/book 149 ui fixes * fixed text-overflow issue in datepicker trigger * fixed X missing in booking code text field * fixed toDate not setting properly * fixed spacing issues and placeholder text not fitting * added error message to child age if none is added * spacing fixes * Revert "map link alignment fix" This reverts commit d38cc5b007bc05a1d48ce6661b1052fe714961c3. * fixed EB points padding issue on SAS tablet * maxWidth on BookingCode/voucher * spacing fixes * fixed icons in error message * spacing fixes * scroll to child age picker updates * feat(SW-3706): fix heatmap issue for langswitcher and booking widget * fixed tablet lineup issue Approved-by: Linus Flood
@scandic-hotels/booking-flow
Shared package containing the hotel booking flow functionality used by scandic-web and partner sites.
Configuration
To use the booking flow, two main contexts must be set up: BookingFlowConfig and BookingFlowContext. Both receive injected values from the consuming app.
BookingFlowConfig is static configuration that controls features and behavior (e.g. booking codes enabled), while BookingFlowContext is dynamic state provided by the consuming site (e.g. user authentication status).
The config sets up both a server side and client side context provider. You can use getBookingFlowConfig server side and useBookingFlowConfig client side to access the config values.
The context is only provided client side, and can be accessed using the useBookingFlowContext hook.
There's also some setup required for tRPC to work with the booking flow. See the tRPC context and how it's used in the consuming apps for details.
Translations
Translations for the booking flow components work similarly to other parts of the app, using react-intl. See translations.md for more information on how translations are set up in the apps.
We currently do not dependency inject any translation messages from the consuming apps, so for now all booking-flow translation messages for the different sites are included in all app bundles. This should be improved in the future.
Other
Components that are currently exported but are intended for external use should probably move to design-system or similar in the future.