Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Refactor auth forms (login, signup, reset-password) to use BrandedButton component
  • Add BrandedLink component for changelog page
  • Reduce code duplication by removing inline button styling
  • Update star count default value to 25.8k

Type of Change

  • Improvement (non-breaking change that improves existing functionality)

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

- Refactor auth forms to use BrandedButton component
- Add BrandedLink component for changelog page
- Reduce code duplication in login, signup, reset-password forms
- Update star count default value
@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 22, 2026 1:16am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 22, 2026

Greptile Summary

This PR refactors authentication and landing page forms to use the centralized BrandedButton and BrandedLink components, replacing duplicated inline button styling. The changes reduce code duplication and improve maintainability by consolidating branded button styling into reusable components that automatically handle whitelabel customization via the useBrandedButtonClass hook.

Key Changes:

  • Refactored auth forms (login, signup, reset-password) to use BrandedButton instead of inline styled buttons
  • Removed manual hover state management (isButtonHovered, isResetButtonHovered) that is now handled internally by BrandedButton
  • Added new BrandedLink component for changelog page GitHub link
  • Updated careers page to use BrandedButton with custom options (showArrow={false}, fullWidth={false})
  • Updated default star count from 25.1k to 25.8k across nav and chat components
  • Consistent loading states now use loading and loadingText props instead of conditional rendering

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are purely refactoring existing functionality into reusable components with no behavioral changes. The BrandedButton component is already well-tested in the codebase (used in SSO and verify flows), and the refactoring follows established patterns. All changes maintain the same visual appearance and functionality while improving code maintainability.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/(auth)/login/login-form.tsx Refactored to use BrandedButton component, removed manual button styling and hover state management
apps/sim/app/(auth)/signup/signup-form.tsx Replaced custom button implementation with BrandedButton component
apps/sim/app/(landing)/careers/page.tsx Updated careers form to use BrandedButton with customization options (no arrow, not full width)
apps/sim/app/changelog/components/branded-link.tsx New component for branded links using useBrandedButtonClass hook

Sequence Diagram

sequenceDiagram
    participant User
    participant AuthForm as Auth Forms<br/>(login/signup/reset)
    participant BrandedButton
    participant Hook as useBrandedButtonClass
    participant CSS as globals.css
    
    User->>AuthForm: Interacts with form
    AuthForm->>BrandedButton: Renders with props<br/>(loading, loadingText, etc)
    BrandedButton->>Hook: Calls useBrandedButtonClass()
    Hook->>CSS: Checks --brand-accent-hex
    CSS-->>Hook: Returns custom or default brand
    Hook-->>BrandedButton: Returns class<br/>(branded-button-gradient<br/>or branded-button-custom)
    BrandedButton->>BrandedButton: Manages hover state<br/>(ChevronRight/ArrowRight)
    BrandedButton-->>AuthForm: Renders styled button
    AuthForm-->>User: Displays consistent branded button
Loading

@waleedlatif1 waleedlatif1 merged commit e2ccefb into staging Jan 22, 2026
12 checks passed
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.

2 participants