Skip to content

Commit 964abbe

Browse files
authored
fix: right sidebar icon behavior (#1636)
When using the right new-sidebar with the left sidebar navigation, the icon for the right sidebar changed whenever the left sidebar was open. The icon change is supposed to indicate to users that the right sidebar is open. It is confusing to users when the left sidebar navigation is open and the right sidebar icon is filled instead of outlined.
1 parent 96d20e2 commit 964abbe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/courseware/course/new-sidebar/sidebars/discussions-notifications/DiscussionsNotificationsTrigger.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ const DiscussionsNotificationsTrigger = ({ onClick }) => {
3636
[tabs],
3737
);
3838

39+
const sidebarIcon = currentSidebar === ID ? RightSidebarFilled : RightSidebarOutlined;
40+
3941
useEffect(() => {
4042
if (baseUrl && edxProvider) {
4143
dispatch(getCourseDiscussionTopics(courseId));
@@ -81,7 +83,7 @@ const DiscussionsNotificationsTrigger = ({ onClick }) => {
8183

8284
return (
8385
<IconButton
84-
src={currentSidebar ? RightSidebarFilled : RightSidebarOutlined}
86+
src={sidebarIcon}
8587
iconAs={Icon}
8688
onClick={handleClick}
8789
alt={intl.formatMessage(messages.openSidebarTrigger)}

0 commit comments

Comments
 (0)