From ed55f966c7e6085658345aacc64646e9f669931c Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Mon, 7 Oct 2024 09:17:04 +0200 Subject: [PATCH 01/44] feat/sw-561: some design tweaks for container widths --- app/[lang]/(live)/(protected)/my-pages/layout.module.css | 2 ++ .../(live)/(public)/[contentType]/[uid]/layout.module.css | 2 ++ app/[lang]/(live)/(public)/hotelreservation/layout.module.css | 2 ++ components/HotelReservation/HotelCard/hotelCard.module.css | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/[lang]/(live)/(protected)/my-pages/layout.module.css b/app/[lang]/(live)/(protected)/my-pages/layout.module.css index bee1488c6..a2ff660c4 100644 --- a/app/[lang]/(live)/(protected)/my-pages/layout.module.css +++ b/app/[lang]/(live)/(protected)/my-pages/layout.module.css @@ -5,6 +5,8 @@ gap: var(--Spacing-x3); grid-template-rows: auto 1fr; min-height: 100dvh; + max-width: var(--max-width); + margin: 0 auto; } .content { diff --git a/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.module.css b/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.module.css index edd0b9f96..af1b93963 100644 --- a/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.module.css +++ b/app/[lang]/(live)/(public)/[contentType]/[uid]/layout.module.css @@ -5,4 +5,6 @@ gap: var(--Spacing-x3); grid-template-rows: auto 1fr; position: relative; + max-width: var(--max-width); + margin: 0 auto; } diff --git a/app/[lang]/(live)/(public)/hotelreservation/layout.module.css b/app/[lang]/(live)/(public)/hotelreservation/layout.module.css index 4478bdb18..e12cfcba6 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/layout.module.css +++ b/app/[lang]/(live)/(public)/hotelreservation/layout.module.css @@ -1,3 +1,5 @@ .layout { min-height: 100dvh; + max-width: var(--max-width); + margin: 0 auto; } diff --git a/components/HotelReservation/HotelCard/hotelCard.module.css b/components/HotelReservation/HotelCard/hotelCard.module.css index a6c4a892d..9bb66cfd3 100644 --- a/components/HotelReservation/HotelCard/hotelCard.module.css +++ b/components/HotelReservation/HotelCard/hotelCard.module.css @@ -9,7 +9,7 @@ background-color: var(--Base-Surface-Primary-light-Normal); border: 1px solid var(--Base-Border-Subtle); border-radius: var(--Corner-radius-Medium); - width: 307px; + width: 100%; } .imageContainer { @@ -72,7 +72,7 @@ "image hotel" "image prices"; overflow: hidden; - width: 1050px; + width: 100%; padding: 0; } From 158472524f31f2b727e4a29492d9001e344a811e Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Mon, 7 Oct 2024 14:10:25 +0200 Subject: [PATCH 02/44] More design fixes --- components/ContentType/HotelPage/hotelPage.module.css | 1 + components/HotelReservation/HotelCard/hotelCard.module.css | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ContentType/HotelPage/hotelPage.module.css b/components/ContentType/HotelPage/hotelPage.module.css index eda544de8..9d38ca1da 100644 --- a/components/ContentType/HotelPage/hotelPage.module.css +++ b/components/ContentType/HotelPage/hotelPage.module.css @@ -62,6 +62,7 @@ ); /* Full height without the header + booking widget */ max-height: 935px; /* Fixed max according to figma */ overflow: hidden; + width: 100%; } .pageContainer > nav { diff --git a/components/HotelReservation/HotelCard/hotelCard.module.css b/components/HotelReservation/HotelCard/hotelCard.module.css index 9bb66cfd3..0ffa5b150 100644 --- a/components/HotelReservation/HotelCard/hotelCard.module.css +++ b/components/HotelReservation/HotelCard/hotelCard.module.css @@ -72,7 +72,6 @@ "image hotel" "image prices"; overflow: hidden; - width: 100%; padding: 0; } From 801da501206c6803e7a23cc4c31bd51003c3d8a8 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Mon, 7 Oct 2024 14:22:43 +0200 Subject: [PATCH 03/44] Remove unnecessary css --- components/ContentType/HotelPage/hotelPage.module.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/ContentType/HotelPage/hotelPage.module.css b/components/ContentType/HotelPage/hotelPage.module.css index 9d38ca1da..c5dd0a038 100644 --- a/components/ContentType/HotelPage/hotelPage.module.css +++ b/components/ContentType/HotelPage/hotelPage.module.css @@ -1,7 +1,5 @@ .pageContainer { display: grid; - max-width: var(--max-width); - margin: 0 auto; grid-template-areas: "hotelImages" "tabNavigation" From 915657bf156295b84388121d321488ec4184c5b4 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Mon, 7 Oct 2024 14:33:08 +0200 Subject: [PATCH 04/44] Fix for current navigation --- components/Current/Header/MainMenu/mainMenu.module.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Current/Header/MainMenu/mainMenu.module.css b/components/Current/Header/MainMenu/mainMenu.module.css index 122abdc4f..a7677e895 100644 --- a/components/Current/Header/MainMenu/mainMenu.module.css +++ b/components/Current/Header/MainMenu/mainMenu.module.css @@ -9,6 +9,8 @@ width: 100%; z-index: 99999; height: var(--current-mobile-site-header-height); + max-width: var(--max-width-navigation); + margin: 0 auto; } .container { From 155b6683c48d2702ba87d9820769da930db346f1 Mon Sep 17 00:00:00 2001 From: Simon Emanuelsson Date: Tue, 8 Oct 2024 11:06:09 +0200 Subject: [PATCH 05/44] feat: rename form/card to form/choicecard --- .../HotelReservation/EnterDetails/BedType/index.tsx | 6 ++---- .../EnterDetails/Breakfast/index.tsx | 6 ++---- .../HotelReservation/EnterDetails/Details/index.tsx | 5 +++-- .../Form/{Card => ChoiceCard}/Checkbox.tsx | 4 ++-- .../Form/{Card => ChoiceCard}/Radio.tsx | 4 ++-- .../Form/{Card => ChoiceCard/_Card}/card.module.css | 0 .../Form/{Card => ChoiceCard/_Card}/card.ts | 13 +++++++------ .../Form/{Card => ChoiceCard/_Card}/index.tsx | 6 +++--- 8 files changed, 21 insertions(+), 23 deletions(-) rename components/TempDesignSystem/Form/{Card => ChoiceCard}/Checkbox.tsx (58%) rename components/TempDesignSystem/Form/{Card => ChoiceCard}/Radio.tsx (57%) rename components/TempDesignSystem/Form/{Card => ChoiceCard/_Card}/card.module.css (100%) rename components/TempDesignSystem/Form/{Card => ChoiceCard/_Card}/card.ts (73%) rename components/TempDesignSystem/Form/{Card => ChoiceCard/_Card}/index.tsx (94%) diff --git a/components/HotelReservation/EnterDetails/BedType/index.tsx b/components/HotelReservation/EnterDetails/BedType/index.tsx index 61633cdcf..955ce740b 100644 --- a/components/HotelReservation/EnterDetails/BedType/index.tsx +++ b/components/HotelReservation/EnterDetails/BedType/index.tsx @@ -5,7 +5,7 @@ import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" import { KingBedIcon } from "@/components/Icons" -import RadioCard from "@/components/TempDesignSystem/Form/Card/Radio" +import RadioCard from "@/components/TempDesignSystem/Form/ChoiceCard/Radio" import { bedTypeSchema } from "./schema" @@ -24,9 +24,7 @@ export default function BedType() { reValidateMode: "onChange", }) - // @ts-expect-error - Types mismatch docs as this is - // a pattern that is allowed https://formatjs.io/docs/react-intl/api#usage - const text = intl.formatMessage( + const text = intl.formatMessage( { id: "Included (based on availability)" }, { b: (str) => {str} } ) diff --git a/components/HotelReservation/EnterDetails/Breakfast/index.tsx b/components/HotelReservation/EnterDetails/Breakfast/index.tsx index b8f00ec83..8551e12dc 100644 --- a/components/HotelReservation/EnterDetails/Breakfast/index.tsx +++ b/components/HotelReservation/EnterDetails/Breakfast/index.tsx @@ -5,7 +5,7 @@ import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" import { BreakfastIcon, NoBreakfastIcon } from "@/components/Icons" -import RadioCard from "@/components/TempDesignSystem/Form/Card/Radio" +import RadioCard from "@/components/TempDesignSystem/Form/ChoiceCard/Radio" import { breakfastSchema } from "./schema" @@ -31,9 +31,7 @@ export default function Breakfast() { Icon={BreakfastIcon} id={breakfastEnum.BREAKFAST} name="breakfast" - // @ts-expect-error - Types mismatch docs as this is - // a pattern that is allowed https://formatjs.io/docs/react-intl/api#usage - subtitle={intl.formatMessage( + subtitle={intl.formatMessage( { id: "{amount} {currency}/night per adult" }, { amount: "150", diff --git a/components/HotelReservation/EnterDetails/Details/index.tsx b/components/HotelReservation/EnterDetails/Details/index.tsx index 2dd1b1cdb..15792e384 100644 --- a/components/HotelReservation/EnterDetails/Details/index.tsx +++ b/components/HotelReservation/EnterDetails/Details/index.tsx @@ -4,7 +4,7 @@ import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" import Button from "@/components/TempDesignSystem/Button" -import CheckboxCard from "@/components/TempDesignSystem/Form/Card/Checkbox" +import CheckboxCard from "@/components/TempDesignSystem/Form/ChoiceCard/Checkbox" import CountrySelect from "@/components/TempDesignSystem/Form/Country" import Input from "@/components/TempDesignSystem/Form/Input" import Phone from "@/components/TempDesignSystem/Form/Phone" @@ -88,8 +88,9 @@ export default function Details({ user }: DetailsProps) {