From cc2edaf71a59013ea3dba6a2334c1f98685e6cc8 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 15 Feb 2021 12:40:26 +0100 Subject: [PATCH] Fix dahsboard CSS [SCI-5249][SCI-5489] --- app/assets/stylesheets/dashboard/calendar.scss | 5 ++--- .../stylesheets/dashboard/current_tasks.scss | 1 + app/assets/stylesheets/dashboard/show.scss | 16 +++++++++------- .../stylesheets/shared/filter_dropdown.scss | 2 +- app/views/dashboards/_current_tasks.html.erb | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/dashboard/calendar.scss b/app/assets/stylesheets/dashboard/calendar.scss index 7e44b24cf..647efbb3b 100644 --- a/app/assets/stylesheets/dashboard/calendar.scss +++ b/app/assets/stylesheets/dashboard/calendar.scss @@ -5,7 +5,6 @@ .dashboard-container .calendar-widget { --calendar-day-size: 32px; - min-height: 320px; .dashboard-calendar { height: 100%; @@ -40,9 +39,9 @@ flex-basis: calc(100% - 42px); flex-grow: 1; grid-column-gap: 6px; - grid-row-gap: 6px; + grid-row-gap: 2px; grid-template-columns: repeat(7, 1fr); - grid-template-rows: repeat(7, 1fr); + grid-template-rows: repeat(auto-fit, minmax(1em, 1fr)); justify-items: center; padding: 6px; diff --git a/app/assets/stylesheets/dashboard/current_tasks.scss b/app/assets/stylesheets/dashboard/current_tasks.scss index c9674da9f..2ff173ea8 100644 --- a/app/assets/stylesheets/dashboard/current_tasks.scss +++ b/app/assets/stylesheets/dashboard/current_tasks.scss @@ -62,6 +62,7 @@ .filter-container { height: 36px; margin-right: 4px; + position: relative; width: 36px; .current-tasks-filters { diff --git a/app/assets/stylesheets/dashboard/show.scss b/app/assets/stylesheets/dashboard/show.scss index ae002d96f..58919d3a8 100644 --- a/app/assets/stylesheets/dashboard/show.scss +++ b/app/assets/stylesheets/dashboard/show.scss @@ -12,19 +12,20 @@ .dashboard-view { --dashboard-widgets-gap: 30px; - padding: calc(var(--dashboard-widgets-gap) / 2) - calc(var(--dashboard-widgets-gap) / 2) + padding: 15px + var(--dashboard-widgets-gap) + 15px var(--dashboard-widgets-gap); } .dashboard-header { - padding-bottom: calc(var(--dashboard-widgets-gap) / 2); + padding-bottom: 15px; } .dashboard-container { --widget-header-size: 44px; display: grid; - grid-auto-rows: 28em; + grid-auto-rows: 26em; grid-column-gap: var(--dashboard-widgets-gap); grid-row-gap: var(--dashboard-widgets-gap); grid-template-columns: repeat(auto-fit, minmax(7em, 1fr)); @@ -101,6 +102,10 @@ .dashboard-container { grid-auto-rows: 20em; } + + .dashboard-view { + --dashboard-widgets-gap: 15px; + } } @media (min-height: 1080px) { @@ -110,9 +115,6 @@ } @media (max-width: 700px) { - .dashboard-view { - --dashboard-widgets-gap: 15px; - } .dashboard-container { --widget-header-size: 72px; diff --git a/app/assets/stylesheets/shared/filter_dropdown.scss b/app/assets/stylesheets/shared/filter_dropdown.scss index 26cbc4625..f1b251247 100644 --- a/app/assets/stylesheets/shared/filter_dropdown.scss +++ b/app/assets/stylesheets/shared/filter_dropdown.scss @@ -102,7 +102,7 @@ width: 460px; } - .footer { + .footer:not(.center) { .btn:last-child { margin-left: auto; } diff --git a/app/views/dashboards/_current_tasks.html.erb b/app/views/dashboards/_current_tasks.html.erb index 1c6302004..950829bb0 100644 --- a/app/views/dashboards/_current_tasks.html.erb +++ b/app/views/dashboards/_current_tasks.html.erb @@ -51,7 +51,7 @@ data-disable-placeholder="<%= t("dashboard.current_tasks.filter.select_experiment") %>" data-placeholder="<%= t("dashboard.current_tasks.filter.select_experiment") %>"> -