From b536180a3e4a87a51b8cade07ff8e24cf7e9f16b Mon Sep 17 00:00:00 2001 From: Syed Ali Abbas Zaidi <88369802+Syed-Ali-Abbas-Zaidi@users.noreply.github.com> Date: Mon, 16 Oct 2023 13:11:40 +0500 Subject: [PATCH 1/4] chore: bump frontend-platform (#356) --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a5e3eea..5762ac13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@edx/brand": "npm:@edx/brand-openedx@^1.2.0", "@edx/frontend-component-footer": "12.2.0", "@edx/frontend-component-header": "4.6.0", - "@edx/frontend-platform": "5.0.0", + "@edx/frontend-platform": "5.5.4", "@edx/paragon": "20.45.0", "@edx/react-unit-test-utils": "1.7.0", "@edx/reactifex": "^2.1.1", @@ -2452,9 +2452,9 @@ } }, "node_modules/@edx/frontend-platform": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-5.0.0.tgz", - "integrity": "sha512-DD9/B4rnC3BKPiWlbEFF1JIYFbWC6vUBKTyN8sf4khi4DNhhWhsobk+iNeCWNzF9UgCPRbniIqesdV1F9NXNZw==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-5.5.4.tgz", + "integrity": "sha512-Yum+oST7XfDwDnDhBnzeR/mjp6O+G0g+5AZtIJ1BdTKQH1z9FObfim/pfoiI9STiYlguVpeWMkzWuca/QMLO/Q==", "dependencies": { "@cospired/i18n-iso-languages": "4.1.0", "@formatjs/intl-pluralrules": "4.3.3", @@ -2482,7 +2482,7 @@ }, "peerDependencies": { "@edx/frontend-build": ">= 8.1.0 || ^12.9.0-alpha.1", - "@edx/paragon": ">= 10.0.0 < 21.0.0", + "@edx/paragon": ">= 10.0.0 < 22.0.0", "prop-types": "^15.7.2", "react": "^16.9.0 || ^17.0.0", "react-dom": "^16.9.0 || ^17.0.0", diff --git a/package.json b/package.json index a05c2e99..d1a1f9f5 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@edx/brand": "npm:@edx/brand-openedx@^1.2.0", "@edx/frontend-component-footer": "12.2.0", "@edx/frontend-component-header": "4.6.0", - "@edx/frontend-platform": "5.0.0", + "@edx/frontend-platform": "5.5.4", "@edx/paragon": "20.45.0", "@edx/react-unit-test-utils": "1.7.0", "@edx/reactifex": "^2.1.1", From f303712830fe755138d2d612219316177bb9efe1 Mon Sep 17 00:00:00 2001 From: ihor-romaniuk Date: Mon, 23 Oct 2023 15:53:35 +0300 Subject: [PATCH 2/4] 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 ba9fb375d944b3a9790d303814f9869b90a541de Mon Sep 17 00:00:00 2001 From: "Adolfo R. Brandes" Date: Fri, 8 Dec 2023 16:27:28 -0300 Subject: [PATCH 3/4] fix: Route with PUBLIC_PATH Prior to this change, the MFE would fail to render with any PUBLIC_PATH set. Because that is now handled entirely by `frontend-platform`, we can avoid referring to PUBLIC_PATH entirely, here. --- src/App.jsx | 3 +-- src/App.test.jsx | 6 +----- src/data/constants/app.js | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 01d1b0b7..2439e468 100755 --- a/src/App.jsx +++ b/src/App.jsx @@ -6,7 +6,6 @@ import { AppProvider } from '@edx/frontend-platform/react'; import Footer from '@edx/frontend-component-footer'; import Header from '@edx/frontend-component-header'; -import { routePath } from 'data/constants/app'; import store from 'data/store'; import GradebookPage from 'containers/GradebookPage'; import './App.scss'; @@ -20,7 +19,7 @@ const App = () => (
} /> diff --git a/src/App.test.jsx b/src/App.test.jsx index 4ed87af1..79fbff88 100644 --- a/src/App.test.jsx +++ b/src/App.test.jsx @@ -7,7 +7,6 @@ import { AppProvider } from '@edx/frontend-platform/react'; import Footer from '@edx/frontend-component-footer'; import Header from '@edx/frontend-component-header'; -import { routePath } from 'data/constants/app'; import store from 'data/store'; import GradebookPage from 'containers/GradebookPage'; @@ -21,9 +20,6 @@ jest.mock('react-router-dom', () => ({ jest.mock('@edx/frontend-platform/react', () => ({ AppProvider: () => 'AppProvider', })); -jest.mock('data/constants/app', () => ({ - routePath: '/:courseId', -})); jest.mock('@edx/frontend-component-footer', () => 'Footer'); jest.mock('data/store', () => 'testStore'); jest.mock('containers/GradebookPage', () => 'GradebookPage'); @@ -66,7 +62,7 @@ describe('App router component', () => { expect(secondChild.find('main')).toEqual(shallow(
- } /> + } />
, )); diff --git a/src/data/constants/app.js b/src/data/constants/app.js index fad26bcd..c5d3d89d 100644 --- a/src/data/constants/app.js +++ b/src/data/constants/app.js @@ -1,7 +1,4 @@ import { StrictDict } from 'utils'; -import { getConfig } from '@edx/frontend-platform'; - -export const routePath = `${getConfig().PUBLIC_PATH}:courseId`; export const views = StrictDict({ grades: 'grades', From bd25b6b4d01a1fdecbcc1d72fc3e89b77b5e85f8 Mon Sep 17 00:00:00 2001 From: Dima Alipov Date: Sat, 16 Mar 2024 18:26:24 +0200 Subject: [PATCH 4/4] 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 = [