Skip to content
Open
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
1 change: 1 addition & 0 deletions apps/web/core/components/sidebar/resizable-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export function ResizableSidebar({
}}
role="complementary"
aria-label="Main sidebar"
data-prevent-outside-click={isMobile}
>
<aside
className={cn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const ProjectNavigation = observer(function ProjectNavigation(props: TPro
const { workItem: workItemIdentifierFromRoute } = useParams();
// store hooks
const { t } = useTranslation();
const { toggleSidebar } = useAppTheme();
const { isExtendedProjectSidebarOpened, toggleExtendedProjectSidebar, toggleSidebar } = useAppTheme();
const { getPartialProjectById } = useProject();
const { allowPermissions } = useUserPermissions();
const {
Expand All @@ -56,6 +56,10 @@ export const ProjectNavigation = observer(function ProjectNavigation(props: TPro
if (window.innerWidth < 768) {
toggleSidebar();
}
// close the extended sidebar if it is open
if (isExtendedProjectSidebarOpened) {
toggleExtendedProjectSidebar(false);
}
};

const baseNavigation = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,20 @@ export const SidebarProjectsListItem = observer(function SidebarProjectsListItem

if (!project) return null;

const isAccordionMode = projectPreferences.navigationMode === "ACCORDION";

const handleItemClick = () => {
if (projectPreferences.navigationMode === "ACCORDION") {
setIsProjectListOpen(!isProjectListOpen);
} else {
router.push(defaultTabUrl);
}
// close the extended sidebar if it is open
if (isExtendedProjectSidebarOpened) {
if (isExtendedProjectSidebarOpened && !isAccordionMode) {
toggleExtendedProjectSidebar(false);
}
};

const isAccordionMode = projectPreferences.navigationMode === "ACCORDION";

const shouldHighlightProject = URLProjectId === project?.id && projectPreferences.navigationMode !== "ACCORDION";

Expand Down
Loading