fix: improve create workspace page for dynamic parameters (#18139)

- Avoid scrolling on workspace creation
- hide auth required badge when authenticated
This commit is contained in:
Jaayden Halko
2025-05-30 17:13:16 -04:00
committed by GitHub
parent 19745a2dee
commit 854ef5b07c
2 changed files with 7 additions and 3 deletions
@@ -179,7 +179,7 @@ export const CreateWorkspacePageViewExperimental: FC<
}, [error]);
useEffect(() => {
if (form.submitCount > 0 && form.errors) {
if (form.submitCount > 0 && Object.keys(form.errors).length > 0) {
workspaceNameInputRef.current?.scrollIntoView({
behavior: "smooth",
block: "center",
@@ -38,8 +38,12 @@ export const ExternalAuthButton: FC<ExternalAuthButtonProps> = ({
/>
)}
<p className="font-semibold text-sm m-0">{auth.display_name}</p>
{!auth.optional && (
<Badge size="sm" variant={error ? "destructive" : "warning"}>
{!auth.authenticated && !auth.optional && (
<Badge
size="sm"
border="none"
variant={error ? "destructive" : "warning"}
>
Required
</Badge>
)}