Skip to content
Open
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
12 changes: 9 additions & 3 deletions web-ui/app/_components/store/InstallButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import { useEffect, useState } from 'react';
import { createPortal } from 'react-dom';
import { useRouter } from 'next/navigation';
import { useLocale } from 'next-intl';
import {
Expand All @@ -26,7 +27,7 @@
import type {
InstallChainResolution,
InstallJob,
InstallSetupField,

Check warning on line 30 in web-ui/app/_components/store/InstallButton.tsx

View workflow job for this annotation

GitHub Actions / web-ui (lint + typecheck + vitest)

'InstallSetupField' is defined but never used
InstallValidationError,
LocalizedMarkdown,
} from '../../_lib/storeTypes';
Expand Down Expand Up @@ -585,7 +586,11 @@
);
const submitting = phase.kind === 'submitting';

return (
// Portal to <body> so the drawer escapes the store sidebar's
// `position: sticky` stacking context (which always creates one, even at
// z-index auto). Without this, the drawer's z-50 is trapped inside that
// context and the global header (z-40) paints on top of it.
return createPortal(
<div
className="fixed inset-0 z-50 flex justify-end"
role="dialog"
Expand All @@ -601,7 +606,7 @@

<aside
className={cn(
'relative z-10 flex h-full max-h-screen w-full max-w-xl flex-col',
'relative flex h-full max-h-screen w-full max-w-xl flex-col',
'border-l border-[color:var(--rule-strong)] bg-[color:var(--paper)]',
'shadow-[-20px_0_60px_-20px_rgba(0,0,0,0.3)]',
)}
Expand Down Expand Up @@ -709,7 +714,8 @@
</form>
)}
</aside>
</div>
</div>,
document.body,
);
}

Expand Down
Loading