Skip to content

Commit c647e92

Browse files
committed
feat: adjust things as per design
1 parent 1749f3b commit c647e92

7 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/course-outline/CourseOutline.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ const CourseOutline = () => {
267267

268268
if (isLoadingDenied) {
269269
return (
270-
<Container fluid className="px-4 mt-4">
270+
<Container fluid className="px-3 mt-4">
271271
<PageAlerts
272272
courseId={courseId}
273273
notificationDismissUrl={notificationDismissUrl}
@@ -290,7 +290,7 @@ const CourseOutline = () => {
290290
<Helmet>
291291
<title>{getPageHeadTitle(courseName, intl.formatMessage(messages.headingTitle))}</title>
292292
</Helmet>
293-
<Container fluid className="px-4">
293+
<Container fluid className="px-3">
294294
<section className="course-outline-container mb-4 mt-5">
295295
<PageAlerts
296296
courseId={courseId}

src/course-outline/header-navigations/HeaderActions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ const HeaderActions = ({
7979
<Icon src={ViewSidebar} />
8080
</Dropdown.Toggle>
8181
<Dropdown.Menu className="mt-1">
82-
{Object.entries(sidebarPages).map(([key, page]: [OutlineSidebarPageKeys, SidebarPage]) => (
82+
{Object.entries(sidebarPages).filter(([, page]) => !page.hideFromActionMenu)
83+
.map(([key, page]: [OutlineSidebarPageKeys, SidebarPage]) => (
8384
<Dropdown.Item
8485
key={key}
8586
onClick={() => setCurrentPageKey(key)}

src/course-outline/outline-sidebar/AddSidebar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ const AddTabs = () => {
213213

214214
/** Main Sidebar Component */
215215
export const AddSidebar = () => {
216-
const intl = useIntl();
217216
const { courseDetails } = useCourseAuthoringContext();
218217

219218
return (

src/course-outline/outline-sidebar/OutlineSidebarContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const OutlineSidebarProvider = ({ children }: { children?: React.ReactNod
5656
component: AddSidebar,
5757
icon: Plus,
5858
title: intl.formatMessage(messages.sidebarButtonAdd),
59+
hideFromActionMenu: true,
5960
},
6061
} satisfies OutlineSidebarPages;
6162

src/generic/sidebar/Sidebar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface SidebarPage {
1818
component: React.ComponentType;
1919
icon: React.ComponentType;
2020
title: string;
21+
hideFromActionMenu?: boolean;
2122
}
2223

2324
type SidebarPages = Record<string, SidebarPage>;
@@ -88,7 +89,7 @@ export function Sidebar<T extends SidebarPages>({
8889
const SidebarComponent = pages[currentPageKey].component;
8990

9091
return (
91-
<Stack direction="horizontal" className="sidebar align-items-baseline mx-3" gap={2}>
92+
<Stack direction="horizontal" className="sidebar align-items-baseline ml-3" gap={2}>
9293
{isOpen && !!currentPageKey && (
9394
<div className="sidebar-content p-2 bg-white border-right">
9495
<Dropdown data-testid="sidebar-dropdown">

src/generic/sidebar/index.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.sidebar {
22
.sidebar-content {
33
flex: 0 1 auto;
4-
max-width: 660px;
5-
min-width: 500px;
4+
max-width: 700px;
5+
min-width: 550px;
66
}
77

88
.dropdown-toggle {

src/library-authoring/library-filters/SidebarFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export const SidebarFilters = ({onlyOneType}: FiltersProps) => {
4343
/>
4444
</Stack>
4545
{isOn && <Stack direction="horizontal">
46-
<FilterByTags />
4746
{!(onlyOneType) && <FilterByBlockType />}
47+
<FilterByTags />
4848
<ClearFiltersButton />
4949
<SearchSortWidget />
5050
</Stack>}

0 commit comments

Comments
 (0)