Skip to content

Commit ef9b5f6

Browse files
committed
Fixes the date/time button not showing the tooltip or icon
1 parent e482ff2 commit ef9b5f6

1 file changed

Lines changed: 32 additions & 24 deletions

File tree

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

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import {
22
ArrowDownTrayIcon,
33
BookmarkIcon,
4+
CalendarIcon,
45
ClipboardIcon,
56
PencilIcon,
6-
XMarkIcon,
77
} from "@heroicons/react/20/solid";
8-
import { IconChartHistogram } from "@tabler/icons-react";
98
import type { OutputColumnMetadata } from "@internal/clickhouse";
9+
import { DialogClose } from "@radix-ui/react-dialog";
1010
import { useFetcher } from "@remix-run/react";
11+
import { IconChartHistogram } from "@tabler/icons-react";
12+
import { formatDurationNanoseconds } from "@trigger.dev/core/v3";
1113
import {
1214
forwardRef,
1315
useCallback,
@@ -20,12 +22,19 @@ import {
2022
import { flushSync } from "react-dom";
2123
import { useTypedFetcher } from "remix-typedjson";
2224
import simplur from "simplur";
23-
import { formatDurationNanoseconds } from "@trigger.dev/core/v3";
2425
import { AISparkleIcon } from "~/assets/icons/AISparkleIcon";
25-
import { BetaTitle } from "~/components/AlphaBadge";
2626
import { ChartConfigPanel, defaultChartConfig } from "~/components/code/ChartConfigPanel";
2727
import { autoFormatSQL, TSQLEditor } from "~/components/code/TSQLEditor";
2828
import { EnvironmentLabel } from "~/components/environments/EnvironmentLabel";
29+
import { PageBody, PageContainer } from "~/components/layout/AppLayout";
30+
import {
31+
QueryWidget,
32+
type BigNumberConfiguration,
33+
type ChartConfiguration,
34+
type QueryWidgetConfig,
35+
type QueryWidgetData,
36+
} from "~/components/metrics/QueryWidget";
37+
import { SaveToDashboardDialog } from "~/components/metrics/SaveToDashboardDialog";
2938
import { Button, LinkButton } from "~/components/primitives/Buttons";
3039
import { Callout } from "~/components/primitives/Callout";
3140
import {
@@ -34,7 +43,11 @@ import {
3443
ClientTabsList,
3544
ClientTabsTrigger,
3645
} from "~/components/primitives/ClientTabs";
46+
import { Dialog, DialogContent, DialogFooter, DialogHeader } from "~/components/primitives/Dialog";
3747
import { Header3 } from "~/components/primitives/Headers";
48+
import { Input } from "~/components/primitives/Input";
49+
import { InputGroup } from "~/components/primitives/InputGroup";
50+
import { Label } from "~/components/primitives/Label";
3851
import { NavBar, PageAccessories, PageTitle } from "~/components/primitives/PageHeader";
3952
import { Paragraph } from "~/components/primitives/Paragraph";
4053
import {
@@ -57,28 +70,14 @@ import { useEnvironment } from "~/hooks/useEnvironment";
5770
import { useOrganization } from "~/hooks/useOrganizations";
5871
import { useProject } from "~/hooks/useProject";
5972
import type { QueryHistoryItem } from "~/presenters/v3/QueryPresenter.server";
73+
import { QueryHelpSidebar } from "~/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query/QueryHelpSidebar";
74+
import { QueryHistoryPopover } from "~/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query/QueryHistoryPopover";
75+
import type { AITimeFilter } from "~/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query/types";
6076
import type { action as titleAction } from "~/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query.ai-title";
6177
import type { QueryScope } from "~/services/queryService.server";
6278
import { downloadFile, rowsToCSV, rowsToJSON } from "~/utils/dataExport";
6379
import { organizationBillingPath } from "~/utils/pathBuilder";
6480
import { querySchemas } from "~/v3/querySchemas";
65-
import { QueryHelpSidebar } from "~/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query/QueryHelpSidebar";
66-
import { QueryHistoryPopover } from "~/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query/QueryHistoryPopover";
67-
import type { AITimeFilter } from "~/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query/types";
68-
import {
69-
type BigNumberConfiguration,
70-
type ChartConfiguration,
71-
QueryWidget,
72-
type QueryWidgetConfig,
73-
type QueryWidgetData,
74-
} from "~/components/metrics/QueryWidget";
75-
import { SaveToDashboardDialog } from "~/components/metrics/SaveToDashboardDialog";
76-
import { PageBody, PageContainer } from "~/components/layout/AppLayout";
77-
import { Dialog, DialogContent, DialogFooter, DialogHeader } from "~/components/primitives/Dialog";
78-
import { DialogClose } from "@radix-ui/react-dialog";
79-
import { Input } from "~/components/primitives/Input";
80-
import { InputGroup } from "~/components/primitives/InputGroup";
81-
import { Label } from "~/components/primitives/Label";
8281

8382
/** Convert a Date or ISO string to ISO string format */
8483
function toISOString(value: Date | string): string {
@@ -310,10 +309,19 @@ const QueryEditorForm = forwardRef<
310309
<SimpleTooltip
311310
asChild
312311
button={
313-
<Button variant="tertiary/small" disabled={true} type="button">
314-
Set in query
315-
</Button>
312+
<span>
313+
<Button
314+
variant="secondary/small"
315+
disabled={true}
316+
type="button"
317+
LeadingIcon={CalendarIcon}
318+
leadingIconClassName="text-text-dimmed/70"
319+
>
320+
Set in query
321+
</Button>
322+
</span>
316323
}
324+
className="max-w-48"
317325
content="Your query includes a WHERE clause with triggered_at so this filter is disabled."
318326
/>
319327
) : (

0 commit comments

Comments
 (0)