Skip to content

Commit fc5b2da

Browse files
jvorcakclaude
andcommitted
refactor(schema-registry): move create button to filter row actions
Align with the topics list by rendering "Create new schema" right-aligned via ListLayoutFilters actions instead of a standalone left-aligned block. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent eabefed commit fc5b2da

1 file changed

Lines changed: 27 additions & 24 deletions

File tree

frontend/src/components/pages/schemas/schema-list.tsx

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -599,29 +599,6 @@ const SchemaList: FC = () => {
599599
selectedContext={selectedContext}
600600
/>
601601
)}
602-
<div className="my-4 flex items-center gap-2">
603-
<Tooltip>
604-
<TooltipTrigger
605-
render={
606-
<Button
607-
data-testid="schema-list-create-btn"
608-
disabled={api.userData?.canCreateSchemas === false}
609-
onClick={() =>
610-
isNamedContext(selectedContext) && schemaRegistryContextsSupported
611-
? appGlobal.historyPush(`/schema-registry/contexts/${encodeURIComponent(selectedContext)}/create`)
612-
: appGlobal.historyPush('/schema-registry/create')
613-
}
614-
variant="primary"
615-
>
616-
Create new schema
617-
</Button>
618-
}
619-
/>
620-
{api.userData?.canCreateSchemas === false && (
621-
<TooltipContent side="top">You don't have the 'canCreateSchemas' permission</TooltipContent>
622-
)}
623-
</Tooltip>
624-
</div>
625602
<RequestErrors />
626603
{isError ? (
627604
<Alert variant="destructive">
@@ -666,7 +643,33 @@ const SchemaList: FC = () => {
666643
</div>
667644
</DescriptionWithHelp>
668645
</Text>
669-
<ListLayoutFilters>
646+
<ListLayoutFilters
647+
actions={
648+
<Tooltip>
649+
<TooltipTrigger
650+
render={
651+
<Button
652+
data-testid="schema-list-create-btn"
653+
disabled={api.userData?.canCreateSchemas === false}
654+
onClick={() =>
655+
isNamedContext(selectedContext) && schemaRegistryContextsSupported
656+
? appGlobal.historyPush(
657+
`/schema-registry/contexts/${encodeURIComponent(selectedContext)}/create`
658+
)
659+
: appGlobal.historyPush('/schema-registry/create')
660+
}
661+
variant="primary"
662+
>
663+
Create new schema
664+
</Button>
665+
}
666+
/>
667+
{api.userData?.canCreateSchemas === false && (
668+
<TooltipContent side="top">You don't have the 'canCreateSchemas' permission</TooltipContent>
669+
)}
670+
</Tooltip>
671+
}
672+
>
670673
<div className="relative" data-testid="schema-list-search-field">
671674
<SearchIcon
672675
aria-hidden="true"

0 commit comments

Comments
 (0)