Skip to content

Commit

Permalink
feat: stick discussion sidebar to top (openedx#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadadeeltajamul authored Feb 15, 2024
1 parent c6d4bb3 commit 9bfa0d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const DiscussionsNotificationsSidebar = () => {
<SidebarBase
ariaLabel={intl.formatMessage(messages.discussionNotificationTray)}
sidebarId={ID}
className="d-flex flex-column flex-fill"
className="d-flex flex-column flex-fill sticky-top vh-100"
showTitleBar={false}
showBorder={false}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const DiscussionsSidebar = ({ intl }) => {
>
<iframe
src={`${discussionsUrl}?inContextSidebar`}
className="d-flex w-100 h-100 border-0"
className="d-flex sticky-top vh-100 w-100 border-0"
title={intl.formatMessage(messages.discussionsTitle)}
allow="clipboard-write"
loading="lazy"
Expand Down
5 changes: 5 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@
}
}

.sticky-top {
position: sticky;
top: 0;
}

// Import component-specific sass files
@import "courseware/course/celebration/CelebrationModal.scss";
@import "courseware/course/sidebar/sidebars/notifications/NotificationIcon.scss";
Expand Down

0 comments on commit 9bfa0d0

Please sign in to comment.