From 62235f667947a30c9705b2c5326c668e2c75c262 Mon Sep 17 00:00:00 2001 From: zv Date: Thu, 11 Jun 2026 18:08:07 +0200 Subject: [PATCH] Keep day forecast modal scrollbar inside panel --- components/forecast/day-forecast-modal.tsx | 136 +++++++++++---------- 1 file changed, 69 insertions(+), 67 deletions(-) diff --git a/components/forecast/day-forecast-modal.tsx b/components/forecast/day-forecast-modal.tsx index d149971..e8dbbc8 100644 --- a/components/forecast/day-forecast-modal.tsx +++ b/components/forecast/day-forecast-modal.tsx @@ -96,85 +96,87 @@ export function DayForecastModal({ role="dialog" aria-modal="true" aria-labelledby="day-forecast-title" - className="weather-scrollbar h-full w-full overflow-y-auto bg-background shadow-card sm:max-w-6xl sm:rounded-panel sm:border sm:border-border/70" + className="h-full w-full overflow-hidden bg-background shadow-card sm:max-w-6xl sm:rounded-panel sm:border sm:border-border/70" initial={{ opacity: 0, y: 28, scale: 0.985 }} animate={{ opacity: 1, y: 0, scale: 1 }} exit={{ opacity: 0, y: 20, scale: 0.99 }} transition={{ type: "spring", stiffness: 260, damping: 28 }} onPointerDown={(event) => event.stopPropagation()} > -
-
-
-

- - {t("forecast.dayDetails")} -

-

{locationName}

-

{formattedDate}

-
- -
- - -
+
+
+
-

{getForecastCondition(day.weatherCode, language)}

-
- -

{formatForecastTemperature(day.temperatureMax, language)}

-

{formatForecastTemperature(day.temperatureMin, language)}

+

+ + {t("forecast.dayDetails")} +

+

{locationName}

+

{formattedDate}

+
+ +
+ + +
+
+

{getForecastCondition(day.weatherCode, language)}

+
+ +

{formatForecastTemperature(day.temperatureMax, language)}

+

{formatForecastTemperature(day.temperatureMin, language)}

+
+
+
+ + + +
-
- - - - + + + +

{t("forecast.hourlyForDay")}

+
+
    + {hours.map((hour) => { + const isPast = isForecastHourPast(hour.time); + return ( +
  • +

    {formatHour(hour.time)}

    + +

    {formatForecastTemperature(hour.temperature, language)}

    +

    + + {hour.precipitationProbability === null ? "—" : `${hour.precipitationProbability}%`} +

    +
  • + ); + })} +
-
-
+ - -

{t("forecast.hourlyForDay")}

-
-
    - {hours.map((hour) => { - const isPast = isForecastHourPast(hour.time); - return ( -
  • -

    {formatHour(hour.time)}

    - -

    {formatForecastTemperature(hour.temperature, language)}

    -

    - - {hour.precipitationProbability === null ? "—" : `${hour.precipitationProbability}%`} -

    -
  • - ); - })} -
-
-
+ - - - + +