From f303712830fe755138d2d612219316177bb9efe1 Mon Sep 17 00:00:00 2001 From: ihor-romaniuk Date: Mon, 23 Oct 2023 15:53:35 +0300 Subject: [PATCH 1/2] 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} -
+
From bd25b6b4d01a1fdecbcc1d72fc3e89b77b5e85f8 Mon Sep 17 00:00:00 2001 From: Dima Alipov Date: Sat, 16 Mar 2024 18:26:24 +0200 Subject: [PATCH 2/2] fix: "An unexpected error occurred" after second opening any grade --- src/components/GradesView/EditModal/OverrideTable/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/GradesView/EditModal/OverrideTable/hooks.js b/src/components/GradesView/EditModal/OverrideTable/hooks.js index d4dfc14c..d8711f80 100644 --- a/src/components/GradesView/EditModal/OverrideTable/hooks.js +++ b/src/components/GradesView/EditModal/OverrideTable/hooks.js @@ -9,7 +9,7 @@ const useOverrideTableData = () => { const { formatMessage } = useIntl(); const hide = selectors.grades.useHasOverrideErrors(); - const gradeOverrides = selectors.grades.useGradeData().gradeOverrideHistoryResults; + const gradeOverrides = selectors.grades.useGradeData().gradeOverrideHistoryResults || []; const tableProps = {}; if (!hide) { tableProps.columns = [