From 4ea748b1a361d198ea0241d93deedef5edc59049 Mon Sep 17 00:00:00 2001 From: Dmitry S Date: Thu, 29 Jun 2023 10:44:37 -0400 Subject: [PATCH] (core) Adjust the style of the 'attic' to have more of a toolbar feel, flush to the top, and taking up less space Test Plan: Checked new looks manually, behavior should not be affected. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3934 --- app/client/components/GristDoc.ts | 3 ++- app/client/components/LayoutTray.ts | 16 +++++++++------- app/client/components/buildViewSectionDom.ts | 1 - 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/client/components/GristDoc.ts b/app/client/components/GristDoc.ts index 3f43ffbc..338b2353 100644 --- a/app/client/components/GristDoc.ts +++ b/app/client/components/GristDoc.ts @@ -1578,13 +1578,14 @@ async function finalizeAnchor() { } const cssViewContentPane = styled('div', ` + --view-content-page-margin: 12px; flex: auto; display: flex; flex-direction: column; overflow: visible; position: relative; min-width: 240px; - margin: 12px; + margin: var(--view-content-page-margin, 12px); @media ${mediaSmall} { & { margin: 4px; diff --git a/app/client/components/LayoutTray.ts b/app/client/components/LayoutTray.ts index e6f49367..8b0bcdae 100644 --- a/app/client/components/LayoutTray.ts +++ b/app/client/components/LayoutTray.ts @@ -1164,7 +1164,7 @@ const cssFloaterWrapper = styled('div', ` max-width: 140px; background: ${theme.tableBodyBg}; border: 1px solid ${theme.widgetBorder}; - border-radius: 3px; + border-radius: 4px; -webkit-transform: rotate(5deg) scale(0.8) translate(-10px, 0px); transform: rotate(5deg) scale(0.8) translate(-10px, 0px); & .mini_section_container { @@ -1174,16 +1174,17 @@ const cssFloaterWrapper = styled('div', ` `); const cssCollapsedTray = styled('div.collapsed_layout', ` - border-radius: 3px; display: flex; flex-direction: column; - border-radius: 3px; - display: flex; overflow: hidden; transition: height 0.2s; position: relative; - margin-bottom: 10px; + margin: calc(-1 * var(--view-content-page-margin, 12px)); + margin-bottom: 0; user-select: none; + background-color: ${theme.pageBg}; + border-bottom: 1px solid ${theme.pagePanelsBorder}; + outline-offset: -1px; &-is-active { outline: 2px dashed ${theme.widgetBorder}; @@ -1197,8 +1198,9 @@ const cssCollapsedTray = styled('div.collapsed_layout', ` const cssRow = styled('div', `display: flex`); const cssLayout = styled(cssRow, ` - padding: 12px; - gap: 10px; + padding: 8px 24px; + column-gap: 16px; + row-gap: 8px; flex-wrap: wrap; position: relative; `); diff --git a/app/client/components/buildViewSectionDom.ts b/app/client/components/buildViewSectionDom.ts index 77bbb9bb..7bf3d641 100644 --- a/app/client/components/buildViewSectionDom.ts +++ b/app/client/components/buildViewSectionDom.ts @@ -195,7 +195,6 @@ const cssResizing = styled('div', ` const cssMiniSection = styled('div.mini_section_container', ` --icon-color: ${colors.lightGreen}; display: flex; - background: ${theme.mainPanelBg}; align-items: center; padding-right: 8px; `);