Skip to content

Commit f782a43

Browse files
committed
Unified style for all clear filters buttons
1 parent a5730e4 commit f782a43

9 files changed

Lines changed: 65 additions & 22 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export function QueuesFilter() {
3939
variant="secondary/small"
4040
shortcut={shortcut}
4141
tooltipTitle="Filter by queue"
42+
className="pl-1.5"
4243
>
4344
<span className="ml-1">Queues</span>
4445
</SelectTrigger>

apps/webapp/app/components/runs/v3/BatchFilters.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ export function BatchFilters(props: BatchFiltersProps) {
7777
<PermanentBatchIdFilter />
7878
<TimeFilter shortcut={{ key: "d" }} />
7979
{hasFilters && (
80-
<Form className="h-6">
81-
<Button variant="minimal/small" LeadingIcon={XMarkIcon} tooltip="Clear all filters" />
80+
<Form className="-ml-1 h-6">
81+
<Button
82+
variant="minimal/small"
83+
LeadingIcon={XMarkIcon}
84+
tooltip="Clear all filters"
85+
className="group-hover/button:bg-transparent"
86+
leadingIconClassName="group-hover/button:text-text-bright"
87+
/>
8288
</Form>
8389
)}
8490
</div>

apps/webapp/app/components/runs/v3/RunFilters.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,17 @@ export function RunsFilters(props: RunFiltersProps) {
369369
<AppliedFilters {...props} />
370370
<FilterMenu {...props} />
371371
{hasFilters && (
372-
<Form className="h-6">
372+
<Form className="-ml-1 h-6">
373373
{searchParams.has("rootOnly") && (
374374
<input type="hidden" name="rootOnly" value={searchParams.get("rootOnly") as string} />
375375
)}
376-
<Button variant="minimal/small" LeadingIcon={XMarkIcon} tooltip="Clear all filters" />
376+
<Button
377+
variant="minimal/small"
378+
LeadingIcon={XMarkIcon}
379+
tooltip="Clear all filters"
380+
className="group-hover/button:bg-transparent"
381+
leadingIconClassName="group-hover/button:text-text-bright"
382+
/>
377383
</Form>
378384
)}
379385
</div>

apps/webapp/app/components/runs/v3/ScheduleFilters.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,14 @@ function ClearFiltersButton() {
247247
}, [location, navigate]);
248248

249249
return (
250-
<div className="h-6">
250+
<div className="-ml-1 h-6">
251251
<Button
252252
variant="minimal/small"
253253
onClick={clearFilters}
254254
LeadingIcon={XMarkIcon}
255255
tooltip="Clear all filters"
256+
className="group-hover/button:bg-transparent"
257+
leadingIconClassName="group-hover/button:text-text-bright"
256258
/>
257259
</div>
258260
);

apps/webapp/app/components/runs/v3/WaitpointTokenFilters.tsx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,14 @@ export function WaitpointTokenFilters(props: WaitpointTokenFiltersProps) {
7979
<PermanentIdempotencyKeyFilter />
8080
<TimeFilter shortcut={{ key: "d" }} />
8181
{hasFilters && (
82-
<Form className="h-6">
83-
<Button variant="minimal/small" LeadingIcon={XMarkIcon} tooltip="Clear all filters" />
82+
<Form className="-ml-1 h-6">
83+
<Button
84+
variant="minimal/small"
85+
LeadingIcon={XMarkIcon}
86+
tooltip="Clear all filters"
87+
className="group-hover/button:bg-transparent"
88+
leadingIconClassName="group-hover/button:text-text-bright"
89+
/>
8490
</Form>
8591
)}
8692
</div>
@@ -193,9 +199,7 @@ function PermanentStatusFilter() {
193199
label="Status"
194200
icon={<StatusIcon className="size-3.5" />}
195201
value={appliedSummary(
196-
selectedStatuses.map((v) =>
197-
waitpointStatusTitle(v as WaitpointTokenStatus)
198-
)
202+
selectedStatuses.map((v) => waitpointStatusTitle(v as WaitpointTokenStatus))
199203
)}
200204
onRemove={() => del(["statuses", "cursor", "direction"])}
201205
variant="secondary/small"
@@ -391,7 +395,9 @@ function PermanentTagsFilter() {
391395
);
392396
}
393397

394-
function WaitpointIdDropdown(props: Omit<IdFilterDropdownProps, "label" | "placeholder" | "paramKey" | "validate">) {
398+
function WaitpointIdDropdown(
399+
props: Omit<IdFilterDropdownProps, "label" | "placeholder" | "paramKey" | "validate">
400+
) {
395401
return (
396402
<IdFilterDropdown
397403
{...props}
@@ -474,7 +480,9 @@ function PermanentWaitpointIdFilter() {
474480
);
475481
}
476482

477-
function IdempotencyKeyDropdown(props: Omit<IdFilterDropdownProps, "label" | "placeholder" | "paramKey" | "validate">) {
483+
function IdempotencyKeyDropdown(
484+
props: Omit<IdFilterDropdownProps, "label" | "placeholder" | "paramKey" | "validate">
485+
) {
478486
return (
479487
<IdFilterDropdown
480488
{...props}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,13 @@ export function MetricDashboard({
308308
/>
309309
{hasAppliedFilters && (
310310
<Form className="-ml-1 h-6">
311-
<Button variant="minimal/small" LeadingIcon={XMarkIcon} tooltip="Clear all filters" />
311+
<Button
312+
variant="minimal/small"
313+
LeadingIcon={XMarkIcon}
314+
tooltip="Clear all filters"
315+
className="group-hover/button:bg-transparent"
316+
leadingIconClassName="group-hover/button:text-text-bright"
317+
/>
312318
</Form>
313319
)}
314320
</div>

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,13 @@ function FiltersBar({
432432
shortcut={timeShortcut}
433433
/>
434434
{hasFilters && (
435-
<Form className="h-6">
435+
<Form className="-ml-1 h-6">
436436
<Button
437-
variant="secondary/small"
437+
variant="minimal/small"
438438
LeadingIcon={XMarkIcon}
439439
tooltip="Clear all filters"
440+
className="group-hover/button:bg-transparent"
441+
leadingIconClassName="group-hover/button:text-text-bright"
440442
/>
441443
</Form>
442444
)}
@@ -453,11 +455,13 @@ function FiltersBar({
453455
shortcut={timeShortcut}
454456
/>
455457
{hasFilters && (
456-
<Form className="h-6">
458+
<Form className="-ml-1 h-6">
457459
<Button
458-
variant="secondary/small"
460+
variant="minimal/small"
459461
LeadingIcon={XMarkIcon}
460462
tooltip="Clear all filters"
463+
className="group-hover/button:bg-transparent"
464+
leadingIconClassName="group-hover/button:text-text-bright"
461465
/>
462466
</Form>
463467
)}

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,13 @@ function FiltersBar({
269269
<TimeFilter defaultPeriod={defaultPeriod} maxPeriodDays={retentionLimitDays} />
270270
<LogsLevelFilter />
271271
{hasFilters && (
272-
<Form className="h-6">
272+
<Form className="-ml-1 h-6">
273273
<Button
274-
variant="secondary/small"
274+
variant="minimal/small"
275275
LeadingIcon={XMarkIcon}
276276
tooltip="Clear all filters"
277+
className="group-hover/button:bg-transparent"
278+
leadingIconClassName="group-hover/button:text-text-bright"
277279
/>
278280
</Form>
279281
)}
@@ -286,11 +288,13 @@ function FiltersBar({
286288
<LogsLevelFilter />
287289
<SearchInput />
288290
{hasFilters && (
289-
<Form className="h-6">
291+
<Form className="-ml-1 h-6">
290292
<Button
291-
variant="secondary/small"
293+
variant="minimal/small"
292294
LeadingIcon={XMarkIcon}
293295
tooltip="Clear all filters"
296+
className="group-hover/button:bg-transparent"
297+
leadingIconClassName="group-hover/button:text-text-bright"
294298
/>
295299
</Form>
296300
)}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,13 @@ function FiltersBar({
313313
<FeaturesFilter features={allFeatures} />
314314
{hasFilters && (
315315
<Form className="-ml-1 h-6">
316-
<Button variant="minimal/small" LeadingIcon={XMarkIcon} tooltip="Clear all filters" />
316+
<Button
317+
variant="minimal/small"
318+
LeadingIcon={XMarkIcon}
319+
tooltip="Clear all filters"
320+
className="group-hover/button:bg-transparent"
321+
leadingIconClassName="group-hover/button:text-text-bright"
322+
/>
317323
</Form>
318324
)}
319325
</div>

0 commit comments

Comments
 (0)