refactor(web): drop className overrides that repeat the base styles (#12984)
Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
5a61f50cce
commit
c26119ada3
19 files changed
+28
-28
No files matched your search
@@ -244,7 +244,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) {
|
||||
side="left"
|
||||
collapsible="offcanvas"
|
||||
data-app-sidebar=""
|
||||
className="border-r border-sidebar-border bg-sidebar text-sidebar-foreground"
|
||||
className="border-r border-sidebar-border"
|
||||
resizable={{
|
||||
maxWidth: sidebarMaximumWidth,
|
||||
minWidth: THREAD_SIDEBAR_MIN_WIDTH,
|
||||
|
||||
@@ -861,7 +861,7 @@ export function BranchToolbarBranchSelector({
|
||||
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||
<ComboboxEmpty>No refs found.</ComboboxEmpty>
|
||||
<div className="relative min-h-0 w-full max-h-56 flex-1 overflow-hidden">
|
||||
<ComboboxListVirtualized className="size-full min-w-0 p-0">
|
||||
<ComboboxListVirtualized>
|
||||
<LegendList<string>
|
||||
ref={branchListRef}
|
||||
data={filteredBranchPickerItems}
|
||||
|
||||
@@ -75,7 +75,7 @@ export function ConfirmDialogHost() {
|
||||
if (!open) completeConfirmDialogClose();
|
||||
}}
|
||||
>
|
||||
<AlertDialogPopup className="max-w-lg">
|
||||
<AlertDialogPopup>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle className="wrap-anywhere">{copy.title}</AlertDialogTitle>
|
||||
{copy.description ? (
|
||||
|
||||
@@ -5,7 +5,7 @@ import { WorkspacePageHeader } from "./WorkspacePageHeader";
|
||||
|
||||
export function NoActiveThreadState() {
|
||||
return (
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
|
||||
<div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
|
||||
<WorkspacePageHeader electron={isElectron} className="border-b border-border">
|
||||
{isElectron ? (
|
||||
@@ -22,8 +22,8 @@ export function NoActiveThreadState() {
|
||||
<Empty className="flex-1">
|
||||
<div className="w-full max-w-lg px-8 py-12">
|
||||
<EmptyHeader className="max-w-none">
|
||||
<EmptyTitle className="text-foreground text-xl">Pick a thread to continue</EmptyTitle>
|
||||
<EmptyDescription className="mt-2 text-sm text-muted-foreground/78">
|
||||
<EmptyTitle className="text-foreground">Pick a thread to continue</EmptyTitle>
|
||||
<EmptyDescription className="mt-2 text-muted-foreground/78">
|
||||
Select an existing thread or create a new one to get started.
|
||||
</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
|
||||
@@ -10,7 +10,7 @@ export function NoProjectsHero() {
|
||||
const openAddProject = useCallback(() => openCommandPalette({ open: "add-project" }), []);
|
||||
|
||||
return (
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
|
||||
<div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
|
||||
<Empty className="flex-1">
|
||||
<div className="w-full max-w-lg px-8 py-12">
|
||||
@@ -18,7 +18,7 @@ export function NoProjectsHero() {
|
||||
<EmptyTitle className="text-foreground text-2xl sm:text-3xl">
|
||||
What should we work on?
|
||||
</EmptyTitle>
|
||||
<EmptyDescription className="mt-2 text-sm text-muted-foreground/78">
|
||||
<EmptyDescription className="mt-2 text-muted-foreground/78">
|
||||
Add a project to start your first thread.
|
||||
</EmptyDescription>
|
||||
<div className="mt-6 flex justify-center">
|
||||
|
||||
@@ -158,7 +158,7 @@ export default function ProjectScriptsControl({
|
||||
>
|
||||
<ScriptIcon icon={fileScript.icon ?? "play"} className="size-4" />
|
||||
<MenuItemLabel className="truncate">{fileScript.name}</MenuItemLabel>
|
||||
<MenuShortcut className="ms-auto">
|
||||
<MenuShortcut>
|
||||
<DownloadIcon className="size-3.5" aria-label="Import" />
|
||||
</MenuShortcut>
|
||||
</MenuItem>
|
||||
|
||||
@@ -207,7 +207,7 @@ export function ThreadRouteView({ target }: { target: ThreadRouteTarget }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<SidebarInset className="h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh">
|
||||
<SidebarInset className="h-svh min-h-0 overflow-hidden overscroll-y-none md:h-dvh">
|
||||
{view}
|
||||
</SidebarInset>
|
||||
);
|
||||
|
||||
@@ -956,7 +956,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
|
||||
|
||||
{/* Model list */}
|
||||
<div className="relative min-h-0 flex-1 overflow-hidden pr-px">
|
||||
<ComboboxListVirtualized className="size-full min-w-0 p-0 not-empty:p-0">
|
||||
<ComboboxListVirtualized className="not-empty:p-0">
|
||||
<LegendList<string>
|
||||
ref={modelListRef}
|
||||
data={filteredItemKeys}
|
||||
|
||||
@@ -219,7 +219,7 @@ export function FontFamilyPicker({
|
||||
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||
<ComboboxEmpty>No fonts found.</ComboboxEmpty>
|
||||
<div className="relative min-h-0 max-h-72 w-full flex-1 overflow-hidden">
|
||||
<ComboboxListVirtualized className="size-full min-w-0 p-0">
|
||||
<ComboboxListVirtualized>
|
||||
<LegendList<string>
|
||||
ref={listRef}
|
||||
data={items}
|
||||
|
||||
@@ -845,7 +845,7 @@ function TokenStreamingWarningDialog({
|
||||
}) {
|
||||
return (
|
||||
<AlertDialog open={open} onOpenChange={onOpenChange}>
|
||||
<AlertDialogPopup className="max-w-lg">
|
||||
<AlertDialogPopup>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Token by token is a worse experience</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
|
||||
@@ -344,7 +344,7 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {
|
||||
)}
|
||||
</SidebarGroup>
|
||||
</SidebarContent>
|
||||
<SidebarFooter className="px-[var(--sidebar-content-inset)] py-1">
|
||||
<SidebarFooter>
|
||||
<Suspense fallback={null}>
|
||||
<T3ConnectSidebarSignIn />
|
||||
</Suspense>
|
||||
|
||||
@@ -221,7 +221,7 @@ export const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {
|
||||
|
||||
export const SidebarChromeFooter = memo(function SidebarChromeFooter() {
|
||||
return (
|
||||
<SidebarFooter className="px-[var(--sidebar-content-inset)] py-1">
|
||||
<SidebarFooter>
|
||||
<SidebarThreadUndoNotice />
|
||||
<SidebarProviderUpdatePill />
|
||||
<SidebarUpdateArchitectureWarning />
|
||||
|
||||
@@ -247,7 +247,7 @@ function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
|
||||
function ComboboxListVirtualized({ className, ...props }: ComboboxPrimitive.List.Props) {
|
||||
return (
|
||||
<ComboboxPrimitive.List
|
||||
className={cn("not-empty:px-1 not-empty:py-1", className)}
|
||||
className={cn("size-full min-w-0 not-empty:px-1 not-empty:py-1", className)}
|
||||
data-slot="combobox-list"
|
||||
{...props}
|
||||
/>
|
||||
|
||||
@@ -558,7 +558,7 @@ function SidebarHeader({ className, ...props }: React.ComponentProps<"div">) {
|
||||
function SidebarFooter({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
className={cn("flex flex-col gap-2 p-2", className)}
|
||||
className={cn("flex flex-col gap-2 px-[var(--sidebar-content-inset)] py-1", className)}
|
||||
data-sidebar="footer"
|
||||
data-slot="sidebar-footer"
|
||||
{...props}
|
||||
|
||||
@@ -366,7 +366,7 @@ export function UsagePage() {
|
||||
);
|
||||
|
||||
return (
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground isolate">
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none isolate">
|
||||
<div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground">
|
||||
<WorkspacePageHeader electron={isElectron} className="h-auto">
|
||||
{topbarContent}
|
||||
|
||||
@@ -90,11 +90,11 @@ function IndexDraftLanding() {
|
||||
|
||||
function DraftStartError({ onRetry }: { readonly onRetry: () => void }) {
|
||||
return (
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
|
||||
<Empty className="flex-1">
|
||||
<EmptyHeader className="max-w-md">
|
||||
<EmptyTitle className="text-foreground text-xl">Couldn’t start a new thread</EmptyTitle>
|
||||
<EmptyDescription className="mt-2 text-sm text-muted-foreground/78">
|
||||
<EmptyTitle className="text-foreground">Couldn’t start a new thread</EmptyTitle>
|
||||
<EmptyDescription className="mt-2 text-muted-foreground/78">
|
||||
The project is still available. Try opening the draft again.
|
||||
</EmptyDescription>
|
||||
<div className="mt-5 flex justify-center">
|
||||
@@ -123,7 +123,7 @@ function HostedStaticOnboardingState() {
|
||||
: "Open Connections and add that machine using its pairing link. This app must be able to reach it.";
|
||||
|
||||
return (
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
|
||||
<div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
|
||||
<WorkspacePageHeader electron={isElectron} className="border-b border-border">
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -139,14 +139,14 @@ function HostedStaticOnboardingState() {
|
||||
<div className="mx-auto mb-5 flex size-11 items-center justify-center rounded-xl border border-border/70 bg-background/70 text-muted-foreground">
|
||||
<LinkIcon className="size-5" />
|
||||
</div>
|
||||
<EmptyTitle className="text-foreground text-xl">
|
||||
<EmptyTitle className="text-foreground">
|
||||
Connect to a computer running T3 Code
|
||||
</EmptyTitle>
|
||||
<EmptyDescription className="mt-2 text-sm leading-relaxed text-muted-foreground/78">
|
||||
<EmptyDescription className="mt-2 leading-relaxed text-muted-foreground/78">
|
||||
This app connects to T3 Code running on your computer or a server. Start the T3 Code
|
||||
desktop app or command-line server on that machine and keep it running.
|
||||
</EmptyDescription>
|
||||
<EmptyDescription className="mt-2 text-sm leading-relaxed text-muted-foreground/78">
|
||||
<EmptyDescription className="mt-2 leading-relaxed text-muted-foreground/78">
|
||||
{description}
|
||||
</EmptyDescription>
|
||||
<div className="mt-6 flex justify-center">
|
||||
|
||||
@@ -2068,7 +2068,7 @@ function PullRequestsRouteView() {
|
||||
}, [keybindings]);
|
||||
|
||||
return (
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground">
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
|
||||
<div className="relative flex min-h-0 flex-1">
|
||||
{pullRequestsSupported && rightPanelPresent ? openPanelControls : null}
|
||||
<PullRequestsColumn {...columnProps} />
|
||||
|
||||
@@ -153,7 +153,7 @@ function SettingsContentLayout() {
|
||||
}, [navigateBackWithinApp]);
|
||||
|
||||
return (
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground isolate">
|
||||
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none isolate">
|
||||
<div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground">
|
||||
<WorkspacePageHeader electron={isElectron}>
|
||||
<div className="flex w-full items-center gap-3">
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as NodeURL from "node:url";
|
||||
// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the
|
||||
// count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you
|
||||
// migrate a file, and delete this script when the rule becomes an error.
|
||||
export const RESTYLE_CEILING = 1247;
|
||||
export const RESTYLE_CEILING = 1214;
|
||||
|
||||
const RULE = "shadcn(no-restyle)";
|
||||
|
||||
|
||||
Reference in new issue
Block a user