Skip to content
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
Expand Up @@ -7,3 +7,11 @@ export function DashboardContentLoading() {
</div>
);
}

export function DashboardViewportLoading() {
return (
<div className="flex min-h-dvh items-center justify-center bg-background">
<Spinner size={20} className="text-muted-foreground" />
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import {
memo,
Suspense,
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import { CommentMoreMenu } from "#/components/details/comment-more-menu";
Expand Down Expand Up @@ -464,6 +466,11 @@ function InlineCommentForm({
mentionConfig?: MentionConfig;
}) {
const [body, setBody] = useState("");
const textareaRef = useRef<HTMLTextAreaElement>(null);

useEffect(() => {
textareaRef.current?.focus();
}, []);

return (
<div className="mx-2 my-1 flex flex-col gap-2">
Expand All @@ -478,6 +485,7 @@ function InlineCommentForm({
placeholder="Leave a comment..."
compact
mentions={mentionConfig}
textareaRef={textareaRef}
/>
<div className="flex items-center justify-end gap-2">
<button
Expand Down
11 changes: 9 additions & 2 deletions apps/dashboard/src/components/repo/repository-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,15 @@ export const RepositoryRow = memo(function RepositoryRow({
>
<div className="flex min-w-0 flex-col gap-0.5">
<div className="flex min-w-0 max-w-full items-center gap-x-2">
<p className="min-w-0 truncate text-sm font-medium">
{repo.fullName}
<p
className="flex min-w-0 items-baseline text-sm font-medium"
title={repo.fullName}
>
<span className="min-w-0 flex-1 truncate text-muted-foreground">
{repo.owner}
</span>
<span className="shrink-0 text-muted-foreground">/</span>
<span className="shrink-0 truncate">{repo.name}</span>
</p>
<VisibilityBadge visibility={repo.visibility} />
</div>
Expand Down
2 changes: 2 additions & 0 deletions apps/dashboard/src/routes/_protected.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
import { DashboardViewportLoading } from "#/components/layouts/dashboard-content-loading";
import { DashboardLayout } from "#/components/layouts/dashboard-layout";
import { ErrorScreen } from "#/components/layouts/error-screen";
import { getSession } from "#/lib/auth.functions";
Expand Down Expand Up @@ -67,5 +68,6 @@ export const Route = createFileRoute("/_protected")({
});
},
component: DashboardLayout,
pendingComponent: DashboardViewportLoading,
errorComponent: ErrorScreen,
});
Loading