* fix(deps): update @openedx/paragon to v22.13.0, fix minor TypeScript warning (#1572)

* fix(deps): update dependency @openedx/paragon to v22.13.0

* fix: update use of useWindowSize() to reflect accurate data types

* chore: allow slightly larger bundle size for new paragon :/

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
Braden MacDonald
2025-01-10 10:09:17 -08:00
committed by GitHub
parent 5e5fdeba44
commit 826f1382dd
3 changed files with 7 additions and 6 deletions

6
package-lock.json generated
View File

@@ -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",

View File

@@ -96,7 +96,7 @@
"files": [
{
"path": "dist/*.js",
"maxSize": "1300kB"
"maxSize": "1350kB"
}
],
"normalizeFilenames": "^.+?(\\..+?)\\.\\w+$"

View File

@@ -25,8 +25,9 @@ const SidebarProvider: React.FC<Props> = ({
}) => {
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}`;