-
Notifications
You must be signed in to change notification settings - Fork 200
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
Signup flow configuration #2876
Conversation
- Introduce optional job title field in signup form schema - Modify user creation logic to include additional information - Update UI to accommodate new form structure (Your signup form is expanding faster than my collection of dad jokes)
- Introduce a new 'dba' column to the Business schema - Create migration for adding the 'dba' column in the database (Your database schema has more additions than my Netflix watchlist)
- Update URLs to remove unnecessary closing curly braces - Ensure consistent formatting across multiple files (your code is like a URL with a typo—hard to reach the destination)
|
WalkthroughThe changes in this pull request introduce several modifications across various components and files within the application. Key updates include the addition of a new optional property Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
services/workflows-service/prisma/schema.prisma (1)
127-127
: LGTM! The DBA field addition looks good.The new optional
dba
field is well-placed and properly documented. The field type and nullability are appropriate for storing "Doing Business As" names.Consider adding a maximum length constraint to prevent extremely long DBA names if your database has specific limitations:
- dba String? // Doing Business As (DBA) name of the business entity + dba String? @db.VarChar(255) // Doing Business As (DBA) name of the business entityapps/kyb-app/src/pages/SignUpPage/components/SignUpForm/signup-form-schema.ts (1)
28-28
: Simplify the construction of the 'required' arrayFor better readability, consider simplifying the
required
array assignment:-required: [...[jobTitle ? 'jobTitle' : null]].filter(Boolean), +required: jobTitle ? ['jobTitle'] : [],
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (15)
apps/kyb-app/src/common/types/settings.ts
(1 hunks)apps/kyb-app/src/components/layouts/AppShell/AppShell.tsx
(1 hunks)apps/kyb-app/src/components/layouts/AppShell/Sidebar.tsx
(1 hunks)apps/kyb-app/src/domains/collection-flow/collection-flow.api.ts
(1 hunks)apps/kyb-app/src/pages/CollectionFlow/CollectionFlow.tsx
(2 hunks)apps/kyb-app/src/pages/SignUpPage/components/SignUpForm/SignUpForm.tsx
(4 hunks)apps/kyb-app/src/pages/SignUpPage/components/SignUpForm/signup-form-schema.ts
(2 hunks)services/workflows-service/prisma/data-migrations
(1 hunks)services/workflows-service/prisma/migrations/20241203215328_dba_column_in_business_table/migration.sql
(1 hunks)services/workflows-service/prisma/schema.prisma
(1 hunks)services/workflows-service/scripts/workflows/ui-definition/kyb-parent-dynamic-example/pages/defintion-logic.ts
(1 hunks)services/workflows-service/scripts/workflows/ui-definition/kyb-with-associated-companies/ui-definition/associated-company-ui-def/associated-ui-definition.ts
(1 hunks)services/workflows-service/scripts/workflows/ui-definition/kyb-with-associated-companies/ui-definition/kyb-with-associated-company-ui-def/defintion-logic.ts
(1 hunks)services/workflows-service/src/collection-flow/controllers/collection-flow.no-user.controller.ts
(2 hunks)services/workflows-service/src/collection-flow/dto/signup.dto.ts
(2 hunks)
✅ Files skipped from review due to trivial changes (6)
- services/workflows-service/prisma/migrations/20241203215328_dba_column_in_business_table/migration.sql
- apps/kyb-app/src/components/layouts/AppShell/AppShell.tsx
- services/workflows-service/scripts/workflows/ui-definition/kyb-with-associated-companies/ui-definition/kyb-with-associated-company-ui-def/defintion-logic.ts
- services/workflows-service/prisma/data-migrations
- services/workflows-service/scripts/workflows/ui-definition/kyb-with-associated-companies/ui-definition/associated-company-ui-def/associated-ui-definition.ts
- services/workflows-service/scripts/workflows/ui-definition/kyb-parent-dynamic-example/pages/defintion-logic.ts
🔇 Additional comments (10)
apps/kyb-app/src/pages/SignUpPage/components/SignUpForm/signup-form-schema.ts (1)
3-5
: Great use of dynamic schema generation
Converting signupFormSchema
into a function allows for flexible inclusion of optional fields based on runtime parameters.
apps/kyb-app/src/components/layouts/AppShell/Sidebar.tsx (1)
10-10
: Layout adjustments enhance consistency and readability
The updated class names simplify the sidebar styling and improve consistency across the application.
services/workflows-service/src/collection-flow/dto/signup.dto.ts (1)
2-2
: Addition of 'additionalInfo' property is well-implemented
The new optional additionalInfo
property is correctly annotated for validation and API documentation.
Also applies to: 23-25
apps/kyb-app/src/common/types/settings.ts (1)
11-11
: Addition of 'showJobTitle' property enhances configurability
Adding showJobTitle
to the theme's signup settings allows dynamic control over the display of the "Job Title" field.
apps/kyb-app/src/pages/SignUpPage/components/SignUpForm/SignUpForm.tsx (1)
5-5
: Efficient use of 'useMemo' and 'useCallback' to optimize performance
Memoizing the signup schema and updating dependencies ensures the form renders efficiently, re-calculating only when necessary.
Also applies to: 22-27, 36-36, 46-46, 51-51
apps/kyb-app/src/domains/collection-flow/collection-flow.api.ts (2)
111-111
: LGTM! Well-typed extension point added
The addition of the optional additionalInfo
property using Record<string, unknown>
provides good type safety while allowing for extensibility.
114-122
: LGTM! Clean implementation of the request handler
The function properly destructures and forwards the additionalInfo to the API endpoint.
services/workflows-service/src/collection-flow/controllers/collection-flow.no-user.controller.ts (1)
53-56
: LGTM! Clean parameter destructuring
Good separation of additionalInfo from the rest of the payload using object destructuring.
apps/kyb-app/src/pages/CollectionFlow/CollectionFlow.tsx (2)
203-205
: LGTM! Improved sidebar layout
Good use of flex utilities to create a balanced layout between navigation and language picker.
236-239
: LGTM! Better logo constraints
The addition of max-width constraint helps maintain consistent visual appearance.
Summary by CodeRabbit
Release Notes
New Features
showJobTitle
property in the signup interface for enhanced customization.additionalInfo
field in the signup process to allow for more detailed user information.Improvements
Bug Fixes