Skip to content

Commit 2e4eb15

Browse files
feat: added url param to open discussion sidebar (openedx#1092)
1 parent 35b229b commit 2e4eb15

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/courseware/course/sidebar/SidebarContextProvider.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ const SidebarProvider = ({
1919
const shouldDisplayFullScreen = useWindowSize().width < breakpoints.large.minWidth;
2020
const shouldDisplaySidebarOpen = useWindowSize().width > breakpoints.medium.minWidth;
2121
const showNotificationsOnLoad = getSessionStorage(`notificationTrayStatus.${courseId}`) !== 'closed';
22+
const query = new URLSearchParams(window.location.search);
23+
if (query.get('sidebar') === 'true') {
24+
localStorage.setItem('showDiscussionSidebar', true);
25+
}
2226
const showDiscussionSidebar = localStorage.getItem('showDiscussionSidebar') !== 'false';
2327
const showNotificationSidebar = (verifiedMode && shouldDisplaySidebarOpen && showNotificationsOnLoad)
2428
? SIDEBARS.NOTIFICATIONS.ID

0 commit comments

Comments
 (0)