From 8c2047e8476a9d33368dbd8f7c6c568b7d059631 Mon Sep 17 00:00:00 2001 From: Erik Tiekstra Date: Thu, 3 Apr 2025 09:36:22 +0000 Subject: [PATCH] feat(SW-1884): Always render sidepeek contents, not just during SSR Approved-by: Michael Zetterberg --- apps/scandic-web/app/globals.css | 13 +++ .../destinationFilterAndSort.module.css | 4 - .../DestinationFilterAndSort/index.tsx | 2 +- .../TempDesignSystem/SidePeek/SidePeekSEO.tsx | 16 ++++ .../TempDesignSystem/SidePeek/index.tsx | 91 +++++++++---------- .../SidePeek/sidePeek.module.css | 6 -- 6 files changed, 73 insertions(+), 59 deletions(-) create mode 100644 apps/scandic-web/components/TempDesignSystem/SidePeek/SidePeekSEO.tsx diff --git a/apps/scandic-web/app/globals.css b/apps/scandic-web/app/globals.css index 75c136537..9adc8b690 100644 --- a/apps/scandic-web/app/globals.css +++ b/apps/scandic-web/app/globals.css @@ -69,6 +69,19 @@ ul { margin-block-end: 0; } +/* From Tailwind */ +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + @media screen and (min-width: 768px) { :root { --max-width-spacing: calc(var(--Layout-Tablet-Margin-Margin-min) * 2); diff --git a/apps/scandic-web/components/DestinationFilterAndSort/destinationFilterAndSort.module.css b/apps/scandic-web/components/DestinationFilterAndSort/destinationFilterAndSort.module.css index 76d5e1733..596fc339c 100644 --- a/apps/scandic-web/components/DestinationFilterAndSort/destinationFilterAndSort.module.css +++ b/apps/scandic-web/components/DestinationFilterAndSort/destinationFilterAndSort.module.css @@ -74,10 +74,6 @@ padding: 0; } -.visuallyHidden { - display: none; -} - @media screen and (max-width: 767px) { .overlay { height: var(--visual-viewport-height); diff --git a/apps/scandic-web/components/DestinationFilterAndSort/index.tsx b/apps/scandic-web/components/DestinationFilterAndSort/index.tsx index b6a5e852e..65902042d 100644 --- a/apps/scandic-web/components/DestinationFilterAndSort/index.tsx +++ b/apps/scandic-web/components/DestinationFilterAndSort/index.tsx @@ -194,7 +194,7 @@ export default function DestinationFilterAndSort({ {/* This section is added to the DOM for SEO purposes. The filters are linkable and should be indexable */} -