Commit Graph

17 Commits

Author SHA1 Message Date
Anton Gunnarsson
4e1cb01b84 Merged in chore/cleanup-after-trpc-migration (pull request #2457)
Chore/cleanup after trpc migration

* Clean up TODOs

* Rename REDEMPTION constant to SEARCH_TYPE_REDEMPTION

* Update dependencies

Remove unused deps from scandic-web
Add missing deps to trpc package

* Update self-referencing imports

* Remove unused variables from scandic-web env

* Fix missing graphql-tag package

* Actually fix

* Remove unused env var


Approved-by: Christian Andolf
Approved-by: Linus Flood
2025-06-30 12:08:19 +00:00
Anton Gunnarsson
bbcabfa0ba Merged in feat/sw-2864-move-hotels-router-to-trpc-package (pull request #2410)
feat (SW-2864): Move booking router to trpc package

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Move booking router to trpc package

* Merge branch 'master' into feat/sw-2864-move-hotels-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 09:02:59 +00:00
Anton Gunnarsson
002d093af4 Merged in feat/sw-2863-move-contentstack-router-to-trpc-package (pull request #2389)
feat(SW-2863): Move contentstack router to trpc package

* Add exports to packages and lint rule to prevent relative imports

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 07:53:01 +00:00
Bianca Widstam
5b90e15746 Merged in fix/SW-2626-error-message-multiroom-reward (pull request #2299)
fix(SW-2626): add multiroom reward error message for mobile

* fix(SW-2626): add multiroom reward error message for mobile

* fix(SW-2626): error message to red color

* fix(SW-2626): fix errorContainer

* fix(SW-2626): fix button fullwidth

* fix(SW-2626): fix button fullwidth

* fix(SW-2626): add design

* fix(SW-2626): add new colors for checkbox

* fix(SW-2626): new color for input

* fix(SW-2626): fix pr comment

* fix(SW-2626): final ui for desktop and mobile


Approved-by: Hrishikesh Vaipurkar
2025-06-12 12:51:37 +00:00
Linus Flood
81887c83ff Merged in feat/sw-1245-bw-button-update (pull request #2262)
Feat/sw 1245 - Booking widget - change button text when new values

* feat(sw-1245) - use isDirty to update button text

* Change text only in booking flow

* Revert test code


Approved-by: Michael Zetterberg
2025-06-02 13:37:53 +00:00
Tobias Johansson
b641f8387e Merged in fix/SW-2534-booking-widget-fixes (pull request #2129)
fix(SW-2534): Added validation error and fixed initial month in date picker for BW

* Merged in revert-version (pull request #2128)

revert including version in layouts and api responses

* revert including version in layouts and api responses


Approved-by: Linus Flood

* feat: prevent users from selecting the same room when there is no vacancy for it

* Merged in fix/no-my-stay-for-external-bookings (pull request #2126)

fix: Only link web and app bookings to my stay

Approved-by: Joakim Jäderberg

* Merged in fix/bookingwidget-fixes (pull request #2135)

Fix: (#SW-2663) bookingwidget mobile - Space around, border-radius and correct color on date field

* fix: booking widget mobile - padding around booking widget and date color

* Fixed rounded corners

* Reduced minimum size of column


Approved-by: Joakim Jäderberg

* Merged in fix/LOY-105-signupform-error-messages (pull request #2121)

feat(LOY-105): update signup form validation messages

* feat(LOY-105): improve signup form validation messages


Approved-by: Erik Tiekstra

* fix(LOY-199): add missing benefits link

* Merged in feat/SW-2340-aa-tracking-my-stay-pageview- (pull request #2133)

feat: SW-2340 Implemented tracking on my-stay, webview my-stay and receipt page

* feat: SW-2340 Implemented tracking on my-stay, webview my-stay and receipt page

* feat: SW-2340 Updated webview tracking

* feat: SW-2340 Updated receipt tracking


Approved-by: Linus Flood

* Merged in fix/SW-2804-missing-meeting-rooms (pull request #2138)

fix: return [] when we get a 404 for meeting rooms for a hotel

* fix: return [] when we get a 404 for meeting rooms for a hotel


Approved-by: Linus Flood

* feat(auth): limit output in session endpoint

* fix(SW-2376): Vertically centered previous/next buttons inside carousel cards

Approved-by: Matilda Landström

* fix(SW-2055): Surrounded ul inside JsonToHtml with a typography component

Approved-by: Matilda Landström

* fix(SW-2621): Breaking too long words on heading inside destination city pages

Approved-by: Matilda Landström

* Merged in fix/sw-2763-external-scripts (pull request #2104)

fix: try/catch external scripts to avoid them breaking our page #sw-2763

* fix: try/catch external scripts to avoid them breaking our page #sw-2763


Approved-by: Joakim Jäderberg

* fix: handle non loaded surprises in case they're returned as null from server

* feat(SW-2806): booking widget should not be blocked by sitewide alert

* Merged in fix/remove-on-error (pull request #2142)

fix: revert onError on the Script component

* fix: revert onError on the Script component

* Merged in fix/alert-icon (pull request #2139)

fix(SW-2807): alert icons

* fix(SW-2807): fix incorrect icon color on sitewide alert

* fix(SW-2807): change error icon


Approved-by: Erik Tiekstra
Approved-by: Linus Flood

* Merged in feat/SW-2760-SW-552-wellness-openinghours (pull request #2112)

fix(SW-2760, SW-2552): fix opening hours wellness sidepeek

* fix(SW-2760, SW-2552): fix opening hours wellness sidepeek


Approved-by: Erik Tiekstra

* Merged in feat/SW-1749-sidepeek-hotel-cta (pull request #2123)

feat(SW-1749): add link to hotel page in sidepeek

* feat(SW-1749): add link to hotel page in sidepeek


Approved-by: Matilda Landström

* fix(SW-2811): suggest list should follow where-to-field

* fix(SW-2451): placement of suggest list

* Merged in fix/SW-2684-booking-widget-text-overflow (pull request #2048)

fix(SW-2684): truncate overflowing text in booking widget

* fix: truncate overflowing text in booking widget

* fix: change Body to Typography and css selector fix


Approved-by: Hrishikesh Vaipurkar

* Merged in feat/SW-2800-lightbox-history-state (pull request #2147)

feat(SW-2800): closing image gallery and lightbox on using browser navigation

* feat(SW-2800): closing image gallery and lightbox on using browser navigation


Approved-by: Linus Flood

* Merged in fix/enter-details-footer-margin (pull request #2150)

fix: margin to footer on enter details

* fix: margin to footer on enter details

* Merged in fix/SW-2822-missing-meetingroom-images (pull request #2151)

fix: meeting rooms with missing images

* fix: meeting rooms with missing images


Approved-by: Linus Flood


Approved-by: Bianca Widstam
2025-05-20 06:49:27 +00:00
Joakim Jäderberg
52c99e8767 Merged in fix/SW-2457-destination-page-search-for-countries (pull request #1873)
* fix: able to search for countries on destinationpage
* fix: filter out only desired types when using autocomplete

Approved-by: Linus Flood
2025-04-29 06:19:25 +00:00
Joakim Jäderberg
b98d6c10c0 Merged in fix/SW-2253-consolidate-autocomplete-search (pull request #1795)
Consolidate autocomplete search SW-2253 SW-2338

* use fuse.js for fuzzy search
* Handle weird behaviour when search field loses focus on destinationPage
* Add error logging for JumpTo when no URL was provided
* Switch to use <Typography /> over <Caption />
* fix: bookingWidget search label should always be red
* fix: searchHistory can no longer add invalid items
* fix: list more hits when searching
* fix: issue when searchField value was undefined
* fix: don't show searchHistory label if no searchHistory items
* simplify skeleton for listitems in search

Approved-by: Linus Flood
2025-04-17 06:39:42 +00:00
Michael Zetterberg
440e1f92df feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass 2025-04-14 11:30:06 +00:00
Joakim Jäderberg
da07e8a458 Merged in feature/autocomplete-search (pull request #1725)
Feature/autocomplete search

* wip autocomplete search

* add skeletons to loading

* Using aumlauts/accents when searching will still give results
remove unused reducer
sort autocomplete results

* remove testcode

* Add tests for autocomplete

* cleanup tests

* use node@20

* use node 22

* use node22

* merge
fix: search button outside of viewport

* merge

* remove more unused code

* fix: error message when empty search field in booking widget

* fix: don't display empty white box when search field is empty and no searchHistory is present

* merge

* fix: set height of shimmer for search skeleton

* rename autocomplete trpc -> destinationsAutocomplete

* more accute cache key naming

* fix: able to control wether bookingwidget is visible on startPage
fix: sticky booking widget under alert

* remove unused code

* fix: skeletons
fix: error overlay on search startpage

* remove extra .nvmrc

* merge


Approved-by: Linus Flood
2025-04-09 10:43:08 +00:00
Matilda Landström
1239f0c662 Merged in feat/SW-1711-SW-2077-icons (pull request #1709)
Fix(SW-1711)/(SW-2077): Export icons individually

* fix(SW-1711): export icons individually


Approved-by: Michael Zetterberg
Approved-by: Erik Tiekstra
2025-04-07 07:25:25 +00:00
Christian Andolf
d4f5aea31c chore: add missing type to watch 2025-04-04 09:06:42 +02:00
Christian Andolf
14f9b68365 chore: Cleanup booking widget with types and other minor issues 2025-04-04 09:06:42 +02:00
Joakim Jäderberg
3c810d67a2 Merged in feature/SW-1736-foating-booking-widget (pull request #1696)
Feature/SW-1736 floating booking widget

* feature: Add floating booking widget on start page SW-1736

* fix: Make sure we don't try to use IntersectionObserver on the server

* fix: make sure that we disconnect the intersectionobserver when dismounting

* fix: pass searchparams to floating bookingwidget


Approved-by: Michael Zetterberg
2025-04-04 06:52:37 +00:00
Matilda Landström
5de2a993a7 Merged in feat/SW-1711-switch-icons (pull request #1558)
Switches out all the old icons to new ones, and moves them to the design system. The new icons are of three different types: Materialise Symbol, Nucleo, and Customized. Also adds further mapping between facilities/amenities and icons.

Approved-by: Michael Zetterberg
Approved-by: Erik Tiekstra
2025-03-27 09:42:52 +00:00
Hrishikesh Vaipurkar
2cd1b6c72c feat: SW-963 Implemented error states and handling booking code and multiroom 2025-03-06 12:41:11 +00:00
Anton Gunnarsson
80100e7631 Merged in monorepo-step-1 (pull request #1080)
Migrate to a monorepo setup - step 1

* Move web to subfolder /apps/scandic-web

* Yarn + transitive deps

- Move to yarn
- design-system package removed for now since yarn doesn't
support the parameter for token (ie project currently broken)
- Add missing transitive dependencies as Yarn otherwise
prevents these imports
- VS Code doesn't pick up TS path aliases unless you open
/apps/scandic-web instead of root (will be fixed with monorepo)

* Pin framer-motion to temporarily fix typing issue

https://github.com/adobe/react-spectrum/issues/7494

* Pin zod to avoid typ error

There seems to have been a breaking change in the types
returned by zod where error is now returned as undefined
instead of missing in the type. We should just handle this
but to avoid merge conflicts just pin the dependency for
now.

* Pin react-intl version

Pin version of react-intl to avoid tiny type issue where formatMessage
does not accept a generic any more. This will be fixed in a future
commit, but to avoid merge conflicts just pin for now.

* Pin typescript version

Temporarily pin version as newer versions as stricter and results in
a type error. Will be fixed in future commit after merge.

* Setup workspaces

* Add design-system as a monorepo package

* Remove unused env var DESIGN_SYSTEM_ACCESS_TOKEN

* Fix husky for monorepo setup

* Update netlify.toml

* Add lint script to root package.json

* Add stub readme

* Fix react-intl formatMessage types

* Test netlify.toml in root

* Remove root toml

* Update netlify.toml publish path

* Remove package-lock.json

* Update build for branch/preview builds


Approved-by: Linus Flood
2025-02-26 10:36:17 +00:00