From f303712830fe755138d2d612219316177bb9efe1 Mon Sep 17 00:00:00 2001 From: ihor-romaniuk Date: Mon, 23 Oct 2023 15:53:35 +0300 Subject: [PATCH] fix: fix sidebar scrolling and adaptation for mobile - fix text overload in heading - fix appearance for sidebar with a short main content - fix transformation of search and filter button on mobile - fix extra empty space below main content table - fix adaptation modal content to mobile view --- .../__snapshots__/index.test.jsx.snap | 16 ++++++--- src/components/GradebookHeader/index.jsx | 2 +- .../__snapshots__/index.test.jsx.snap | 1 + .../GradesView/FilterMenuToggle/index.jsx | 2 +- src/components/GradesView/GradesView.scss | 34 ++++++++++++++++++- .../__snapshots__/index.test.jsx.snap | 4 ++- .../GradesView/SearchControls/index.jsx | 2 +- .../__snapshots__/index.test.jsx.snap | 2 +- src/components/GradesView/index.jsx | 2 +- 9 files changed, 54 insertions(+), 11 deletions(-) diff --git a/src/components/GradebookHeader/__snapshots__/index.test.jsx.snap b/src/components/GradebookHeader/__snapshots__/index.test.jsx.snap index 65f2abf3..bf0c9e25 100644 --- a/src/components/GradebookHeader/__snapshots__/index.test.jsx.snap +++ b/src/components/GradebookHeader/__snapshots__/index.test.jsx.snap @@ -21,7 +21,9 @@ exports[`GradebookHeader component render default view shapshot 1`] = `
-

+

test-course-id

@@ -49,7 +51,9 @@ exports[`GradebookHeader component render frozen grades snapshot: show frozen wa
-

+

test-course-id

@@ -83,7 +87,9 @@ exports[`GradebookHeader component render show bulk management snapshot: show to
-

+

test-course-id

diff --git a/src/components/GradebookHeader/index.jsx b/src/components/GradebookHeader/index.jsx index efc8204b..6c3ee751 100644 --- a/src/components/GradebookHeader/index.jsx +++ b/src/components/GradebookHeader/index.jsx @@ -26,7 +26,7 @@ export const GradebookHeader = () => {

{formatMessage(messages.gradebook)}

-

{courseId}

+

{courseId}

{showBulkManagement && ( ); }; diff --git a/src/components/GradesView/GradesView.scss b/src/components/GradesView/GradesView.scss index 1d59e2dd..e28ee94c 100644 --- a/src/components/GradesView/GradesView.scss +++ b/src/components/GradesView/GradesView.scss @@ -46,6 +46,7 @@ } .grade-history-header{ float: left; + min-width: 170px; } .grade-history-assignment{ @@ -65,7 +66,7 @@ .gradebook-container { width: 100%; overflow-x: auto; - height: 600px; + max-height: 600px; overflow-y: auto; position: relative; } @@ -122,3 +123,34 @@ select#ScoreView.form-control { border-right-color: $black; } } + +#edit-filters-btn { + @include media-breakpoint-down(xs) { + width: 100%; + margin-bottom: 1rem; + } +} + +.search-container { + @include media-breakpoint-down(xs) { + width: 100%; + } +} + +.pgn__modal-body-content .pgn__data-table-layout-wrapper { + @include media-breakpoint-down(sm) { + clear: both; + padding: 1rem 0; + } +} + +.page-gradebook { + position: relative; + + .sidebar-container { + position: relative; + } + aside.sidebar { + overflow: auto; + } +} diff --git a/src/components/GradesView/SearchControls/__snapshots__/index.test.jsx.snap b/src/components/GradesView/SearchControls/__snapshots__/index.test.jsx.snap index d9f5c94e..c2ec5439 100644 --- a/src/components/GradesView/SearchControls/__snapshots__/index.test.jsx.snap +++ b/src/components/GradesView/SearchControls/__snapshots__/index.test.jsx.snap @@ -1,7 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SearchControls component render snapshot 1`] = ` -
+
{ } = useSearchControlsData(); return ( -
+
diff --git a/src/components/GradesView/index.jsx b/src/components/GradesView/index.jsx index 5c4ddee7..8e8f5ef6 100644 --- a/src/components/GradesView/index.jsx +++ b/src/components/GradesView/index.jsx @@ -34,7 +34,7 @@ export const GradesView = ({ updateQueryParams }) => { {stepHeadings.filter} -
+