Skip to content

Commit e19d1d5

Browse files
committed
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 10ad151 commit e19d1d5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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)