Skip to content

Commit 4932de8

Browse files
committed
fix(web): remove nested AppShell causing vertical text layout bug
EntityDetailLayout was wrapping content in AppShell, but MainLayout already provides an AppShell wrapper. Mantine does not support nested AppShell components, causing the inner content area to collapse to 0 width and text to render character-by-character vertically. Replace AppShell with Box to fix entity detail pages (authors, works, institutions, etc.) that were rendering with 120,000+ pixel height.
1 parent dae41ae commit 4932de8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

apps/web/src/components/entity-detail/EntityDetailLayout.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { EntityType } from "@bibgraph/types";
22
import { logger } from "@bibgraph/utils";
3-
import { ActionIcon, AppShell, Badge, Code, Group, Modal, Paper, SegmentedControl, Stack, Text, Title, Tooltip } from "@mantine/core";
3+
import { ActionIcon, Badge, Box, Code, Group, Modal, Paper, SegmentedControl, Stack, Text, Title, Tooltip } from "@mantine/core";
44
import { IconBookmark, IconBookmarkFilled, IconBookmarkOff, IconCode, IconListCheck, IconMenu2, IconX } from "@tabler/icons-react";
55
import React, { ReactNode, useState } from "react";
66

@@ -91,14 +91,13 @@ export const EntityDetailLayout = ({
9191
}
9292
};
9393
return (
94-
<AppShell
95-
padding={isMobile() ? "sm" : "xl"}
94+
<Box
95+
p={isMobile() ? "sm" : "xl"}
9696
bg="var(--mantine-color-body)"
97-
style={{ minHeight: '100vh' }}
97+
style={{ minHeight: '100%' }}
9898
data-testid="entity-detail-layout"
9999
>
100-
<AppShell.Main>
101-
<Stack gap={isMobile() ? "lg" : "xl"}>
100+
<Stack gap={isMobile() ? "lg" : "xl"}>
102101
{/* Header Section */}
103102
<Paper p={isMobile() ? "lg" : "xl"} radius="xl">
104103
<Stack gap="lg">
@@ -388,7 +387,6 @@ export const EntityDetailLayout = ({
388387
}}
389388
/>
390389
</Modal>
391-
</AppShell.Main>
392-
</AppShell>
390+
</Box>
393391
);
394392
};

0 commit comments

Comments
 (0)