Address compliance-portal review feedback

Fix the valid issues raised in the scaffold review.

UI kit: the Button loading state now replaces only the leading icon
instead of dropping the label, Button consumes the `active` variant so
it no longer leaks onto the DOM, and every v2 skeleton sets aria-hidden
after the prop spread so a consumer cannot override it.

@probo/relay: guard the caller-supplied onCompleted/onError callbacks so
a throwing callback still settles the awaitable mutation promise instead
of leaving it pending.

compliance-portal: normalize external website hrefs and read hostname
via URL.hostname, add a localized catch-all not-found route, and widen
the .gitattributes glob so colocated __generated__ artifacts at any depth
are marked generated.

Docs: correct the forms guide (Base UI passes plain values, Zod v3
flatten API), spread the child fragment in the permissions example, and
drop references to v2 components that do not exist in the ui guide.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-28 18:40:08 +02:00
parent 4f3d3dc3b3
commit 6bcb7461be
20 changed files with 116 additions and 32 deletions

View File

@@ -93,10 +93,10 @@ export function CreateMeasureForm({ onValid }: CreateMeasureFormProps) {
<Form
errors={errors}
onClearErrors={setErrors}
onFormSubmit={(formData) => {
const result = schema.safeParse(Object.fromEntries(formData));
onFormSubmit={(formValues) => {
const result = schema.safeParse(formValues);
if (!result.success) {
setErrors(z.flattenError(result.error).fieldErrors);
setErrors(result.error.flatten().fieldErrors);
return;
}
onValid(result.data);