From fabd60c0985677af0cd182e8605a82e19b4a7cc9 Mon Sep 17 00:00:00 2001 From: Alessio Cappa <104093777+alessiocappa@users.noreply.github.com> Date: Thu, 15 Jan 2026 12:53:35 +0100 Subject: [PATCH] fix: PWA display issues (#653) * feat: re-apply PWA changes from previous PR * feat: adjust padding on pages for mobile * fix: Add position relative to netWorthChart to avoid overflow issues on mobile * fix: Add safe-area to progress bar * feat: add missing class on html * fix: Replace touch-none with overscroll-none --- app/assets/tailwind/application.css | 4 ++++ app/assets/tailwind/maybe-design-system.css | 5 ----- app/components/DS/dialog.html.erb | 2 +- app/views/budgets/show.html.erb | 2 +- app/views/layouts/application.html.erb | 4 ++-- app/views/layouts/settings.html.erb | 6 +++--- app/views/layouts/shared/_htmldoc.html.erb | 6 +++--- app/views/pages/dashboard/_net_worth_chart.html.erb | 2 +- app/views/reports/index.html.erb | 2 +- app/views/transactions/index.html.erb | 2 +- 10 files changed, 17 insertions(+), 18 deletions(-) diff --git a/app/assets/tailwind/application.css b/app/assets/tailwind/application.css index c7439e481..583b228a0 100644 --- a/app/assets/tailwind/application.css +++ b/app/assets/tailwind/application.css @@ -198,3 +198,7 @@ pointer-events: none; position: absolute; } + +.turbo-progress-bar { + margin-top: env(safe-area-inset-top); +} diff --git a/app/assets/tailwind/maybe-design-system.css b/app/assets/tailwind/maybe-design-system.css index 3d094216c..184cbf3a6 100644 --- a/app/assets/tailwind/maybe-design-system.css +++ b/app/assets/tailwind/maybe-design-system.css @@ -266,11 +266,6 @@ --shadow-xl: 0px 20px 24px -4px --alpha(var(--color-white) / 8%); } - html { - padding-top: env(safe-area-inset-top); - padding-bottom: env(safe-area-inset-bottom); - } - button { @apply cursor-pointer focus-visible:outline-gray-900; } diff --git a/app/components/DS/dialog.html.erb b/app/components/DS/dialog.html.erb index ca8f86b7d..72b8c0740 100644 --- a/app/components/DS/dialog.html.erb +++ b/app/components/DS/dialog.html.erb @@ -1,5 +1,5 @@ <%= wrapper_element do %> - <%= tag.dialog class: "w-full h-full bg-transparent theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay #{drawer? ? "lg:p-3" : "lg:p-1"}", **merged_opts do %> + <%= tag.dialog class: "w-full h-full bg-transparent theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] #{drawer? ? "lg:p-3" : "lg:p-1"}", **merged_opts do %> <%= tag.div class: dialog_outer_classes do %> <%= tag.div class: dialog_inner_classes, data: { DS__dialog_target: "content" } do %>
diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index 63e37448d..33eea2d50 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -1,4 +1,4 @@ -
+
<%= render "budgets/budget_header", budget: @budget, previous_budget: @previous_budget, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5741ff241..887341812 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -112,7 +112,7 @@ <% end %> <%# SHARED - Main content %> - <%= tag.main class: class_names("grow overflow-y-auto px-3 lg:px-10 py-4 pb-20 lg:pb-4 w-full mx-auto max-w-5xl"), data: { app_layout_target: "content" } do %> + <%= tag.main class: class_names("grow overflow-y-auto px-3 lg:px-10 py-4 w-full mx-auto max-w-5xl"), data: { app_layout_target: "content" } do %>