Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stick discussion sidebar to top #1290

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading