Skip to content

Commit d1f8b29

Browse files
refactor(web): use icon-xs where icon buttons were forced to size-6
Three icon-micro/icon-xs buttons overrode themselves to size-6, which is what icon-xs already is on desktop. The account pages also shrank three sm buttons to 13px; they now read at the sm size like every other button. Lowers the no-restyle ceiling from 808 to 804. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent b86352d commit d1f8b29

8 files changed

Lines changed: 8 additions & 18 deletions

File tree

‎apps/web/src/components/LegacySidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3040,7 +3040,7 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent(
30403040
variant="ghost-muted"
30413041
aria-label="Add project"
30423042
data-testid="sidebar-add-project-trigger"
3043-
className="size-6 [--control-icon-color:currentColor] text-icon-muted"
3043+
className="[--control-icon-color:currentColor] text-icon-muted"
30443044
onClick={openAddProject}
30453045
/>
30463046
}

‎apps/web/src/components/RightPanelTabs.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
12601260
render={
12611261
<Button
12621262
aria-label="Add panel surface"
1263-
className="size-6 shrink-0"
1263+
className="shrink-0"
12641264
size="icon-xs"
12651265
variant="ghost-muted"
12661266
/>

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4517,7 +4517,7 @@ export default function Sidebar() {
45174517
tabIndex={-1}
45184518
aria-hidden="true"
45194519
title={`Project settings for ${project.displayName}`}
4520-
className="ml-auto size-6 [--control-icon-color:currentColor] text-icon-muted focus-visible:bg-accent focus-visible:text-foreground"
4520+
className="ml-auto [--control-icon-color:currentColor] text-icon-muted focus-visible:bg-accent focus-visible:text-foreground"
45214521
onPointerDown={(event) => event.stopPropagation()}
45224522
onClick={(event) => {
45234523
void handleProjectSettings(event, project);

‎apps/web/src/components/chat/MessagesTimeline.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,9 +1814,8 @@ function QueuedMessageTimelineRow({
18141814
render={
18151815
<Button
18161816
type="button"
1817-
size="icon-micro"
1817+
size="icon-xs"
18181818
variant="ghost-muted"
1819-
className="size-6"
18201819
onPointerDown={(event) => event.preventDefault()}
18211820
onClick={() => ctx.onSteerQueuedMessage(queuedMessage.id)}
18221821
aria-label="Send now"
@@ -1837,9 +1836,8 @@ function QueuedMessageTimelineRow({
18371836
render={
18381837
<Button
18391838
type="button"
1840-
size="icon-micro"
1839+
size="icon-xs"
18411840
variant="ghost-muted"
1842-
className="size-6"
18431841
onPointerDown={(event) => event.preventDefault()}
18441842
onClick={() => ctx.onRemoveQueuedMessage(queuedMessage.id)}
18451843
aria-label="Cancel and return to the composer"

‎apps/web/src/components/clerk/ClerkUserProfilePage.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function ClerkUserProfileRefreshButton({
5252
<Button
5353
size="sm"
5454
variant="outline"
55-
className={cn("text-[0.8125rem]", className)}
55+
className={className}
5656
disabled={disabled || isPending}
5757
onClick={onClick}
5858
>

‎apps/web/src/components/clerk/T3ConnectUserProfilePage.tsx‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ export function T3ConnectEnvironmentRow(props: {
6060
</div>
6161
<CollapsibleTrigger
6262
render={
63-
<Button
64-
size="sm"
65-
variant="destructive-outline"
66-
className="text-[0.8125rem]"
67-
disabled={props.mutationPending}
68-
>
63+
<Button size="sm" variant="destructive-outline" disabled={props.mutationPending}>
6964
Deregister
7065
</Button>
7166
}
@@ -93,7 +88,6 @@ export function T3ConnectEnvironmentRow(props: {
9388
<Button
9489
size="sm"
9590
variant="ghost"
96-
className="text-[0.8125rem]"
9791
disabled={props.mutationPending}
9892
onClick={() => props.onConfirmationChange(false)}
9993
>
@@ -102,7 +96,6 @@ export function T3ConnectEnvironmentRow(props: {
10296
<Button
10397
size="sm"
10498
variant="destructive"
105-
className="text-[0.8125rem]"
10699
disabled={props.mutationPending}
107100
onClick={() => props.onDeregister(environment)}
108101
>

‎apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,6 @@ export function PullRequestDetailPanel({
20002000
aria-label={
20012001
refreshing ? "Refreshing pull request" : "More pull request actions"
20022002
}
2003-
className="size-6"
20042003
size="icon-xs"
20052004
variant="ghost-muted"
20062005
/>

‎scripts/lint-restyle-ceiling.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as NodeURL from "node:url";
88
// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the
99
// count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you
1010
// migrate a file, and delete this script when the rule becomes an error.
11-
export const RESTYLE_CEILING = 1075;
11+
export const RESTYLE_CEILING = 1071;
1212

1313
const RULE = "shadcn(no-restyle)";
1414

0 commit comments

Comments
 (0)