Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@TWilson023
Copy link
Collaborator

@TWilson023 TWilson023 commented Jun 2, 2025

Summary by CodeRabbit

  • New Features

    • Introduced an alternative authentication banner to guide users to relevant login or registration pages.
    • Added visual separators between authentication methods for improved clarity.
    • Displayed password requirements in real-time during password creation.
    • Implemented a reusable dots pattern background for enhanced visual design.
  • UI/UX Improvements

    • Unified and simplified authentication page layouts with a new centralized AuthLayout and consistent styling.
    • Updated headings, spacing, and alignment across login, registration, password reset, and forgot password pages for improved clarity and consistency.
    • Enhanced form layouts, labels, and error message presentations for better usability.
    • Improved banners, background visuals, and link placements for a modernized appearance.
    • Simplified page content by removing redundant prompts and paragraphs.
  • Bug Fixes

    • None.
  • Chores

    • Streamlined component structure and removed unused elements for cleaner codebase.

@vercel
Copy link
Contributor

vercel bot commented Jun 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
dub ✅ Ready (Inspect) Visit Preview Jun 4, 2025 6:51pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 2, 2025

Walkthrough

This update refactors authentication-related pages and components, streamlining layouts, improving visual consistency, and introducing reusable UI elements. New components for banners, separators, and password requirements are added, with progressive disclosure for sign-up forms. Layouts are simplified, and alternative authentication options are highlighted. No changes affect authentication logic or exported function signatures.

Changes

File(s) Change Summary
.../(auth)/(default)/auth/reset-password/[token]/page.tsx
.../(auth)/(default)/forgot-password/page.tsx
.../(auth)/(default)/login/page.tsx
.../(auth)/(default)/register/page-client.tsx
.../(auth)/(default)/partner-banner.tsx
Refactored layouts to use AuthLayout, updated headings, removed or restyled prompts, adjusted banner styling, and simplified containers.
.../(auth)/(default)/layout.tsx
.../(auth)/layout.tsx
Replaced previous background with new custom background, repositioned wordmark, removed footer, and simplified content structure.
.../(auth)/auth/reset-password/[token]/page.tsx
.../(auth)/forgot-password/page.tsx
.../(auth)/login/page.tsx
.../(auth)/register/page-client.tsx
.../(auth)/register/page.tsx
Refactored layouts, updated headings, simplified containers, moved or restyled prompts, and added alternative banner.
.../ui/auth/auth-alternative-banner.tsx Added new AuthAlternativeBanner component with variants for login/register, using a decorative dots pattern.
.../ui/auth/auth-methods-separator.tsx Added new AuthMethodsSeparator component for visual separation of auth methods.
.../ui/auth/forgot-password-form.tsx Adjusted form gap and label styling; no logic changes.
.../ui/auth/login/email-sign-in.tsx Refactored form to use labels, updated button text, and repositioned "Forgot password?" link.
.../ui/auth/login/login-form.tsx Replaced custom separator with AuthMethodsSeparator, updated button to use Button component.
.../ui/auth/register/resend-otp.tsx Updated container and button styling; no logic changes.
.../ui/auth/register/signup-email.tsx Introduced progressive password input (two-step form), added PasswordRequirements, and used react-hook-form context.
.../ui/auth/register/signup-form.tsx Replaced custom separator with AuthMethodsSeparator, wrapped content in AnimatedSizeContainer.
.../ui/auth/register/verify-email-form.tsx Refactored error display, updated OTP input styling, and moved resend component.
.../ui/auth/reset-password-form.tsx Refactored to use FormProvider, replaced labels, and adjusted error message display.
.../ui/layout/auth-layout.tsx Simplified layout, removed sidebar, added optional showTerms prop, and updated prop typing.
.../ui/shared/password-requirements.tsx Added new PasswordRequirements component to display password validation criteria.
packages/ui/src/dots-pattern.tsx Added new DotsPattern SVG component for decorative backgrounds.
packages/ui/src/index.tsx Exported DotsPattern from package entry point.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AuthPage (Login/Register/Forgot/Reset)
    participant AuthLayout
    participant AuthAlternativeBanner
    participant AuthMethodsSeparator
    participant PasswordRequirements

    User->>AuthPage: Visit authentication page
    AuthPage->>AuthLayout: Render content within layout
    AuthPage->>AuthAlternativeBanner: (If applicable) Render alternative banner
    AuthPage->>AuthMethodsSeparator: (If multiple methods) Render separator
    AuthPage->>PasswordRequirements: (If sign-up) Show password requirements
    AuthLayout-->>User: Display centered content with custom background
    AuthAlternativeBanner-->>User: Show alternative login/register option
    AuthMethodsSeparator-->>User: Visually separate authentication methods
    PasswordRequirements-->>User: Display password criteria feedback
Loading

Suggested reviewers

  • steven-tey

Poem

In fields of forms where users roam,
New banners bloom and patterns dome.
Layouts trimmed, components neat,
Password rules and dots discreet.
Rabbits hop and softly cheer—
Auth flows clearer, spring is here!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 90902c3 and b2c8db6.

📒 Files selected for processing (1)
  • apps/web/ui/shared/password-requirements.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/ui/shared/password-requirements.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@TWilson023 TWilson023 changed the title Auth/Onboarding Updates Auth UI Updates Jun 4, 2025
@TWilson023 TWilson023 marked this pull request as ready for review June 4, 2025 14:45
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
apps/web/ui/shared/password-requirements.tsx (2)

24-31: Consider adding form context validation.

The component relies on useWatch from react-hook-form, which requires the component to be rendered within a FormProvider context. Consider adding a safety check or documentation to prevent runtime errors.

export const PasswordRequirements = memo(function PasswordRequirements({
  field = "password",
  className,
}: {
  field?: string;
  className?: string;
}) {
+ // Note: This component must be used within a FormProvider context
  const password = useWatch({ name: field });

35-56: Add accessibility improvements for better user experience.

Consider adding ARIA attributes to improve accessibility for screen readers and better communicate the validation state.

  return (
-   <div className={cn("mt-2 flex flex-wrap items-center gap-3", className)}>
+   <div 
+     className={cn("mt-2 flex flex-wrap items-center gap-3", className)}
+     role="list"
+     aria-label="Password requirements"
+   >
      {REQUIREMENTS.map(({ name, check }) => {
        const checked = password?.length && check(password);

        return (
          <div
            key={name}
+           role="listitem"
+           aria-label={`${name} requirement ${checked ? 'satisfied' : 'not satisfied'}`}
            className={cn(
              "flex items-center gap-1 text-xs text-neutral-400 transition-colors",
              checked && "text-green-600",
            )}
          >
apps/web/app/app.dub.co/(auth)/layout.tsx (1)

12-47: Complex background implementation - consider performance impact.

The new background creates an attractive visual effect with grid patterns and multiple gradient layers. However, the implementation uses several blur effects and blend modes that could impact performance on lower-end devices.

Consider:

  1. Adding a will-change CSS property for animations
  2. Using transform3d for hardware acceleration
  3. Testing performance on mobile devices
<div
  key={idx}
  className={cn(
    "absolute left-1/2 top-6 size-[80px] -translate-x-1/2 -translate-y-1/2 scale-x-[1.6]",
+   "will-change-transform",
    idx === 0 ? "mix-blend-overlay" : "opacity-10",
  )}
>
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/layout.tsx (1)

11-47: Sophisticated background design with potential performance considerations.

The background implementation creates an attractive visual effect with:

  • Isolated stacking context preventing z-index issues
  • Masked Grid component for subtle pattern overlay
  • Multiple gradient layers with blend modes for depth

However, consider the performance impact of:

  • Complex CSS mask operations
  • Multiple blur filters (blur-[50px])
  • Nested array mapping for gradient generation

For better performance, consider:

  • Adding will-change: transform to animated elements
  • Using CSS custom properties for repeated gradient values
  • Memoizing the gradient array generation
+const gradientLayers = [...Array(2)];
+const innerGradients = (isFirst: boolean) => [...Array(isFirst ? 2 : 1)];

-        {[...Array(2)].map((_, idx) => (
+        {gradientLayers.map((_, idx) => (
packages/ui/src/dots-pattern.tsx (1)

4-47: LGTM - Well-designed reusable pattern component.

The DotsPattern component demonstrates excellent React practices:

  • Uses useId() to prevent SVG pattern ID collisions
  • Provides sensible defaults with flexible customization options
  • Implements proper accessibility with pointer-events-none
  • Uses currentColor for theme-aware styling

The pattern offset calculation (patternOffset[0] - 1) appears intentional for visual alignment, though a comment explaining this adjustment would improve maintainability.

Consider adding a brief comment explaining the offset adjustment:

<pattern
  id={`dots-${id}`}
+ // Offset by -1 for proper visual alignment
  x={patternOffset[0] - 1}
  y={patternOffset[1] - 1}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf2f431 and 6d96c4c.

📒 Files selected for processing (26)
  • apps/web/app/(ee)/partners.dub.co/(auth)/(default)/auth/reset-password/[token]/page.tsx (2 hunks)
  • apps/web/app/(ee)/partners.dub.co/(auth)/(default)/forgot-password/page.tsx (1 hunks)
  • apps/web/app/(ee)/partners.dub.co/(auth)/(default)/layout.tsx (2 hunks)
  • apps/web/app/(ee)/partners.dub.co/(auth)/(default)/login/page.tsx (2 hunks)
  • apps/web/app/(ee)/partners.dub.co/(auth)/(default)/partner-banner.tsx (1 hunks)
  • apps/web/app/(ee)/partners.dub.co/(auth)/(default)/register/page-client.tsx (2 hunks)
  • apps/web/app/app.dub.co/(auth)/auth/reset-password/[token]/page.tsx (2 hunks)
  • apps/web/app/app.dub.co/(auth)/forgot-password/page.tsx (1 hunks)
  • apps/web/app/app.dub.co/(auth)/layout.tsx (1 hunks)
  • apps/web/app/app.dub.co/(auth)/login/page.tsx (2 hunks)
  • apps/web/app/app.dub.co/(auth)/register/page-client.tsx (3 hunks)
  • apps/web/app/app.dub.co/(auth)/register/page.tsx (1 hunks)
  • apps/web/ui/auth/auth-alternative-banner.tsx (1 hunks)
  • apps/web/ui/auth/auth-methods-separator.tsx (1 hunks)
  • apps/web/ui/auth/forgot-password-form.tsx (1 hunks)
  • apps/web/ui/auth/login/email-sign-in.tsx (1 hunks)
  • apps/web/ui/auth/login/login-form.tsx (4 hunks)
  • apps/web/ui/auth/register/resend-otp.tsx (2 hunks)
  • apps/web/ui/auth/register/signup-email.tsx (2 hunks)
  • apps/web/ui/auth/register/signup-form.tsx (2 hunks)
  • apps/web/ui/auth/register/verify-email-form.tsx (1 hunks)
  • apps/web/ui/auth/reset-password-form.tsx (3 hunks)
  • apps/web/ui/layout/auth-layout.tsx (1 hunks)
  • apps/web/ui/shared/password-requirements.tsx (1 hunks)
  • packages/ui/src/dots-pattern.tsx (1 hunks)
  • packages/ui/src/index.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (13)
apps/web/ui/auth/auth-alternative-banner.tsx (1)
packages/ui/src/dots-pattern.tsx (1)
  • DotsPattern (4-47)
apps/web/ui/auth/register/signup-email.tsx (1)
apps/web/ui/shared/password-requirements.tsx (1)
  • PasswordRequirements (24-58)
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/auth/reset-password/[token]/page.tsx (1)
apps/web/ui/auth/reset-password-form.tsx (1)
  • ResetPasswordForm (11-97)
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/forgot-password/page.tsx (1)
apps/web/ui/auth/forgot-password-form.tsx (1)
  • ForgotPasswordForm (10-59)
apps/web/app/app.dub.co/(auth)/register/page-client.tsx (2)
apps/web/ui/auth/register/signup-form.tsx (1)
  • SignUpForm (8-22)
apps/web/ui/auth/auth-alternative-banner.tsx (1)
  • AuthAlternativeBanner (17-43)
apps/web/ui/auth/register/signup-form.tsx (2)
apps/web/ui/auth/register/signup-email.tsx (1)
  • SignUpEmail (16-113)
apps/web/ui/auth/auth-methods-separator.tsx (1)
  • AuthMethodsSeparator (1-11)
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/login/page.tsx (4)
apps/web/app/app.dub.co/(auth)/layout.tsx (1)
  • AuthLayout (7-60)
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/partner-banner.tsx (1)
  • PartnerBanner (4-41)
apps/web/ui/auth/login/login-form.tsx (1)
  • LoginForm (70-205)
apps/web/ui/auth/auth-alternative-banner.tsx (1)
  • AuthAlternativeBanner (17-43)
apps/web/ui/auth/reset-password-form.tsx (1)
apps/web/ui/shared/password-requirements.tsx (1)
  • PasswordRequirements (24-58)
apps/web/app/app.dub.co/(auth)/register/page.tsx (1)
apps/web/ui/layout/auth-layout.tsx (1)
  • AuthLayout (4-43)
apps/web/ui/layout/auth-layout.tsx (1)
apps/web/app/app.dub.co/(auth)/layout.tsx (1)
  • AuthLayout (7-60)
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/register/page-client.tsx (5)
apps/web/ui/layout/auth-layout.tsx (1)
  • AuthLayout (4-43)
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/partner-banner.tsx (1)
  • PartnerBanner (4-41)
apps/web/ui/auth/register/signup-form.tsx (1)
  • SignUpForm (8-22)
apps/web/ui/auth/auth-alternative-banner.tsx (1)
  • AuthAlternativeBanner (17-43)
apps/web/ui/auth/register/verify-email-form.tsx (1)
  • VerifyEmailForm (15-119)
apps/web/ui/auth/login/login-form.tsx (1)
apps/web/ui/auth/auth-methods-separator.tsx (1)
  • AuthMethodsSeparator (1-11)
apps/web/app/app.dub.co/(auth)/layout.tsx (1)
apps/web/ui/layout/auth-layout.tsx (1)
  • AuthLayout (4-43)
🔇 Additional comments (54)
packages/ui/src/index.tsx (1)

15-15: LGTM! Clean export addition.

The new dots-pattern export is properly placed in alphabetical order and follows the existing pattern. This enables the DotsPattern component to be imported from the main package entry point.

apps/web/app/app.dub.co/(auth)/register/page.tsx (1)

12-12: Good addition of terms display for registration.

Adding showTerms to the AuthLayout is appropriate for a registration page, ensuring users see the terms of service and privacy policy links during account creation.

apps/web/ui/auth/forgot-password-form.tsx (3)

29-29: Good addition of full width class.

Adding w-full ensures the form container uses the full available width, improving layout consistency.


36-36: Appropriate spacing adjustment.

Reducing the gap from 8 to 6 units creates a more compact and visually balanced form layout.


38-40: Enhanced label styling for better consistency.

The updated label styling with text-content-emphasis, explicit margin, and font properties provides better visual hierarchy and consistency with the design system.

apps/web/ui/auth/register/resend-otp.tsx (2)

42-42: Good addition of font weight for emphasis.

Adding font-medium to the container provides better visual hierarchy and emphasis for the resend OTP section.


56-56: Improved button styling with better UX.

The updated button styling removes the underline for a cleaner look and uses darker text with smooth hover transitions, providing better visual feedback and consistency with modern UI patterns.

apps/web/ui/auth/auth-methods-separator.tsx (1)

1-11: LGTM! Clean and reusable separator component.

The implementation is well-structured with proper flexbox layout and semantic styling. This component will improve consistency across authentication forms by standardizing the "or" separator pattern.

apps/web/app/(ee)/partners.dub.co/(auth)/(default)/partner-banner.tsx (1)

10-10: LGTM! Styling improvements align with layout simplification.

The margin, border radius, and padding changes improve visual consistency and align with the broader UI refactoring effort mentioned in the PR objectives.

apps/web/app/app.dub.co/(auth)/forgot-password/page.tsx (1)

12-19: LGTM! Layout simplification improves consistency.

The changes standardize the auth page structure using AuthLayout and create a more focused layout with the smaller max width and centered heading. The simplified form wrapper reduces unnecessary styling complexity.

apps/web/app/app.dub.co/(auth)/auth/reset-password/[token]/page.tsx (1)

29-38: LGTM! Consistent layout pattern with security logic preserved.

The layout changes follow the same simplification pattern as other auth pages, using AuthLayout for consistency. Importantly, the token validation logic remains unchanged, preserving the security implementation.

apps/web/ui/auth/reset-password-form.tsx (1)

15-21: Good refactoring of form handling.

Consolidating the form instance and providing it via FormProvider is a clean approach that enables the PasswordRequirements component to access form context properly.

apps/web/app/(ee)/partners.dub.co/(auth)/(default)/forgot-password/page.tsx (1)

6-16: LGTM! Clean layout standardization.

The refactoring simplifies the layout using the shared AuthLayout component and updates the heading styling for better visual hierarchy. This aligns well with the broader UI consistency improvements.

apps/web/ui/auth/register/signup-form.tsx (1)

14-20: Excellent refactoring for better UX and maintainability.

The changes improve the component in multiple ways:

  • AnimatedSizeContainer provides smooth height transitions when form content changes
  • AuthMethodsSeparator replaces inline JSX, improving code reusability and maintainability
  • The padding addition enhances visual spacing
apps/web/ui/auth/auth-alternative-banner.tsx (1)

1-43: Well-designed reusable banner component.

The implementation demonstrates good practices:

  • Clear TypeScript interface with required props
  • Accessibility considerations with role="presentation" for decorative elements
  • Hover states for better interactivity
  • Clean separation between variants and the main component
  • Proper use of DotsPattern for visual enhancement

The component will provide consistent styling across authentication flows.

apps/web/ui/shared/password-requirements.tsx (1)

6-22: LGTM! Well-defined password requirements with correct regex patterns.

The requirements array is well-structured with clear naming and appropriate regex patterns for common password validation rules.

apps/web/app/app.dub.co/(auth)/layout.tsx (1)

50-55: LGTM! Improved Wordmark positioning and sizing.

The centered positioning and larger size (h-8 vs h-6) provides better visual hierarchy and brand presence.

apps/web/ui/auth/login/email-sign-in.tsx (3)

118-118: LGTM! Improved spacing for better visual hierarchy.

The increased gap from 3 to 6 provides better visual separation between form elements.


147-166: LGTM! Excellent semantic structure and UX improvement.

The label wrapper with inline forgot password link provides better accessibility and more intuitive user flow.


170-170: LGTM! More descriptive button text.

The change from "Continue with" to "Log in with" is more specific and action-oriented.

apps/web/ui/auth/login/login-form.tsx (4)

3-3: LGTM! Good import addition for consistent UI components.

Adding Button import aligns with the refactoring to use consistent UI components throughout the auth flow.


15-15: LGTM! Consistent separator component usage.

The AuthMethodsSeparator import supports the consistent UI refactoring efforts across authentication flows.


175-175: LGTM! Consistent component usage.

Replacing the inline separator with the AuthMethodsSeparator component improves consistency and maintainability across authentication UI components.


180-185: LGTM! Improved button consistency.

Using the Button component with variant="secondary" instead of inline button styling ensures consistent appearance and behavior across the application.

apps/web/app/(ee)/partners.dub.co/(auth)/(default)/auth/reset-password/[token]/page.tsx (3)

2-2: LGTM! Import addition aligns with UI refactoring.

The import of AuthLayout supports the consistent layout refactoring across authentication pages.


20-26: Good refactoring to use shared layout component.

Wrapping the invalid token state in AuthLayout provides consistent styling and structure with other authentication pages.


31-40: Clean layout simplification with proper semantic structure.

The refactoring successfully:

  • Uses shared AuthLayout for consistency
  • Maintains appropriate semantic hierarchy with h3 heading
  • Applies consistent max-width constraints
  • Centers content appropriately
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/login/page.tsx (5)

2-4: LGTM! Import additions support the UI refactoring.

The imports for AuthAlternativeBanner and AuthLayout are necessary for the new shared layout approach and alternative login options.


20-25: Good use of shared layout with consistent styling.

The AuthLayout with showTerms prop provides:

  • Consistent layout structure across auth pages
  • Terms of service display when appropriate
  • Proper content constraints with max-w-sm
  • Semantic heading structure with centered styling

27-31: Well-configured login form with appropriate auth methods.

The LoginForm configuration specifies:

  • Relevant auth methods (email, password, google) for partner login
  • Proper redirect path based on program slug
  • Consistent integration with the new layout

32-40: Improved sign-up prompt with clear messaging.

The updated sign-up prompt:

  • Uses more specific text ("partner account") for clarity
  • Maintains proper link styling and hover states
  • Provides appropriate visual hierarchy with centered alignment

42-48: Excellent addition of alternative login option.

The AuthAlternativeBanner provides:

  • Clear messaging for users looking for workspace accounts
  • Proper external link to the main app login
  • Good visual separation with appropriate margin
  • Consistent with the cross-promotion strategy
apps/web/ui/layout/auth-layout.tsx (4)

1-2: LGTM! Proper imports for the simplified layout.

The imports correctly include ClientOnly from the UI package and React types for the new prop structure.


4-7: Well-typed component with optional terms prop.

The component signature properly:

  • Uses PropsWithChildren for correct TypeScript typing
  • Provides default value for optional showTerms boolean
  • Maintains clear prop interface

9-17: Clever vertical centering approach with proper client-side handling.

The layout structure effectively:

  • Uses justify-between with grow spacers for vertical centering
  • Maintains ClientOnly wrapper for hydration safety
  • Includes Suspense for proper loading states
  • Centers content horizontally with responsive padding

19-42: Well-implemented conditional terms section with proper accessibility.

The terms section provides:

  • Conditional rendering based on showTerms prop
  • Responsive padding for different screen sizes
  • Proper external links with target="_blank"
  • Good typography hierarchy and hover states
  • Accessible link styling with appropriate contrast

The legal links point to the correct Dub legal pages.

apps/web/app/(ee)/partners.dub.co/(auth)/(default)/layout.tsx (2)

2-2: LGTM! Import addition supports conditional styling.

The cn utility import is necessary for the complex conditional className logic used in the background effects.


48-58: Well-positioned branding with clear hierarchy.

The content layout provides:

  • Proper relative positioning for child elements
  • Centered Wordmark link with appropriate z-index
  • Clear "Partners" label for brand distinction
  • Correct external link to partners page
apps/web/app/(ee)/partners.dub.co/(auth)/(default)/register/page-client.tsx (3)

3-3: LGTM - Import additions support the auth UI refactor.

The new imports for AuthAlternativeBanner and AuthLayout align with the broader authentication UI standardization effort.

Also applies to: 10-10


36-63: LGTM - Clean refactor with improved consistency.

The SignUp component refactoring successfully:

  • Adopts the standardized AuthLayout with terms display
  • Implements consistent container sizing and text alignment
  • Adds effective cross-promotion via AuthAlternativeBanner
  • Maintains clear navigation with updated link styling

The layout structure is clean and follows the established pattern from other auth pages.


71-88: LGTM - Consistent layout adoption with improved typography.

The Verify component refactoring successfully adopts the AuthLayout pattern and improves the visual hierarchy with centered text alignment and enhanced font styling for better user experience.

apps/web/app/app.dub.co/(auth)/login/page.tsx (1)

14-40: LGTM - Effective auth UI standardization with improved UX.

The login page refactoring successfully:

  • Adopts the consistent AuthLayout with terms display
  • Simplifies container styling for better focus
  • Uses conventional "Log in" terminology
  • Enhances link styling for better accessibility
  • Provides effective cross-promotion via AuthAlternativeBanner

The layout is clean and maintains consistency with other auth pages in the refactor.

apps/web/ui/auth/register/verify-email-form.tsx (1)

56-116: LGTM - Improved form structure with better UX.

The form restructuring successfully:

  • Removes unnecessary animation from the entire form while preserving it for error feedback
  • Improves OTP input styling with better proportions (w-12)
  • Enhances error message presentation with refined typography
  • Maintains all existing form logic and validation

The changes result in a cleaner, more focused user experience during email verification.

apps/web/ui/auth/register/signup-email.tsx (7)

6-10: LGTM! Proper imports for progressive disclosure functionality.

The new imports support the enhanced form functionality with progressive disclosure and mobile-responsive behavior.


17-17: Good mobile detection for auto-focus management.

Using useMediaQuery to detect mobile devices helps prevent unwanted keyboard pop-ups on mobile devices during auto-focus.


22-22: Progressive disclosure state properly initialized.

The showPassword state controls the two-step form flow effectively.


24-35: Form setup correctly configured with default values.

The useForm initialization with default email value and proper destructuring provides good integration with the existing register context.


52-66: Progressive disclosure logic implemented correctly.

The custom onSubmit handler properly implements the two-step flow:

  1. Prevents submission and reveals password field when email is provided but password isn't
  2. Proceeds with normal submission when both fields are completed

The event handling with preventDefault() and stopPropagation() correctly prevents unwanted form submission during the disclosure step.


81-81: Smart auto-focus logic for better UX.

The conditional auto-focus logic properly handles different states:

  • Email field focuses when password isn't shown and not on mobile
  • Password field focuses when revealed and not on mobile

This prevents mobile keyboard issues while maintaining good desktop UX.

Also applies to: 94-94


99-101: FormProvider wrapper necessary for PasswordRequirements context.

Since PasswordRequirements uses useWatch to monitor the password field, wrapping it in FormProvider is required to provide the form context. This is the correct approach given the component's dependency on react-hook-form context.

apps/web/app/app.dub.co/(auth)/register/page-client.tsx (4)

3-3: LGTM! Proper import for the alternative banner component.

The AuthAlternativeBanner import aligns with the UI enhancement goals of the PR.


24-40: UI layout improvements with better structure and accessibility.

The refactored SignUp component shows good improvements:

  • Proper semantic structure with centered headings
  • Improved typography hierarchy with text-xl font-semibold
  • Better spacing with mt-8 and mt-6
  • Accessible link styling with hover states

The "Already have an account?" section maintains good UX flow.


41-47: AuthAlternativeBanner properly promotes partner account signup.

The banner implementation correctly:

  • Uses descriptive text and clear call-to-action
  • Links to the partner registration portal
  • Provides good spacing with mt-12

This enhances discoverability of the partner program while maintaining clean separation from the main signup flow.


58-75: Verify component layout improvements maintain functionality.

The refactored Verify component shows consistent improvements:

  • Better semantic structure with proper heading hierarchy
  • Improved spacing and visual alignment with items-center gap-1
  • Maintains the existing email truncation and display logic
  • Consistent spacing patterns with the SignUp component

@steven-tey steven-tey merged commit 684d02d into main Jun 4, 2025
7 of 8 checks passed
@steven-tey steven-tey deleted the auth-onboarding branch June 4, 2025 18:57
@coderabbitai coderabbitai bot mentioned this pull request Jun 25, 2025
This was referenced Jul 21, 2025
This was referenced Jul 30, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 4, 2025
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