style(web): polish dark mode dialogs

This commit is contained in:
maria-rcks authored and maria committed 2026-07-23 01:13:29 -04:00
1 parent c5ff51ec1f
commit b6a2563db7
4 files changed
+83 -35

No files matched your search

+33 -24
View File
@@ -544,9 +544,12 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
return (
<Dialog open={props.open} onOpenChange={handleOpenChange}>
<DialogPopup className="workflow-dialog-surface max-w-xl overflow-hidden before:hidden">
<DialogPopup
backdropClassName="bg-black/40 backdrop-blur-none"
className="workflow-dialog-surface max-w-xl overflow-hidden before:hidden"
>
<div className="flex min-h-0 flex-col overflow-hidden border-foreground/10 bg-transparent">
<DialogHeader className="border-b border-border/70 bg-foreground/[0.025]">
<DialogHeader className="border-b border-border/70 bg-foreground/[0.025] dark:border-transparent dark:bg-transparent">
<DialogTitle>Publish repository</DialogTitle>
<DialogDescription>
Pick where to host it, then point us at a repo to push to.
@@ -567,10 +570,10 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
className={cn(
"grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] gap-x-2 rounded-lg border px-3 py-2 text-left",
index === publishWizardStep
? "border-primary bg-primary/10 ring-1 ring-primary/25"
? "border-primary bg-primary/10 ring-1 ring-primary/25 dark:border-transparent"
: isComplete
? "border-border bg-background"
: "border-border bg-muted/40",
? "border-border bg-background dark:border-transparent dark:bg-white/[0.05]"
: "border-border bg-muted/40 dark:border-transparent dark:bg-white/[0.025]",
!isClickable && "cursor-default",
)}
>
@@ -602,7 +605,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
</div>
</DialogHeader>
<DialogPanel className="space-y-5 border-b border-border/70 bg-muted/20 px-6 py-5">
<DialogPanel className="space-y-5 border-b border-border/70 bg-muted/20 px-6 py-5 dark:border-transparent dark:bg-transparent">
<AnimatedHeight>
<div className={cn("space-y-2", publishWizardStep !== 0 && "hidden")}>
<span
@@ -627,7 +630,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
return (
<div
key={option.value}
className="relative flex cursor-not-allowed items-center gap-3 rounded-lg border border-border bg-background px-3 py-3 text-left opacity-55"
className="relative flex cursor-not-allowed items-center gap-3 rounded-lg border border-border bg-background px-3 py-3 text-left opacity-55 dark:border-transparent dark:bg-white/[0.035]"
>
<option.Icon
className="size-5 shrink-0 text-muted-foreground"
@@ -670,8 +673,8 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
"relative flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-left outline-none transition-[background-color,border-color,box-shadow]",
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
isSelected
? "border-primary bg-background shadow-sm ring-2 ring-primary/35"
: "border-border bg-background hover:border-foreground/20 hover:bg-muted/50",
? "border-primary bg-background shadow-sm ring-2 ring-primary/35 dark:border-transparent dark:bg-primary/10 dark:shadow-none dark:ring-1 dark:ring-primary/30"
: "border-border bg-background hover:border-foreground/20 hover:bg-muted/50 dark:border-transparent dark:bg-white/[0.035] dark:hover:bg-accent",
)}
>
<option.Icon className="size-5 shrink-0" aria-hidden />
@@ -756,8 +759,8 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
"relative flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-2.5 text-left outline-none transition-[background-color,border-color,box-shadow]",
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
isSelected
? "border-primary bg-background shadow-sm ring-2 ring-primary/35"
: "border-border bg-background hover:border-foreground/20 hover:bg-muted/50",
? "border-primary bg-background shadow-sm ring-2 ring-primary/35 dark:border-transparent dark:bg-primary/10 dark:shadow-none dark:ring-1 dark:ring-primary/30"
: "border-border bg-background hover:border-foreground/20 hover:bg-muted/50 dark:border-transparent dark:bg-white/[0.035] dark:hover:bg-accent",
)}
>
<option.Icon
@@ -831,8 +834,8 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
"rounded-md border px-3 py-1.5 text-center text-sm font-medium outline-none transition",
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
isSelected
? "border-primary bg-background ring-2 ring-primary/35 text-foreground"
: "border-border bg-background text-muted-foreground hover:border-foreground/20 hover:text-foreground",
? "border-primary bg-background ring-2 ring-primary/35 text-foreground dark:border-transparent dark:bg-primary/10 dark:ring-1 dark:ring-primary/30"
: "border-border bg-background text-muted-foreground hover:border-foreground/20 hover:text-foreground dark:border-transparent dark:bg-white/[0.035]",
)}
>
{value === "ssh" ? "SSH" : "HTTPS"}
@@ -849,7 +852,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
<div
role="status"
aria-live="polite"
className="flex items-center gap-2 rounded-md border border-input bg-muted/40 px-3 py-2 text-xs text-muted-foreground"
className="flex items-center gap-2 rounded-md border border-input bg-muted/40 px-3 py-2 text-xs text-muted-foreground dark:border-transparent dark:bg-white/[0.035]"
>
<Spinner className="size-3.5" aria-hidden />
Publishing repository to {publishProviderLabel}...
@@ -884,7 +887,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
: `Remote "${publishResult.remoteName}" is set up. Make a commit and push it to share your code.`}
</p>
</div>
<div className="flex items-center gap-2 rounded-lg border border-input bg-muted/40 px-3 py-2">
<div className="flex items-center gap-2 rounded-lg border border-input bg-muted/40 px-3 py-2 dark:border-transparent dark:bg-white/[0.035]">
<currentPublishProvider.Icon className="size-3.5 shrink-0 text-muted-foreground" />
<span className="min-w-0 flex-1 truncate font-mono text-xs text-foreground">
{publishResult.repository.nameWithOwner}
@@ -905,7 +908,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
</Button>
</>
) : (
<div className="rounded-md border border-input bg-background px-3 py-2 text-xs text-muted-foreground">
<div className="rounded-md border border-input bg-background px-3 py-2 text-xs text-muted-foreground dark:border-transparent dark:bg-white/[0.035]">
Publish result unavailable.
</div>
)}
@@ -913,7 +916,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
</AnimatedHeight>
</DialogPanel>
<DialogFooter className="dark:border-white/5 dark:bg-white/[0.025]">
<DialogFooter className="dark:border-transparent dark:bg-transparent">
{publishWizardStep === 2 ? (
<Button size="sm" onClick={() => handleOpenChange(false)}>
Done
@@ -1736,7 +1739,7 @@ export default function GitActionsControl({
>
<ChevronDownIcon aria-hidden="true" className="size-4" />
</MenuTrigger>
<MenuPopup align="end" className="command-menu-surface w-full">
<MenuPopup align="end" className="w-full">
{gitActionMenuItems.map((item) => {
const disabledReason = getMenuActionDisabledReason({
item,
@@ -1825,13 +1828,16 @@ export default function GitActionsControl({
}
}}
>
<DialogPopup className="workflow-dialog-surface before:hidden">
<DialogPopup
backdropClassName="bg-black/40 backdrop-blur-none"
className="command-palette-dialog-surface workflow-dialog-surface before:hidden"
>
<DialogHeader>
<DialogTitle>{COMMIT_DIALOG_TITLE}</DialogTitle>
<DialogDescription>{COMMIT_DIALOG_DESCRIPTION}</DialogDescription>
</DialogHeader>
<DialogPanel className="space-y-4">
<div className="space-y-3 rounded-lg border border-input bg-muted/40 p-3 text-xs">
<div className="space-y-3 rounded-lg border border-input bg-muted/40 p-3 text-xs dark:border-transparent dark:bg-white/[0.035]">
<div className="grid grid-cols-[auto_1fr] items-center gap-x-2 gap-y-1">
<span className="text-muted-foreground">Branch</span>
<span className="flex items-center justify-between gap-2">
@@ -1880,7 +1886,7 @@ export default function GitActionsControl({
<p className="font-medium">none</p>
) : (
<div className="space-y-2">
<ScrollArea className="h-44 rounded-md border border-input bg-background">
<ScrollArea className="h-44 rounded-md border border-input bg-background dark:border-transparent dark:bg-white/[0.025]">
<div className="space-y-1 p-1">
{allFiles.map((file) => {
const isExcluded = excludedFiles.has(file.path);
@@ -1955,7 +1961,7 @@ export default function GitActionsControl({
/>
</div>
</DialogPanel>
<DialogFooter className="dark:border-white/5 dark:bg-white/[0.025]">
<DialogFooter className="dark:border-transparent dark:bg-transparent">
<Button
variant="outline"
size="sm"
@@ -1998,14 +2004,17 @@ export default function GitActionsControl({
}
}}
>
<DialogPopup className="workflow-dialog-surface max-w-xl before:hidden">
<DialogPopup
backdropClassName="bg-black/40 backdrop-blur-none"
className="workflow-dialog-surface max-w-xl before:hidden"
>
<DialogHeader>
<DialogTitle>
{pendingDefaultBranchActionCopy?.title ?? "Run action on default refName?"}
</DialogTitle>
<DialogDescription>{pendingDefaultBranchActionCopy?.description}</DialogDescription>
</DialogHeader>
<DialogFooter className="dark:border-white/5 dark:bg-white/[0.025] sm:flex-wrap sm:items-center">
<DialogFooter className="dark:border-transparent dark:bg-transparent sm:flex-wrap sm:items-center">
<Button
className="w-full sm:mr-auto sm:w-auto"
variant="outline"
@@ -364,7 +364,10 @@ export default function ProjectScriptsControl({
}}
open={dialogOpen}
>
<DialogPopup className="workflow-dialog-surface before:hidden">
<DialogPopup
backdropClassName="bg-black/40 backdrop-blur-none"
className="command-palette-dialog-surface workflow-dialog-surface before:hidden"
>
<DialogHeader>
<DialogTitle>{isEditing ? "Edit Action" : "Add Action"}</DialogTitle>
<DialogDescription>
@@ -382,7 +385,7 @@ export default function ProjectScriptsControl({
<Button
type="button"
variant="outline"
className="size-9 shrink-0 hover:bg-popover active:bg-popover data-pressed:bg-popover data-pressed:shadow-xs/5 data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)]"
className="size-9 shrink-0 hover:bg-popover active:bg-popover data-pressed:bg-popover data-pressed:shadow-xs/5 data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:border-transparent dark:bg-white/[0.035] dark:data-pressed:before:shadow-none"
aria-label="Choose icon"
/>
}
@@ -397,10 +400,10 @@ export default function ProjectScriptsControl({
<button
key={entry.id}
type="button"
className={`relative flex flex-col items-center gap-2 rounded-md border px-2 py-2 text-xs ${
className={`relative flex flex-col items-center gap-2 rounded-md border px-2 py-2 text-xs dark:border-transparent ${
isSelected
? "border-primary/70 bg-primary/10"
: "border-border/70 hover:bg-accent/60"
? "border-primary/70 bg-primary/10 dark:ring-1 dark:ring-primary/30"
: "border-border/70 hover:bg-accent/60 dark:bg-white/[0.035]"
}`}
onClick={() => {
setIcon(entry.id);
@@ -458,7 +461,7 @@ export default function ProjectScriptsControl({
Open this URL in the in-app preview when this action runs.
</p>
</div>
<label className="flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm">
<label className="flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm dark:border-transparent dark:bg-white/[0.035]">
<span>Run automatically on worktree creation</span>
<Switch
checked={runOnWorktreeCreate}
@@ -466,7 +469,7 @@ export default function ProjectScriptsControl({
/>
</label>
<label
className={`flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm ${
className={`flex items-center justify-between gap-3 rounded-md border border-border/70 px-3 py-2 text-sm dark:border-transparent dark:bg-white/[0.035] ${
previewUrl.trim().length === 0 ? "opacity-60" : ""
}`}
>
@@ -480,7 +483,7 @@ export default function ProjectScriptsControl({
{validationError && <p className="text-sm text-destructive">{validationError}</p>}
</form>
</DialogPanel>
<DialogFooter className="dark:border-white/5 dark:bg-white/[0.025]">
<DialogFooter className="dark:border-transparent dark:bg-transparent">
{isEditing && (
<Button
type="button"
+3 -1
View File
@@ -49,17 +49,19 @@ function DialogViewport({ className, ...props }: DialogPrimitive.Viewport.Props)
function DialogPopup({
className,
backdropClassName,
children,
showCloseButton = true,
bottomStickOnMobile = true,
...props
}: DialogPrimitive.Popup.Props & {
backdropClassName?: string;
showCloseButton?: boolean;
bottomStickOnMobile?: boolean;
}) {
return (
<DialogPortal>
<DialogBackdrop />
<DialogBackdrop className={backdropClassName} />
<DialogViewport
className={cn(bottomStickOnMobile && "max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12")}
>
+36 -2
View File
@@ -404,13 +404,22 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
.workflow-dialog-surface {
border-color: transparent;
background: color-mix(in srgb, var(--popover) 82%, transparent);
background: var(--secondary);
-webkit-backdrop-filter: blur(16px);
backdrop-filter: blur(16px);
box-shadow: 0 24px 64px -24px rgb(0 0 0 / 65%);
}
.command-palette-dialog-surface {
border-color: transparent !important;
background: var(--secondary) !important;
-webkit-backdrop-filter: blur(16px);
backdrop-filter: blur(16px);
box-shadow: 0 24px 64px -24px rgb(0 0 0 / 65%) !important;
}
.dark .dropdown-glass {
background: color-mix(in srgb, var(--secondary) 80%, var(--background));
box-shadow: 0 18px 44px -18px rgb(0 0 0 / 80%);
}
@@ -425,7 +434,32 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
}
.dark .workflow-dialog-surface {
background: color-mix(in srgb, var(--popover) 76%, transparent);
background: var(--secondary);
-webkit-backdrop-filter: blur(16px);
backdrop-filter: blur(16px);
}
.dark .command-palette-dialog-surface {
box-shadow: none !important;
}
.dark
.command-palette-dialog-surface
:is([data-slot="input-control"], [data-slot="textarea-control"]) {
background: var(--secondary) !important;
}
.dark
.command-palette-dialog-surface
:is([data-slot="input-control"], [data-slot="textarea-control"]):not(:has(:focus-visible)) {
border-color: transparent !important;
box-shadow: none !important;
}
.dark
.command-palette-dialog-surface
:is([data-slot="input-control"], [data-slot="textarea-control"])::before {
box-shadow: none !important;
}
.dark .chat-composer-context-strip::before {