diff --git a/apps/dashboard/src/components/layouts/dashboard-content-loading.tsx b/apps/dashboard/src/components/layouts/dashboard-content-loading.tsx index d72ccf8..dbd90d1 100644 --- a/apps/dashboard/src/components/layouts/dashboard-content-loading.tsx +++ b/apps/dashboard/src/components/layouts/dashboard-content-loading.tsx @@ -7,3 +7,11 @@ export function DashboardContentLoading() { ); } + +export function DashboardViewportLoading() { + return ( +
+ +
+ ); +} diff --git a/apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx b/apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx index 327ca50..036e6e1 100644 --- a/apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx +++ b/apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx @@ -20,7 +20,9 @@ import { memo, Suspense, useCallback, + useEffect, useMemo, + useRef, useState, } from "react"; import { CommentMoreMenu } from "#/components/details/comment-more-menu"; @@ -464,6 +466,11 @@ function InlineCommentForm({ mentionConfig?: MentionConfig; }) { const [body, setBody] = useState(""); + const textareaRef = useRef(null); + + useEffect(() => { + textareaRef.current?.focus(); + }, []); return (
@@ -478,6 +485,7 @@ function InlineCommentForm({ placeholder="Leave a comment..." compact mentions={mentionConfig} + textareaRef={textareaRef} />