Skip to content

Commit 188dcf5

Browse files
committed
Remove the ‘card’ style from the Query page so the sections are clearer
1 parent d5aaba1 commit 188dcf5

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

apps/webapp/app/components/metrics/QueryWidget.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ export type QueryWidgetProps = {
142142
accessory?: ReactNode;
143143
isResizing?: boolean;
144144
isDraggable?: boolean;
145+
/** Additional className applied to the Card wrapper */
146+
className?: string;
145147
/** Callback when edit is clicked. Receives the current data. */
146148
onEdit?: (data: QueryWidgetData) => void;
147149
/** Callback when rename is clicked. Receives the new title. */
@@ -161,6 +163,7 @@ export function QueryWidget({
161163
error,
162164
isResizing,
163165
isDraggable,
166+
className,
164167
onEdit,
165168
onRename,
166169
onDelete,
@@ -195,7 +198,7 @@ export function QueryWidget({
195198

196199
return (
197200
<div className="group h-full">
198-
<Card className="h-full overflow-hidden px-0 pb-0">
201+
<Card className={cn("h-full overflow-hidden px-0 pb-0", className)}>
199202
<Card.Header draggable={isDraggable}>
200203
<div className="flex items-center gap-1.5">{title}</div>
201204
<Card.Accessory>

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,7 @@ export function QueryEditor({
507507
const isLoading = fetcher.state === "submitting" || fetcher.state === "loading";
508508

509509
// Stable string key of result column names (types excluded — they can vary between runs)
510-
const columnNamesKey = results?.columns
511-
? results.columns.map((c) => c.name).join(",")
512-
: "";
510+
const columnNamesKey = results?.columns ? results.columns.map((c) => c.name).join(",") : "";
513511

514512
// Use a ref so the effect can read chartConfig without re-firing on every config tweak
515513
const chartConfigRef = useRef(chartConfig);
@@ -773,7 +771,7 @@ export function QueryEditor({
773771
</div>
774772
) : results?.rows && results?.columns ? (
775773
<div
776-
className={`grid h-full max-h-full overflow-hidden bg-charcoal-900 ${
774+
className={`grid h-full max-h-full overflow-hidden bg-background-bright ${
777775
hasQueryResultsCallouts(results.hiddenColumns, results.periodClipped)
778776
? "grid-rows-[auto_1fr]"
779777
: "grid-rows-[1fr]"
@@ -784,8 +782,9 @@ export function QueryEditor({
784782
periodClipped={results.periodClipped}
785783
organizationSlug={organization.slug}
786784
/>
787-
<div className="overflow-hidden p-2">
785+
<div className="overflow-hidden">
788786
<QueryWidget
787+
className="border-0"
789788
title={
790789
<QueryTitle
791790
isTitleLoading={isTitleLoading}
@@ -829,7 +828,7 @@ export function QueryEditor({
829828
</ClientTabsContent>
830829
<ClientTabsContent
831830
value="graph"
832-
className={`m-0 grid h-full max-h-full min-h-0 overflow-hidden bg-charcoal-900 ${
831+
className={`m-0 grid h-full max-h-full min-h-0 overflow-hidden bg-background-bright ${
833832
results?.rows &&
834833
results.rows.length > 0 &&
835834
hasQueryResultsCallouts(results.hiddenColumns, results.periodClipped)
@@ -878,7 +877,7 @@ export function QueryEditor({
878877
</ClientTabsContent>
879878
<ClientTabsContent
880879
value="bignumber"
881-
className={`m-0 grid h-full max-h-full min-h-0 overflow-hidden bg-charcoal-900 ${
880+
className={`m-0 grid h-full max-h-full min-h-0 overflow-hidden bg-background-bright ${
882881
results?.rows &&
883882
results.rows.length > 0 &&
884883
hasQueryResultsCallouts(results.hiddenColumns, results.periodClipped)
@@ -1219,8 +1218,9 @@ function ResultsChart({
12191218
<>
12201219
<ResizablePanelGroup className="overflow-hidden">
12211220
<ResizablePanel id="chart-results">
1222-
<div className="h-full overflow-hidden bg-charcoal-900 p-2">
1221+
<div className="h-full overflow-hidden bg-background-bright">
12231222
<QueryWidget
1223+
className="border-0"
12241224
title={
12251225
<QueryTitle
12261226
isTitleLoading={isTitleLoading}
@@ -1297,8 +1297,9 @@ function ResultsBigNumber({
12971297
<>
12981298
<ResizablePanelGroup className="overflow-hidden">
12991299
<ResizablePanel id="bignumber-results">
1300-
<div className="h-full overflow-hidden bg-charcoal-900 p-2">
1300+
<div className="h-full overflow-hidden bg-background-bright">
13011301
<QueryWidget
1302+
className="border-0"
13021303
title={
13031304
<QueryTitle
13041305
isTitleLoading={isTitleLoading}

0 commit comments

Comments
 (0)