diff --git a/package-lock.json b/package-lock.json index 6ea24865b8..ce0643866c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4180,9 +4180,9 @@ } }, "node_modules/@openedx/paragon": { - "version": "22.10.0", - "resolved": "https://registry.npmjs.org/@openedx/paragon/-/paragon-22.10.0.tgz", - "integrity": "sha512-uwH/vN6PM9v77NIJ0MUyREdF+3LY/kXIVaOAN+TJKi6JexKoqM7jR30wGuI83YGymwthXDc8T4J54O/wXDoxrQ==", + "version": "22.13.0", + "resolved": "https://registry.npmjs.org/@openedx/paragon/-/paragon-22.13.0.tgz", + "integrity": "sha512-yCbAYGQzpVQj65nFvnqDRU4V6MhZN2LAO/qzFJUV+RW2Riudef7KI1No/+nePI4tYAMhnuPwZ1EDiJQ2lBNYew==", "license": "Apache-2.0", "workspaces": [ "example", diff --git a/package.json b/package.json index f31f0f7776..fca7055363 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "files": [ { "path": "dist/*.js", - "maxSize": "1300kB" + "maxSize": "1350kB" } ], "normalizeFilenames": "^.+?(\\..+?)\\.\\w+$" diff --git a/src/courseware/course/new-sidebar/SidebarContextProvider.tsx b/src/courseware/course/new-sidebar/SidebarContextProvider.tsx index 74d2b7bb7a..7ea8ffded2 100644 --- a/src/courseware/course/new-sidebar/SidebarContextProvider.tsx +++ b/src/courseware/course/new-sidebar/SidebarContextProvider.tsx @@ -25,8 +25,9 @@ const SidebarProvider: React.FC = ({ }) => { const { verifiedMode } = useModel('courseHomeMeta', courseId); const topic = useModel('discussionTopics', unitId); - const shouldDisplayFullScreen = useWindowSize().width < breakpoints.large.minWidth; - const shouldDisplaySidebarOpen = useWindowSize().width > breakpoints.medium.minWidth; + const windowWidth = useWindowSize().width ?? window.innerWidth; + const shouldDisplayFullScreen = windowWidth < breakpoints.large.minWidth; + const shouldDisplaySidebarOpen = windowWidth > breakpoints.medium.minWidth; const query = new URLSearchParams(window.location.search); const isInitiallySidebarOpen = shouldDisplaySidebarOpen || query.get('sidebar') === 'true'; const sidebarKey = `sidebar.${courseId}`;