Skip to content

Commit 8f8a1c3

Browse files
committed
Eliminate all vertical scroll bars from graph view
- Add overflow-hidden to graph route wrapper in App.tsx - Add overflow-hidden class to graph container component - Force body and html overflow to hidden when graph component mounts - Restore original overflow settings when component unmounts - Ensure .graph-container CSS has overflow-hidden - Multi-layered approach prevents scroll bars at all levels - Reset layout button now always visible without scrolling - UI properly resizes to match available screen space
1 parent 1b5e8e6 commit 8f8a1c3

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

packages/web/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function AuthenticatedApp() {
5959
<NotificationProvider>
6060
<GraphProvider>
6161
<Routes>
62-
<Route path="/graph" element={<div className="h-screen"><InteractiveGraphVisualization /></div>} />
62+
<Route path="/graph" element={<div className="h-screen overflow-hidden"><InteractiveGraphVisualization /></div>} />
6363
<Route path="/*" element={
6464
<Layout>
6565
<Routes>

packages/web/src/components/InteractiveGraphVisualization.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ export function InteractiveGraphVisualization() {
6363
const location = useLocation();
6464

6565
const isFullscreen = location.pathname === '/graph';
66+
67+
// Prevent body scroll when graph view is active
68+
useEffect(() => {
69+
const originalBodyOverflow = window.getComputedStyle(document.body).overflow;
70+
const originalHtmlOverflow = window.getComputedStyle(document.documentElement).overflow;
71+
72+
document.body.style.overflow = 'hidden';
73+
document.documentElement.style.overflow = 'hidden';
74+
75+
return () => {
76+
document.body.style.overflow = originalBodyOverflow;
77+
document.documentElement.style.overflow = originalHtmlOverflow;
78+
};
79+
}, []);
6680

6781
const { data: workItemsData, loading, error, refetch } = useQuery(GET_WORK_ITEMS, {
6882
variables: currentGraph ? {
@@ -2180,7 +2194,7 @@ export function InteractiveGraphVisualization() {
21802194

21812195

21822196
return (
2183-
<div ref={containerRef} className="graph-container relative w-full bg-gray-900" style={{ height: '100vh' }}>
2197+
<div ref={containerRef} className="graph-container relative w-full h-full bg-gray-900 overflow-hidden">
21842198
<svg ref={svgRef} className="w-full h-full" style={{ background: 'radial-gradient(circle at center, #1f2937 0%, #111827 100%)' }} />
21852199

21862200

packages/web/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
/* Graph visualization styles */
7575
.graph-container {
76-
@apply w-full h-full;
76+
@apply w-full h-full overflow-hidden;
7777
}
7878

7979
.node {

0 commit comments

Comments
 (0)