From 30bdd0cca47678647a20faa29ce0e737ae3f586e Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 4 Dec 2026 20:44:38 -0500 Subject: [PATCH] fix: Collection overview with a table scrolls sideways on mobile (#14895) * fix: Collection overview with a table scrolls sideways on mobile * fix: Table scroll shadow does not hide the top border past the table edge * fix: Table scroll shadow covers the column grips past the table edge --- app/scenes/Collection/components/Overview.tsx | 14 ++++++++++++-- shared/editor/components/Styles.ts | 8 +++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/scenes/Collection/components/Overview.tsx b/app/scenes/Collection/components/Overview.tsx index cfec0d3dd2..c2d9b69ef1 100644 --- a/app/scenes/Collection/components/Overview.tsx +++ b/app/scenes/Collection/components/Overview.tsx @@ -6,6 +6,7 @@ import { toast } from "sonner"; import styled from "styled-components"; import { richExtensions } from "@shared/editor/nodes"; import { s } from "@shared/styles"; +import { breakpoint } from "@shared/styles/breakpoint"; import { ProsemirrorDataHelper } from "@shared/utils/ProsemirrorDataHelper"; import { CollectionValidation } from "@shared/validations"; import type Collection from "~/models/Collection"; @@ -89,7 +90,7 @@ function Overview({ collection, readOnly }: Props) { {collections.isSaving && } {(can.update || readOnly) && ( Loading…}> -
+
-
+
)} ); } +// Adds to the page padding on mobile so the 32px editor gutter fits, as in documents. +const EditorWrapper = styled.div` + padding: 0 16px; + + ${breakpoint("tablet")` + padding: 0; + `}; +`; + const Placeholder = styled(Text)` color: ${s("placeholder")}; cursor: text; diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index 330882ec99..2c1d3e222a 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -3031,7 +3031,7 @@ th:has(> .${EditorStyleHelper.tableFilterButton}.active) { .${EditorStyleHelper.tableShadowRight}::after { content: ""; position: absolute; - top: 1px; + top: 0; bottom: 0; left: -1em; width: 32px; @@ -3041,6 +3041,12 @@ th:has(> .${EditorStyleHelper.tableFilterButton}.active) { pointer-events: none; } +/* also covers the column grips above the table */ +.${EditorStyleHelper.tableShadowLeft}:has(.${EditorStyleHelper.tableGripColumn})::before, +.${EditorStyleHelper.tableShadowRight}:has(.${EditorStyleHelper.tableGripColumn})::after { + top: -10px; +} + .${EditorStyleHelper.tableShadowLeft}::before { left: -${EditorStyleHelper.padding}px; right: auto;