feat(ui): add existing-report analytics destination

This commit is contained in:
cesnimda
2026-10-06 19:26:14 +02:00
parent ec6baaeddd
commit 42a6e425b6
37 changed files with 2523 additions and 53 deletions
+10
View File
@@ -216,6 +216,14 @@ export default function AppShell({
() => activeNavItemTo(pathname, [...nav, ...navBottom]),
[pathname, nav, navBottom],
);
const desktopNavigationRef = useRef<HTMLDivElement>(null);
const mobileNavigationRef = useRef<HTMLDivElement>(null);
// New destinations can extend the existing scrollable list below its initial viewport.
// Reveal the actual current item on entry, without resetting a user's later manual scroll.
useEffect(() => {
const navigation = isMobile ? mobileNavigationRef.current : desktopNavigationRef.current;
navigation?.querySelector<HTMLElement>('[aria-current="page"]')?.scrollIntoView?.({ block: "nearest", inline: "nearest" });
}, [activeTo, navCollapsed, isMobile, drawerOpen, headerHeight]);
const renderNavList = (groups: Array<[string, NavItem[]]>) => (
<Box sx={{ px: navCollapsed ? 0.75 : 1.25, pt: 1 }}>
@@ -577,6 +585,7 @@ export default function AppShell({
</AppBar>
<Drawer
ref={desktopNavigationRef}
variant="permanent"
sx={{
display: isMobile ? "none" : "block",
@@ -598,6 +607,7 @@ export default function AppShell({
</Drawer>
<Drawer
ref={mobileNavigationRef}
variant="temporary"
open={isMobile && drawerOpen}
onClose={() => onToggleDrawer(false)}