Skip to content

Commit bb4aab2

Browse files
authored
fix: tater sprite z-index regression from mobile compat PR (#308)
* fix: tater sprite running behind plan document instead of in front Move TaterSpriteRunning inside the z-0 content wrapper stacking context so it layers correctly: above sidebars (z-auto) but below the plan document (z-10). The mobile compat PR (#260) added relative z-0 to the content wrapper, which trapped the plan at z-0 while the sprite at z-40 floated above everything. * fix: move z-10 from main to inner content so sprite runs above grid
1 parent d5e0ff6 commit bb4aab2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/editor/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,6 @@ const App: React.FC = () => {
907907
return (
908908
<ThemeProvider defaultTheme="dark">
909909
<div className="h-screen flex flex-col bg-background overflow-hidden">
910-
{/* Tater sprites */}
911-
{taterMode && <TaterSpriteRunning />}
912910
{/* Minimal Header */}
913911
<header className="h-12 flex items-center justify-between px-2 md:px-4 border-b border-border/50 bg-card/50 backdrop-blur-xl sticky top-0 z-[50]">
914912
<div className="flex items-center gap-2 md:gap-3">
@@ -1180,6 +1178,8 @@ const App: React.FC = () => {
11801178

11811179
{/* Main Content */}
11821180
<div className={`flex-1 flex overflow-hidden relative z-0 ${isResizing ? 'select-none' : ''}`}>
1181+
{/* Tater sprites — inside content wrapper so z-0 stacking context applies */}
1182+
{taterMode && <TaterSpriteRunning />}
11831183
{/* Left Sidebar: collapsed tab flags (when sidebar is closed) */}
11841184
{!sidebar.isOpen && (
11851185
<SidebarTabs
@@ -1240,7 +1240,7 @@ const App: React.FC = () => {
12401240
cancelText="Dismiss"
12411241
showCancel
12421242
/>
1243-
<div className="min-h-full flex flex-col items-center px-2 py-3 md:px-10 md:py-8 xl:px-16">
1243+
<div className="min-h-full flex flex-col items-center px-2 py-3 md:px-10 md:py-8 xl:px-16 relative z-10">
12441244
{/* Annotation Toolstrip (hidden during plan diff) */}
12451245
{!isPlanDiffActive && (
12461246
<div className="w-full mb-3 md:mb-4 flex items-center justify-start" style={{ maxWidth: planMaxWidth }}>

packages/ui/components/TaterSpriteRunning.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const TaterSpriteRunning: React.FC = () => {
2525
right: -DISPLAY_WIDTH, // Start off-screen right
2626
width: DISPLAY_WIDTH,
2727
height: DISPLAY_HEIGHT,
28-
zIndex: 40, // Below plan document (z-50) but above other elements
28+
zIndex: 5, // Above sidebars (z-auto) but below plan document (z-10)
2929
backgroundImage: `url(${spriteSheet})`,
3030
backgroundSize: `${TOTAL_SPRITE_WIDTH}px ${DISPLAY_HEIGHT}px`,
3131
backgroundPosition: 'left center',

0 commit comments

Comments
 (0)