Skip to content

frontend: migrate /schema-registry pages to new UI Registry components#2356

Merged
r-vasquez merged 12 commits intomasterfrom
migrate-create-page
Apr 7, 2026
Merged

frontend: migrate /schema-registry pages to new UI Registry components#2356
r-vasquez merged 12 commits intomasterfrom
migrate-create-page

Conversation

@r-vasquez
Copy link
Copy Markdown
Contributor

This PR includes the changes to migrate all pages in the /schema-registry route to the new UI registry components. The biggest changes are the Edit Compatibility page and the new Data Table component used in the List subject page.

Examples

New Edit Compat page

Before
image

After
image

New Data Table

Before
image

After (now it includes pagination)
image

New codeblock component used in details page

Before
image

After
image

Purely a component change, the logic should remain
the same.
To the new UI registry components
Rewrite modals.tsx from imperative openModal()
pattern to declarative controlled Dialog
components. Replace Modal/Alert/Box/Button
from @redpanda-data/ui with registry equivalents.
Replace legacy @redpanda-data/ui components
with registry equivalents and sonner toasts.
DataTable kept as-is for separate migration.
@r-vasquez r-vasquez force-pushed the migrate-create-page branch from ab25ee5 to c220fa8 Compare April 1, 2026 00:11
@r-vasquez r-vasquez requested a review from eblairmckee April 1, 2026 00:11
Replace all @redpanda-data/ui components with
registry equivalents. Migrate toasts to sonner,
Tabs to compound pattern, CodeBlock to
DynamicCodeBlock, LegacyButton to Button+Tooltip.

This also includes the update of the
DynamicCodeBlock component which fixes the lack
of syntax highlighting.
Replace legacy DataTable with useReactTable,
composed Table/TableHeader/TableBody, and
DataTablePagination. Zero @redpanda-data/ui
imports remain in schemas directory.
@r-vasquez r-vasquez force-pushed the migrate-create-page branch from c220fa8 to 5e1818f Compare April 1, 2026 00:32
<div className="mt-6 flex items-center gap-4">
<Button
data-testid="edit-compatibility-save-btn"
disabled={api.userData?.canManageSchemaRegistry === false}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should aim for always showing a tooltip why a button is disabled instead of silently disabling it. If there is no support for this in UI registry I think we should add it WDYT? @eblairmckee @malinskibeniamin

I used to work in a way that we guarded this with TS. If you provided disabled, you had to provide a disabledTooltip property.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, maybe not necessarily having a property but just wrapping any disabled button in a Tooltip

Copy link
Copy Markdown
Contributor Author

@r-vasquez r-vasquez Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 4221074, I was wrapping the buttons on tooltips in the other pages but missed that here.

Comment thread frontend/src/components/pages/schemas/edit-compatibility.tsx
const { data: schemaCompatibility, refetch: refetchCompatibility } = useSchemaCompatibilityQuery();
const deleteSchemaMutation = useDeleteSchemaSubjectMutation();
const [deleteTarget, setDeleteTarget] = useState<{ kind: 'soft' | 'permanent'; name: string } | null>(null);
const [sorting, setSorting] = useState<SortingState>([]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move these to URL? We have mechanisms already to have sorting & pagination in the URL.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a11ad0e

@r-vasquez r-vasquez force-pushed the migrate-create-page branch from afca77b to 2d0922b Compare April 7, 2026 16:12
@r-vasquez r-vasquez requested a review from jvorcak April 7, 2026 16:23
@r-vasquez r-vasquez merged commit a229177 into master Apr 7, 2026
17 checks passed
@r-vasquez r-vasquez deleted the migrate-create-page branch April 7, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants