feature(SAS): add simple url for entering the booking flow /[lang]/book-hotel/[city] * Merged in fix/book-115-hidden-focus-indicators (pull request #2925) Fix/book 115 hidden focus indicators * added focus ring to "how it works" text and close button in modal * fix(BOOK-115): added focus ring to Hotel Sidepeek close button * fix(BOOK-115): enabled selecting ancillaries with keyboard nav * fix(BOOK-115): added focus indicator to "View and print receipt" in Manage Stay * fix(BOOK-105 & BOOK-115): combined the two radio groups in payment selection to one, fixes focus indicator issue * fix(BOOK-115): added focus indicator to shortcut links * fix(BOOK-115): updated ancillaries keyboard selection * fix(BOOK-115): removed tabIndex from Link component * fix(BOOK-115): fixed single payment radio button not focusable * fix(BOOK-115): updated to onKeyDown * added id to "credit card" * removed toUpperCase() on lables * removed brackets * moved the focus indicator to the DS Button component * removed !important from ButtonLink css * changed <label> to <fieldset> and <legend> and added aria… * Merged in feat/sw-3596-console (pull request #3100) feat(SW-3596): added lint rule for no console.log. Use logger instead. * feat(SW-3596): added lint rule for no console.log. Use logger instead. Approved-by: Joakim Jäderberg * Merged in fix/BOOK-457-select-rate-lowestroomprice- (pull request #3061) * Fix(BOOK-457): Reduced lowestRoomPrice tracking call from multiple times to one * fix(BOOK-457): feat(SW-3590): Included RoomsLoadedEvent on select-rate page Approved-by: Linus Flood * Merged in feature/SW-3506-refresh-tokens (pull request #3064) feature(SW-3506): refresh-tokens setup for SAS Eurobonus * feature(SW-3506): refresh-tokens setup for SAS Eurobonus * Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/SW-3506-refresh-tokens Approved-by: Anton Gunnarsson * Merged in feat/BOOK-434-users-should-redirect-to- (pull request #3087) * feat(BOOK-434): Redirect user to city/country page if wrong filter url * feat(BOOK-434): Handled map view Approved-by: Erik Tiekstra * Merged in fix/SW-3553-logged-in-details- (pull request #3073) * fix(SW-3553): Fixed screen scolled & locked on click of menu Approved-by: Joakim Jäderberg * Merged in feat/book-522-align (pull request #3101) feat(BOOK-522): align items in topmenu, header and booking widget * feat(BOOK-522): align items in topmenu, header and booking widget * Delete old css variable and use new * Fixed underline on icons Approved-by: Erik Tiekstra * Merged in fix/LOY-444-points-to-keep-left-text (pull request #3086) fix(LOY-444): fix markerLabel text when left aligned * fix(LOY-444): fix markerLabel text when left aligned Approved-by: Matilda Landström * Merged in chore/replace-graphql-tag/loader (pull request #3096) Use turbopack for dev builds. Remove graphql-tag/loader, replaced by gql`` tag literals instead. Approved-by: Linus Flood * Merged in fix/system-fragment (pull request #3102) fix: faulty system fragment * fix: faulty system fragment Approved-by: Linus Flood * fix(BOOK-498): removed and changed z-index values to have booking widget overlapping correctly on mobile. Approved-by: Bianca Widstam Approved-by: Hrishikesh Vaipurkar * Merged in revert-gql (pull request #3104) Revert gql * Revert "Merged in fix/system-fragment (pull request #3102)" This reverts commit0d479eb337. * Revert "Merged in chore/replace-graphql-tag/loader (pull request #3096)" This reverts commite9bd159e98. * Merged in fix/BOOK-438-breadcrumbs-seo-filter (pull request #3103) feat(BOOK-438): add breadcrumbs on seofilter pages * feat(BOOK-438): add breadcrumbs on seofilter pages * feat(BOOK-438): remove unused function Approved-by: Hrishikesh Vaipurkar * Merged in chore/regular-price-tests (pull request #3075) chore: Add tests for regular price calculations * Add tests for calculateRegularPrice * Add tests for getRegularPrice * Add multiroom test Approved-by: Joakim Jäderberg Approved-by: Linus Flood * Merged in fix/wrap-webviews-with-sessionprovider (pull request #3111) Wrap webviews with SessionProvider * wrap webviews with sessionprovider Approved-by: Linus Flood * feat(BOOK-488): Trimming booking code before validating Approved-by: Bianca Widstam * feat(BOOK-472): Different placement of no availability alert on mobile viewports Approved-by: Bianca Widstam * Merged in feat/sw-3601-hookfix (pull request #3113) Feat(SW-3601): useIsUserLoggedIn needs to check webview token * fix(SW-3601): useIsUserLoggedIn needs to check webview token * Check if we have webview token as well * . Approved-by: Joakim Jäderberg * Merged in fix/add-missing-partner-data (pull request #3116) fix: Add param to getScandicUser for extended data * Add param to getScandicUser for extended data Approved-by: Linus Flood * Merged in feat/sw-3596-cache (pull request #3106) feat(SW-3598): Don't call redis api if cachetime=0 * feat(SW-3596): no cache if ttl=0 * Fixed on set as well * No cache if redemption * Revert no cache if redemption Approved-by: Joakim Jäderberg * feat(BOOK-212): Refactored LoginButton and added successful tracking functionality Approved-by: Linus Flood * Merged in fix/document-undefined (pull request #3118) Fix/document undefined * fix: check if document is undefined * fix: check if document is undefined Approved-by: Linus Flood * Merged in feat/sw-3604-webviews (pull request #3123) feat(SW-3604): wrap mystay with bookingflowconfig * feat(SW-3604): wrap mystay with bookingflowconfig Approved-by: Joakim Jäderberg * Merged in feature/turbopack (pull request #3117) Feature/turbopack * . * . * pin import-in-the-middle * update marker * revert back to using *.graphql.ts Approved-by: Linus Flood * Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/simple-sas-book-url
Scandic Monorepo
This is the monorepo for Scandic Hotels' web projects. It includes multiple apps and packages that together make up the Scandic Hotels web ecosystem.
What's inside?
Apps
Inside the /apps directory, you'll find our standalone sites and APIs:
scandic-web: Next.js app for our public website scandichotels.com.scandic-redirect: Netlify Functions that handle redirects forscandic-web.partner-sas: Next.js app for our partner site sas.scandichotels.com. (⚠️ Work in progress ⚠️)redis-api: API wrapping Redis that we use for caching.
Packages
Inside the /packages directory, you'll find our shared libraries and utilities:
design-system: A shared library of styles and components used by our React apps.booking-flow: This is our booking flow that is used by bothscandic-webandpartner-sas. It's built to be used by a Next.js app.trpc: A tRPC data layer that connects our apps and packages to the backend APIs.common: A collection of shared utilities, helpers and types used across both our apps and our packages.typescript-config: Shared TypeScript configs for all apps and packages.
A note about dependencies between our apps and packages: In general all apps are allowed to depend on any package, but packages have a few caveats:
design-systemshould never import frombooking-flowortrpc.commonshould never import from anything excepttypescript-config.
Getting Started
To get started, clone this repository and run yarn install in the root directory. We use Turbo to handle our monorepo tasks.
See package.json for all available scripts, but here's the most commonly used:
yarn dev:web: Start the development server for thescandic-webapp.yarn dev:sas: Start the development server for thepartner-sasapp.yarn dev:ds: Start the development server for thedesign-systempackage.yarn lint: Run ESLint and type checking across all apps and packages.yarn test: Run tests for the codebase.
If this is the first time you are running one of our apps you can run yarn env:web or yarn env:sas to see what environment variables you need for those apps.
For more details see the respective apps and packages' README files.