Skip to content

chore: migrate spinner components #17866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/src/components/Filter/SelectFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const SelectFilter: FC<SelectFilterProps> = ({
</div>
)
) : (
<Loader size={16} />
<Loader size="sm" />
)}
</SelectMenuContent>
</SelectMenu>
Expand Down
8 changes: 4 additions & 4 deletions site/src/components/Loader/Loader.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Interpolation, Theme } from "@emotion/react";
import { Spinner } from "components/deprecated/Spinner/Spinner";
import { Spinner } from "components/Spinner/Spinner";
import type { FC, HTMLAttributes } from "react";

interface LoaderProps extends HTMLAttributes<HTMLDivElement> {
fullscreen?: boolean;
size?: number;
size?: "sm" | "lg";
/**
* A label for the loader. This is used for accessibility purposes.
*/
Expand All @@ -13,7 +13,7 @@ interface LoaderProps extends HTMLAttributes<HTMLDivElement> {

export const Loader: FC<LoaderProps> = ({
fullscreen,
size = 26,
size = "lg",
label = "Loading...",
...attrs
}) => {
Expand All @@ -23,7 +23,7 @@ export const Loader: FC<LoaderProps> = ({
data-testid="loader"
{...attrs}
>
<Spinner aria-label={label} size={size} />
<Spinner aria-label={label} size={size} loading={true} />
</div>
);
};
Expand Down
24 changes: 0 additions & 24 deletions site/src/components/deprecated/Spinner/Spinner.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion site/src/pages/ChatPage/LanguageModelSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const LanguageModelSelector: FC = () => {
} = useQuery(deploymentLanguageModels());

if (isLoading) {
return <Loader size={14} />;
return <Loader size="sm" />;
}

if (error || !languageModelConfig) {
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacesPage/WorkspacesButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const WorkspacesButton: FC<WorkspacesButtonProps> = ({
}}
>
{templatesFetchStatus === "loading" ? (
<Loader size={14} />
<Loader size="sm" />
) : (
<>
{processed.map((template) => (
Expand Down
Loading