Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Dialog title and description errors #521

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/seven-dolphins-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@premieroctet/next-admin": patch
---

fix: Dialog title and description errors (#520)
5 changes: 3 additions & 2 deletions packages/next-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"prisma": ">=5",
"react": ">=17",
"react-dom": ">=17",
"typescript": ">=4",
"tailwindcss": ">=3"
"tailwindcss": ">=3",
"typescript": ">=4"
},
"dependencies": {
"@dnd-kit/core": "^6.1.0",
Expand All @@ -96,6 +96,7 @@
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.7",
"@radix-ui/react-visually-hidden": "^1.1.1",
"@rjsf/core": "^5.19.3",
"@rjsf/utils": "^5.19.3",
"@rjsf/validator-ajv8": "^5.19.3",
Expand Down
6 changes: 6 additions & 0 deletions packages/next-admin/src/components/ClientActionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
DialogOverlay,
DialogPortal,
DialogRoot,
DialogTitle,
} from "./radix/Dialog";
import { VisuallyHiddenRoot } from "./radix/VisuallyHidden";

type Props<M extends ModelName> = {
resource: M;
Expand Down Expand Up @@ -57,7 +59,7 @@
.finally(() => {
setIsLoading(false);
});
}, [resource, resourceIds]);

Check warning on line 62 in packages/next-admin/src/components/ClientActionDialog.tsx

View workflow job for this annotation

GitHub Actions / start

React Hook useEffect has missing dependencies: 'action.depth' and 'apiBasePath'. Either include them or remove the dependency array

return (
<DialogRoot
Expand Down Expand Up @@ -99,7 +101,11 @@
)
)}
forceMount
aria-describedby={undefined}
>
<VisuallyHiddenRoot asChild>
<DialogTitle>{action.title}</DialogTitle>
</VisuallyHiddenRoot>
{isLoading && (
<div className="flex items-center justify-center">
<Loader className="stroke-nextadmin-content-default dark:stroke-dark-nextadmin-content-default h-6 w-6 animate-spin dark:stroke-gray-300" />
Expand Down
3 changes: 3 additions & 0 deletions packages/next-admin/src/components/radix/VisuallyHidden.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as VisuallyHidden from "@radix-ui/react-visually-hidden";

export const VisuallyHiddenRoot = VisuallyHidden.Root;
164 changes: 121 additions & 43 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading