Skip to content

refactor: minor task page design adjustments #18187

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 4 commits into from
Jun 2, 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { WorkspaceAppStatus } from "api/typesGenerated";
import type { WorkspaceAppStatusState } from "api/typesGenerated";
import { Spinner } from "components/Spinner/Spinner";
import {
BanIcon,
CircleAlertIcon,
CircleCheckIcon,
HourglassIcon,
Expand All @@ -9,20 +10,22 @@ import {
import type { FC } from "react";
import { cn } from "utils/cn";

type AppStatusIconProps = {
status: WorkspaceAppStatus;
type AppStatusStateIconProps = {
state: WorkspaceAppStatusState;
latest: boolean;
disabled?: boolean;
className?: string;
};

export const AppStatusIcon: FC<AppStatusIconProps> = ({
status,
export const AppStatusStateIcon: FC<AppStatusStateIconProps> = ({
state,
disabled,
latest,
className: customClassName,
}) => {
const className = cn(["size-4 shrink-0", customClassName]);

switch (status.state) {
switch (state) {
case "complete":
return (
<CircleCheckIcon className={cn(["text-content-success", className])} />
Expand All @@ -32,10 +35,12 @@ export const AppStatusIcon: FC<AppStatusIconProps> = ({
<CircleAlertIcon className={cn(["text-content-warning", className])} />
);
case "working":
return latest ? (
return disabled ? (
<BanIcon className={cn(["text-content-disabled", className])} />
) : latest ? (
<Spinner size="sm" className="shrink-0" loading />
) : (
<HourglassIcon className={cn(["text-highlight-sky", className])} />
<HourglassIcon className={cn(["text-content-secondary", className])} />
);
default:
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "components/Tooltip/Tooltip";
import { AppStatusIcon } from "modules/apps/AppStatusIcon";
import { AppStatusStateIcon } from "modules/apps/AppStatusStateIcon";
import { cn } from "utils/cn";

type WorkspaceAppStatusProps = {
Expand All @@ -31,9 +31,10 @@ export const WorkspaceAppStatus = ({
<Tooltip>
<TooltipTrigger asChild>
<div className="flex items-center gap-2">
<AppStatusIcon
status={status}
<AppStatusStateIcon
latest
disabled={disabled}
state={status.state}
className={cn({
"text-content-disabled": disabled,
})}
Expand Down
Loading
Loading