-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(ui): improve admin setup ux #1671
Conversation
Looks nice to me. Add @liangfung for review from implementation perspective. Will review the text once it's done. |
LGTM. By the way, do we need to add a redirect logic so that once the server has been initialized by an admin, it redirects to the signup page. Otherwise, it will follow the regular user signup logic. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing the scrollbar, I update CSS to make sure the scrollbar won't show and hide as before, video record: https://jam.dev/c/aa5730b9-a25e-4adb-b045-5da2f16a881c
Please disable scroll.
@@ -0,0 +1,23 @@ | |||
import { cn } from '@/lib/utils' | |||
|
|||
export default function AdminRegisterStep({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: since this is only used in admin-register
, it's ok to put it inside of that file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file generates following warning
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|/Users/meng/Projects/tabby/ee/tabby-ui/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!/Users/meng/Projects/tabby/ee/tabby-ui/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!/Users/meng/Projects/tabby/ee/tabby-ui/app/auth/signup/components/admin-register.css': No serializer registered for Warning
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> Array { 1 items } -> webpack/lib/ModuleWarning -> Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change .xxx{ &:after {} }
to .xxx:after {}
removed this warning
Please also make UI components https://jam.dev/c/123358e6-d4ce-48ab-8ba5-264f77981c9f |
Updated
|
btw I found the input got warrning const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
email: "",
password1: "",
password2: "",
invitationCode
}
}) @liangfung can you help me to double check if it would break anything? thanks I checked /signin /signup?invitationCode=xxx , and looks all good |
Nice, with this change the functionality works normally, and it can remove the warnings. However, it might cause the form to lose the required error messages, and as more fields are added, each might need to be assigned individually. Of course, the server will validate the form submission parameters. |
shadcn-ui/ui#410 (comment) |
Thanks @liangfung , I switched to the new solution |
Screen record:
https://jam.dev/c/650ca8b7-8e75-4d5b-825a-0a64b3035c34