From ec343aab9099db761ea07aa59188474c16cafb64 Mon Sep 17 00:00:00 2001 From: celine Date: Fri, 08 May 2026 00:09:38 +0000 Subject: [PATCH] actually got smart and tested stuff to fix pwa padding --- app/globals.css | 4 ++-- app/[leaflet_id]/Footer.tsx | 18 ++++++++---------- components/ActionBar/Footer.tsx | 20 ++++++++++++-------- components/ActionBar/MobileNavigation.tsx | 2 +- components/ActionBar/Sidebar.tsx | 2 +- components/PageLayouts/DashboardShell.tsx | 2 +- components/Toolbar/FootnoteToolbarWrapper.tsx | 5 +++-- components/Toolbar/index.tsx | 2 +- app/(home-pages)/(writer)/home/HomeLayout.tsx | 2 +- 9 file(s) changed, 30 insertion(s)(+), 27 deletion(s)(-) diff --git a/app/globals.css b/app/globals.css --- a/app/globals.css +++ b/app/globals.css @@ -123,7 +123,7 @@ --hatchSVG: url("/hatchPattern.svg"); --wavySVG: (url("/RSVPBackground/wavy.svg")); - --safe-padding-bottom: max(calc(env(safe-area-inset-bottom) - 8px), 16px); + --safe-padding-bottom: calc(env(safe-area-inset-bottom) - 8px); } @media (max-width: 640px) { :root { @@ -539,7 +539,7 @@ } .pwa-padding { - padding-top: max(calc(env(safe-area-inset-top) - 8px)) !important; + padding-top: calc(env(safe-area-inset-top) - 8px) !important; } .pwa-padding-bottom { padding-bottom: var(--safe-padding-bottom) !important; diff --git a/app/[leaflet_id]/Footer.tsx b/app/[leaflet_id]/Footer.tsx --- a/app/[leaflet_id]/Footer.tsx +++ b/app/[leaflet_id]/Footer.tsx @@ -1,6 +1,6 @@ "use client"; import { useUIState } from "src/useUIState"; -import { DefaultFooter } from "components/ActionBar/Footer"; +import { FooterLayout } from "components/ActionBar/Footer"; import { Media } from "components/Media"; import { ThemePopover } from "components/ThemeManager/ThemeSetter"; import { Toolbar } from "components/Toolbar"; @@ -52,14 +52,13 @@ return ( {focusedBlock && focusedBlock.entityType == "block" && hasBlockToolbar(blockType) && entity_set.permissions.write ? ( -
{ if (e.currentTarget === e.target) e.preventDefault(); }} @@ -69,20 +68,19 @@ blockID={focusedBlock.entityID} blockType={blockType} /> -
+ ) : focusedBlock && focusedBlock.entityType === "footnote" && entity_set.permissions.write ? ( -
{ if (e.currentTarget === e.target) e.preventDefault(); }} > -
+ ) : entity_set.permissions.write ? ( - + {pub?.publications && identity?.atp_did && pub.publications.identity_did === identity.atp_did ? ( @@ -102,7 +100,7 @@ - + ) : (
diff --git a/components/ActionBar/Footer.tsx b/components/ActionBar/Footer.tsx --- a/components/ActionBar/Footer.tsx +++ b/components/ActionBar/Footer.tsx @@ -1,19 +1,23 @@ import { Media } from "components/Media"; -export function DefaultFooter(props: { children?: React.ReactNode }) { +export function FooterLayout(props: { + children?: React.ReactNode; + onMouseDown?: (e: React.MouseEvent) => void; + noBackground?: boolean; +}) { return ( - {props.children} - +
); } diff --git a/components/ActionBar/MobileNavigation.tsx b/components/ActionBar/MobileNavigation.tsx --- a/components/ActionBar/MobileNavigation.tsx +++ b/components/ActionBar/MobileNavigation.tsx @@ -71,7 +71,7 @@ return (
diff --git a/components/Toolbar/FootnoteToolbarWrapper.tsx b/components/Toolbar/FootnoteToolbarWrapper.tsx --- a/components/Toolbar/FootnoteToolbarWrapper.tsx +++ b/components/Toolbar/FootnoteToolbarWrapper.tsx @@ -13,7 +13,8 @@ type FootnoteToolbarState = "default" | "link"; export const FootnoteToolbar = (props: { pageID: string }) => { - let [toolbarState, setToolbarState] = useState("default"); + let [toolbarState, setToolbarState] = + useState("default"); let focusedEntity = useUIState((s) => s.focusedEntity); let activeEditor = useEditorStates((s) => focusedEntity ? s.editorStates[focusedEntity.entityID] : null, @@ -38,7 +39,7 @@
{toolbarState === "default" ? ( diff --git a/components/Toolbar/index.tsx b/components/Toolbar/index.tsx --- a/components/Toolbar/index.tsx +++ b/components/Toolbar/index.tsx @@ -86,7 +86,7 @@
{toolbarState === "default" ? ( diff --git a/app/(home-pages)/(writer)/home/HomeLayout.tsx b/app/(home-pages)/(writer)/home/HomeLayout.tsx --- a/app/(home-pages)/(writer)/home/HomeLayout.tsx +++ b/app/(home-pages)/(writer)/home/HomeLayout.tsx @@ -164,7 +164,7 @@ initialFacts={initialFacts?.facts || {}} showPreview /> -
+
); } -- tangled.sh