From c4be1f5834fdd682015fd6b81c21483229d2d2e0 Mon Sep 17 00:00:00 2001 From: Ivan Melnik Date: Wed, 4 Dec 2024 11:35:58 +0200 Subject: [PATCH] fix: event mobile layout --- src/common/components/table/table.module.scss | 9 +- src/domain/app/header/Header.tsx | 4 +- .../__snapshots__/Header.test.tsx.snap | 176 +++++++++--------- .../__snapshots__/PageLayout.test.tsx.snap | 176 +++++++++--------- src/domain/app/layout/pageLayout.module.scss | 2 + .../event/eventImage/eventImage.module.scss | 9 +- src/domain/event/eventPage.module.scss | 27 ++- .../event/occurrences/occurrences.module.scss | 9 +- 8 files changed, 221 insertions(+), 191 deletions(-) diff --git a/src/common/components/table/table.module.scss b/src/common/components/table/table.module.scss index 21943f62..bc86235e 100644 --- a/src/common/components/table/table.module.scss +++ b/src/common/components/table/table.module.scss @@ -2,6 +2,8 @@ .tableWrapper { max-width: 100%; + overflow-x: auto; + white-space: nowrap; } .table { @@ -15,6 +17,7 @@ --fontsize-cell-header: var(--fontsize-body-l); --margin-bottom-table: var(--spacing-m); --spacing-cell: var(--spacing-m) var(--spacing-xs); + --spacing-cell-mobile: var(--spacing-xs) var(--spacing-xs); --expanded-row-border-color: var(--color-black-30); width: 100%; @@ -27,10 +30,11 @@ font-size: var(--fontsize-cell-header); font-weight: normal; text-align: left; - padding: var(--spacing-cell); + padding: var(--spacing-cell-mobile); border-bottom: 1px solid var(--border-color-cell); @include respond-above(l) { + padding: var(--spacing-cell); &:nth-child(2) { padding-left: 0; } @@ -60,9 +64,10 @@ font-size: var(--fontsize-cell); font-weight: normal; text-align: left; - padding: var(--spacing-cell); + padding: var(--spacing-cell-mobile); @include respond-above(l) { + padding: var(--spacing-cell); &:nth-child(2) { padding-left: 0; } diff --git a/src/domain/app/header/Header.tsx b/src/domain/app/header/Header.tsx index bb0560c8..f20a6cd0 100644 --- a/src/domain/app/header/Header.tsx +++ b/src/domain/app/header/Header.tsx @@ -104,7 +104,7 @@ const Header: React.FC = () => { }; return ( -
+ <> { getPathnameForLanguage={getPathnameForLanguage} /> -
+ ); }; diff --git a/src/domain/app/header/__tests__/__snapshots__/Header.test.tsx.snap b/src/domain/app/header/__tests__/__snapshots__/Header.test.tsx.snap index ced8361a..170f877f 100644 --- a/src/domain/app/header/__tests__/__snapshots__/Header.test.tsx.snap +++ b/src/domain/app/header/__tests__/__snapshots__/Header.test.tsx.snap @@ -1,112 +1,110 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Header matches snapshot 1`] = ` -
-
+
-
- - - skip to content - - + skip to content + + +
-
- - - Helsinki - - - + + + + - - Test site - - + Test site + + +
-
+ + Suomi + + + + - - -
+ + English + +
-
+
+
+
    +
-
-
+ + `; diff --git a/src/domain/app/layout/__tests__/__snapshots__/PageLayout.test.tsx.snap b/src/domain/app/layout/__tests__/__snapshots__/PageLayout.test.tsx.snap index a51712c4..b9e54ae6 100644 --- a/src/domain/app/layout/__tests__/__snapshots__/PageLayout.test.tsx.snap +++ b/src/domain/app/layout/__tests__/__snapshots__/PageLayout.test.tsx.snap @@ -4,114 +4,112 @@ exports[`PageLayout matches snapshot 1`] = `
-
-
+
-
- - - skip to content - - + skip to content + + +
-
- - - Helsinki - - - + + + + - - Test site - - + Test site + + +
-
+ + Suomi + + + - - -
+ + Svenska + + +
-
+
+
+
    +
-
-
+
+