From 3b409b0c7a3dd86c91cdd89c1497490ade752609 Mon Sep 17 00:00:00 2001 From: Rafay Date: Wed, 11 Oct 2023 20:28:10 +0500 Subject: [PATCH 1/4] fix: make progress graph respect course settings (#1194) --- src/course-home/progress-tab/ProgressTab.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/course-home/progress-tab/ProgressTab.jsx b/src/course-home/progress-tab/ProgressTab.jsx index 3413d3836f..867035f3c2 100644 --- a/src/course-home/progress-tab/ProgressTab.jsx +++ b/src/course-home/progress-tab/ProgressTab.jsx @@ -18,7 +18,7 @@ const ProgressTab = () => { } = useSelector(state => state.courseHome); const { - gradesFeatureIsFullyLocked, + gradesFeatureIsFullyLocked, disableProgressGraph, } = useModel('progress', courseId); const applyLockedOverlay = gradesFeatureIsFullyLocked ? 'locked-overlay' : ''; @@ -38,7 +38,7 @@ const ProgressTab = () => {
{/* Main body */}
- + {!disableProgressGraph && } {!wideScreen && }
From 7ff00fa830dbfacb8fd7dc23d268eaed6d5eb3e1 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Fri, 9 Feb 2024 18:04:50 +0200 Subject: [PATCH 2/4] fix: correct rtl for handouts --- src/course-home/outline-tab/LmsHtmlFragment.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/course-home/outline-tab/LmsHtmlFragment.jsx b/src/course-home/outline-tab/LmsHtmlFragment.jsx index 191663554c..a07c06548b 100644 --- a/src/course-home/outline-tab/LmsHtmlFragment.jsx +++ b/src/course-home/outline-tab/LmsHtmlFragment.jsx @@ -9,8 +9,9 @@ const LmsHtmlFragment = ({ title, ...rest }) => { + const direction = document.documentElement?.getAttribute('dir') || 'ltr'; const wholePage = ` - + From c8ab1634e1cb6cbf748219b00ea083306e3f7028 Mon Sep 17 00:00:00 2001 From: Ihor Romaniuk Date: Wed, 13 Mar 2024 17:30:19 +0100 Subject: [PATCH 3/4] fix: sequence container width and responsive for sequence navigation block (#1227) --- src/courseware/course/sequence/Sequence.jsx | 40 ++++++++++--------- .../SequenceNavigation.jsx | 3 +- .../course/sidebar/SidebarTriggers.jsx | 6 ++- .../course/sidebar/common/TriggerBase.jsx | 2 +- .../tabs/useIndexOfLastVisibleChild.js | 1 + src/index.scss | 20 +++++++++- 6 files changed, 47 insertions(+), 25 deletions(-) diff --git a/src/courseware/course/sequence/Sequence.jsx b/src/courseware/course/sequence/Sequence.jsx index 529c09b83b..c7b717a69f 100644 --- a/src/courseware/course/sequence/Sequence.jsx +++ b/src/courseware/course/sequence/Sequence.jsx @@ -140,26 +140,28 @@ const Sequence = ({ const gated = sequence && sequence.gatedContent !== undefined && sequence.gatedContent.gated; const defaultContent = ( -
+
- { - logEvent('edx.ui.lms.sequence.next_selected', 'top'); - handleNext(); - }} - onNavigate={(destinationUnitId) => { - logEvent('edx.ui.lms.sequence.tab_selected', 'top', destinationUnitId); - handleNavigate(destinationUnitId); - }} - previousHandler={() => { - logEvent('edx.ui.lms.sequence.previous_selected', 'top'); - handlePrevious(); - }} - /> - {shouldDisplayNotificationTriggerInSequence && } +
+ { + logEvent('edx.ui.lms.sequence.next_selected', 'top'); + handleNext(); + }} + onNavigate={(destinationUnitId) => { + logEvent('edx.ui.lms.sequence.tab_selected', 'top', destinationUnitId); + handleNavigate(destinationUnitId); + }} + previousHandler={() => { + logEvent('edx.ui.lms.sequence.previous_selected', 'top'); + handlePrevious(); + }} + /> + {shouldDisplayNotificationTriggerInSequence && } +
+ ); }; diff --git a/src/courseware/course/sidebar/SidebarTriggers.jsx b/src/courseware/course/sidebar/SidebarTriggers.jsx index 9ef7b724bb..cdc255d52d 100644 --- a/src/courseware/course/sidebar/SidebarTriggers.jsx +++ b/src/courseware/course/sidebar/SidebarTriggers.jsx @@ -1,5 +1,6 @@ import classNames from 'classnames'; import React, { useContext } from 'react'; +import { breakpoints, useWindowSize } from '@edx/paragon'; import SidebarContext from './SidebarContext'; import { SIDEBAR_ORDER, SIDEBARS } from './sidebars'; @@ -8,6 +9,9 @@ const SidebarTriggers = () => { toggleSidebar, currentSidebar, } = useContext(SidebarContext); + + const isMobileView = useWindowSize().width < breakpoints.small.minWidth; + return (
{SIDEBAR_ORDER.map((sidebarId) => { @@ -15,7 +19,7 @@ const SidebarTriggers = () => { const isActive = sidebarId === currentSidebar; return (
diff --git a/src/courseware/course/sidebar/common/TriggerBase.jsx b/src/courseware/course/sidebar/common/TriggerBase.jsx index 16c2845041..5800fb55c8 100644 --- a/src/courseware/course/sidebar/common/TriggerBase.jsx +++ b/src/courseware/course/sidebar/common/TriggerBase.jsx @@ -8,7 +8,7 @@ const SidebarTriggerBase = ({ children, }) => (