From f1c76126c654dba60cd270753264954737cc45eb Mon Sep 17 00:00:00 2001 From: CSY54 <18496305+CSY54@users.noreply.github.com> Date: Thu, 9 Sep 2021 12:36:32 +0800 Subject: Fix height of horizontal sidebar (getferdi/ferdi#1894) (#1896) Co-authored-by: Vijay Raghavan Aravamudhan --- CHANGELOG.md | 7 +++++++ src/features/appearance/index.js | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 426bae6cb..806ebceb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [v5.6.1-nightly.55](https://github.com/getferdi/ferdi/compare/v5.6.1-nightly.54...v5.6.1-nightly.55) (2021-09-10) + +### Bug fixes + +- Fix sidebar dimension when used in horizontal style (#1896) 💖 @CSY54 +- Partially reverted the cookie-handling for outlook since it caused crashes 💖 @vraravam + # [v5.6.1-nightly.54](https://github.com/getferdi/ferdi/compare/v5.6.1-nightly.53...v5.6.1-nightly.54) (2021-09-09) ### Bug fixes diff --git a/src/features/appearance/index.js b/src/features/appearance/index.js index c3425ba9c..3aab2fcad 100644 --- a/src/features/appearance/index.js +++ b/src/features/appearance/index.js @@ -122,7 +122,7 @@ function generateShowDragAreaStyle(accentColor) { background-color: ${accentColor}; } #root { - /** Remove 22px from app height, otherwise the page will be to high */ + /** Remove 22px from app height, otherwise the page will be too high */ height: calc(100% - 22px); } `; @@ -139,11 +139,12 @@ function generateVerticalStyle(widthStr, alwaysShowWorkspaces) { document.head.appendChild(link); } const width = Number(widthStr); - const sidebarWidthStr = `${width - 4}px`; + const sidebarWidth = width - 4; + const verticalStyleOffset = 23; return ` .sidebar { - height: ${sidebarWidthStr} !important; + height: ${sidebarWidth + verticalStyleOffset + 1}px !important; ${alwaysShowWorkspaces ? ` width: calc(100% - 300px) !important; ` : ''} @@ -154,11 +155,11 @@ function generateVerticalStyle(widthStr, alwaysShowWorkspaces) { } .app .app__content { - padding-top: ${sidebarWidthStr} !important; + padding-top: ${sidebarWidth + verticalStyleOffset + 1}px !important; } .workspaces-drawer { - maring-top: -${sidebarWidthStr} !important; + margin-top: -${sidebarWidth - verticalStyleOffset - 1}px !important; } .todos__todos-panel--expanded { -- cgit v1.2.3-70-g09d2