Skip to content

Commit 68a919c

Browse files
committed
fix(webapp): light theme polish for query, apikeys, alerts, regions, billing
- white query editor and apikeys accordion surfaces - white Cancel and Contact us buttons - drop the doubled hover ring on the regions suggest button - route the section-header menu through the shared ellipsis primitive
1 parent 030b9a5 commit 68a919c

8 files changed

Lines changed: 36 additions & 13 deletions

File tree

apps/webapp/app/components/navigation/SideMenuHeader.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { useNavigation } from "@remix-run/react";
22
import { useEffect, useState } from "react";
33
import { motion } from "framer-motion";
4-
import { Popover, PopoverContent, PopoverCustomTrigger } from "../primitives/Popover";
5-
import { EllipsisHorizontalIcon } from "@heroicons/react/20/solid";
4+
import { Popover, PopoverContent, PopoverEllipseTrigger } from "../primitives/Popover";
65

76
export function SideMenuHeader({
87
title,
@@ -30,7 +29,7 @@ export function SideMenuHeader({
3029

3130
return (
3231
<motion.div
33-
className="group flex h-4 items-center justify-between overflow-hidden pl-1.5"
32+
className="group/side-header flex h-4 items-center justify-between overflow-hidden pl-1.5"
3433
initial={false}
3534
animate={{
3635
opacity: hasCollapsedTitle ? 1 : isCollapsed ? 0 : 1,
@@ -53,9 +52,12 @@ export function SideMenuHeader({
5352
</h2>
5453
{children !== undefined ? (
5554
<Popover onOpenChange={(open) => setHeaderMenuOpen(open)} open={isHeaderMenuOpen}>
56-
<PopoverCustomTrigger className="p-1">
57-
<EllipsisHorizontalIcon className="h-4 w-4 text-text-faint transition group-hover:text-text-bright" />
58-
</PopoverCustomTrigger>
55+
<PopoverEllipseTrigger
56+
isOpen={isHeaderMenuOpen}
57+
variant="ghost"
58+
orientation="horizontal"
59+
className="group-hover/side-header:text-text-bright"
60+
/>
5961
<PopoverContent
6062
className="min-w-max overflow-y-auto p-0 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-surface-control"
6163
align="start"

apps/webapp/app/components/primitives/Popover.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { CheckIcon } from "@heroicons/react/20/solid";
4-
import { EllipsisVerticalIcon } from "@heroicons/react/24/solid";
4+
import { EllipsisHorizontalIcon, EllipsisVerticalIcon } from "@heroicons/react/24/solid";
55
import * as PopoverPrimitive from "@radix-ui/react-popover";
66
import { Link } from "@remix-run/react";
77
import * as React from "react";
@@ -279,20 +279,29 @@ const popoverVerticalEllipseVariants = {
279279
"size-6 rounded border border-border-bright bg-secondary text-text-bright hover:bg-surface-control hover:border-border-brighter",
280280
icon: "size-4",
281281
},
282+
// No box/background — the icon inherits the trigger's text color, so callers
283+
// can drive brightening from a parent hover (e.g. a section header).
284+
ghost: {
285+
trigger: "p-1 text-text-faint hover:text-text-bright",
286+
icon: "size-4",
287+
},
282288
} as const;
283289

284290
type PopoverVerticalEllipseVariant = keyof typeof popoverVerticalEllipseVariants;
285291

286-
function PopoverVerticalEllipseTrigger({
292+
function PopoverEllipseTrigger({
287293
isOpen,
288294
variant = "minimal",
295+
orientation = "vertical",
289296
className,
290297
...props
291298
}: {
292299
isOpen?: boolean;
293300
variant?: PopoverVerticalEllipseVariant;
301+
orientation?: "vertical" | "horizontal";
294302
} & React.ComponentPropsWithoutRef<typeof PopoverTrigger>) {
295303
const styles = popoverVerticalEllipseVariants[variant];
304+
const Icon = orientation === "horizontal" ? EllipsisHorizontalIcon : EllipsisVerticalIcon;
296305
return (
297306
<PopoverTrigger
298307
{...props}
@@ -302,18 +311,22 @@ function PopoverVerticalEllipseTrigger({
302311
className
303312
)}
304313
>
305-
<EllipsisVerticalIcon className={cn(styles.icon, "transition")} />
314+
<Icon className={cn(styles.icon, "transition")} />
306315
</PopoverTrigger>
307316
);
308317
}
309318

319+
// Back-compat alias: the trigger now supports both orientations.
320+
const PopoverVerticalEllipseTrigger = PopoverEllipseTrigger;
321+
310322
export {
311323
Popover,
312324
PopoverArrowTrigger,
313325
PopoverContent,
314326
PopoverCustomTrigger,
315327
PopoverMenuItem,
316328
PopoverSectionHeader,
329+
PopoverEllipseTrigger,
317330
PopoverSideMenuTrigger,
318331
PopoverTrigger,
319332
PopoverVerticalEllipseTrigger,

apps/webapp/app/components/query/QueryEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ const QueryEditorForm = forwardRef<
241241
);
242242

243243
return (
244-
<div className="flex h-full flex-col gap-2 bg-background-deep pb-2">
244+
<div className="flex h-full flex-col gap-2 bg-white pb-2 dark:bg-background-deep">
245245
<TSQLEditor
246246
defaultValue={query}
247247
onChange={setQuery}

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export default function Page() {
471471
cancelButton={
472472
<LinkButton
473473
to={v3ProjectAlertsPath(organization, project, environment)}
474-
variant="tertiary/medium"
474+
variant="secondary/medium"
475475
>
476476
Cancel
477477
</LinkButton>

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.apikeys/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export default function Page() {
190190
)}
191191

192192
<Accordion type="single" collapsible>
193-
<AccordionItem value="item-1">
193+
<AccordionItem value="item-1" className="bg-white dark:bg-transparent">
194194
<AccordionTrigger>How to set these environment variables</AccordionTrigger>
195195
<AccordionContent>
196196
<div className="flex flex-col gap-2">

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.regions/route.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ export default function Page() {
282282
<Paragraph variant="extra-small">Suggest a new region</Paragraph>
283283
</TableCell>
284284
<TableCellMenu
285+
className="suggest-region-cell"
285286
alignment="right"
286287
isSticky
287288
visibleButtons={

apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ export function TierEnterprise() {
759759
<Feedback
760760
defaultValue="enterprise"
761761
button={
762-
<div className="flex h-10 w-full cursor-pointer items-center justify-center rounded border border-border-bright/50 hover:border-border-bright dark:border-border-bright dark:hover:border-border-brighter bg-tertiary px-8 text-base font-medium transition hover:bg-surface-control">
762+
<div className="flex h-10 w-full cursor-pointer items-center justify-center rounded border border-border-bright/50 bg-secondary px-8 text-base font-medium shadow-xs transition hover:bg-background-raised dark:border-border-bright dark:hover:border-border-brighter">
763763
<span className="text-center text-text-bright">Contact us</span>
764764
</div>
765765
}

apps/webapp/app/tailwind.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,3 +765,10 @@
765765
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
766766
}
767767
}
768+
769+
/* The table row-hover menu wraps the always-visible "Suggest a region" button
770+
in a ring container; on light that ring doubles up with the button's own
771+
border, so drop it here. */
772+
[data-theme="light"] .suggest-region-cell > div > div {
773+
box-shadow: none;
774+
}

0 commit comments

Comments
 (0)