Skip to content

Conversation

@gauravk-io
Copy link

@gauravk-io gauravk-io commented Dec 26, 2025

Description

This PR fixes a responsiveness issue in the statistics section where content was getting cut off on smaller screen sizes.

Changes

  • Removed fixed widths causing overflow
  • Updated layout to use responsive styles
  • Verified behavior across common mobile breakpoints

Screenshots

Before

Before – statistics section cut off on mobile

After

After – statistics section responsive on mobile

Fixes #314

Summary by CodeRabbit

  • Style
    • Updated the Brands section layout to display content in a two-column format for improved visual organization.
    • Refined text sizing across the section with enhanced responsive scaling for better readability across devices.
    • Adjusted spacing and styling for a more cohesive and polished appearance.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 26, 2025

@gauravk-io is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

📝 Walkthrough

Walkthrough

The Brands.tsx component was restructured from a single-column layout to a two-column layout with adjusted responsive typography sizing. This addresses the mobile responsiveness issue where content was being cut off on smaller screens by reorganizing the layout and refining text scaling properties.

Changes

Cohort / File(s) Summary
Layout & Typography Restructuring
apps/web/src/components/landing-sections/Brands.tsx
Changed layout from single full-width column to two-column structure (left/right halves); added overflow-hidden to main container; adjusted numeric and text styling with responsive clamp values; updated gradient text sizes; modified secondary label typography (Queries/Users) with responsive breakpoints; refined padding and box-shadow properties

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #223: Modifies the same Brands.tsx file with responsive typography adjustments for stats/count display, addressing similar mobile rendering concerns.

Poem

🐰 Two columns dance where one used to stand,
Mobile screens now have room, all carefully planned,
No more cut-off stats, just balance and grace,
Responsive and nimble across every space! ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: making the statistics section responsive on mobile, which directly addresses the core issue in the changeset.
Linked Issues check ✅ Passed The pull request successfully addresses issue #314 by removing fixed widths, updating to responsive styles, and adjusting layout to display content properly on mobile viewports without truncation.
Out of Scope Changes check ✅ Passed All changes in the Brands.tsx file are focused on resolving the mobile responsiveness issue described in issue #314; no unrelated modifications were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 0

🧹 Nitpick comments (4)
apps/web/src/components/landing-sections/Brands.tsx (4)

27-30: Layout changes address the mobile responsiveness issue effectively.

The overflow-hidden, flex-row, and w-1/2 split correctly fix the content cutoff on mobile. The padding scale (px-2 py-8 md:p-10) aligns with Tailwind spacing guidelines.

However, the hardcoded hex #14111C in the box-shadow violates the coding guidelines. Per learnings, use semantic color names from the design token system instead.

🔎 Suggested refactor for hardcoded hex

Consider extracting the box-shadow color to a CSS variable or design token, or using a Tailwind shadow utility if one matches your design system.


32-37: Redundant text sizing classes and hardcoded hex values.

  1. md:text-8xl md:text-[80px] are both applied at the md: breakpoint, making one redundant. text-8xl equals 6rem (96px), while text-[80px] is a different value—likely intended to override.

  2. The gradient uses hardcoded hex #341e7b which violates the coding guidelines requiring semantic design tokens.

🔎 Suggested fix
-            <span className="md:text-8xl md:text-[80px] text-xl sm:text-5xl text-[clamp(1rem,8vw,6rem)] font-mono tracking-tighter font-medium text-purple-400 animate-pulse">
+            <span className="md:text-[80px] text-xl sm:text-5xl text-[clamp(1rem,8vw,6rem)] font-mono tracking-tighter font-medium text-purple-400 animate-pulse">

If 80px is the intended size at md:, remove md:text-8xl. Consider replacing #341e7b with a design token color.


45-48: Avoid as any type cast; CSS variable appears unused.

The as any cast violates coding guidelines. Additionally, the --text CSS variable is set but doesn't appear to be referenced in the className or elsewhere.

🔎 Suggested fix

If the CSS variable is unused, remove it:

-          <span
-            style={{ "--text": "Opensox" } as any}
-            className=" relative pointer-events-none ..."
+          <span
+            className="relative pointer-events-none ..."

If needed, use a proper type instead of any:

style={{ "--text": "Opensox" } as React.CSSProperties & { [key: string]: string }}

65-68: Minor: leading whitespace in className string.

Both label spans (lines 47 and 67) have a leading space in the className string ( relative pointer-events-none...). While functionally harmless, removing it improves consistency.

🔎 Suggested fix
-            className=" relative pointer-events-none text-center ..."
+            className="relative pointer-events-none text-center ..."
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f161af and cc64551.

📒 Files selected for processing (1)
  • apps/web/src/components/landing-sections/Brands.tsx
🧰 Additional context used
📓 Path-based instructions (11)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Always use lowercase when writing comments
Avoid unnecessary comments; code should be self-documenting when possible
Use comments to explain 'why', not 'what'
Remove unused imports
Use UPPER_SNAKE_CASE for constants
Use camelCase for functions and variables

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
apps/web/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

apps/web/src/**/*.{ts,tsx}: Always follow the design system defined in apps/web/src/lib/design-tokens.ts and apps/web/tailwind.config.ts
NEVER use hardcoded hex values (e.g., #5519f7) directly in components; ALWAYS reference colors from the design token system using Tailwind classes
Use semantic color names that describe purpose, not appearance
Use font-sans for standard UI text (Geist Sans) and font-mono for code, technical content, or monospace needs (DM Mono)
Follow Tailwind's spacing scale (0.25rem increments); for section padding use mobile p-4 (1rem) and desktop p-[60px]
Use appropriate border radius: small elements rounded-lg, medium rounded-xl, large rounded-2xl, buttons rounded-[16px]
Use animation durations: fast duration-100 (0.1s), normal duration-300 (0.3s), slow duration-600 (0.6s)

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,ts}: Prefer functional components with TypeScript and use proper TypeScript types, avoid any
Extract reusable logic into custom hooks
Use descriptive prop names and define prop types using TypeScript interfaces or types
Prefer controlled components over uncontrolled
Use zustand for global state (located in src/store/)
Use absolute imports from @/ prefix when available
Include proper aria labels for accessibility
Ensure keyboard navigation works
Maintain proper heading hierarchy
Provide alt text for images
Avoid unnecessary re-renders

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Organize imports: react → third-party → local components → utils → types

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
**/*[A-Z]*.{tsx,ts}

📄 CodeRabbit inference engine (.cursorrules)

Use PascalCase for component file names (e.g., UserProfile.tsx)

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx}: Use PascalCase for types and interfaces with descriptive names
Use dynamic imports for code splitting when appropriate
Memoize expensive computations

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
apps/web/src/**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursorrules)

Optimize images using next/image

apps/web/src/**/*.{tsx,ts}: Use Zustand for global state, located in src/store/
Use PascalCase for types and interfaces with descriptive names
Use dynamic imports for code splitting when appropriate
Optimize images using next/image
Memoize expensive computations
Define a type when defining const functions

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
**/*.{js,jsx,ts,tsx,py,java,go,rb,php}

📄 CodeRabbit inference engine (.cursor/rules/general_rules.mdc)

**/*.{js,jsx,ts,tsx,py,java,go,rb,php}: Always use lowercase when writing comments
Avoid unnecessary comments; code should be self-documenting when possible
Use comments to explain 'why', not 'what'

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
apps/web/src/components/**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (apps/web/.cursor/rules/frontend_rules.mdc)

apps/web/src/components/**/*.{tsx,ts,jsx,js}: Never use hardcoded hex values directly in components; always reference colors from the design token system using Tailwind classes
Use semantic color names from the design token system that describe purpose, not appearance (e.g., bg-brand-purple, bg-surface-primary, text-text-primary)
Use font-sans for standard UI text (Geist Sans) and font-mono for code, technical content, or monospace needs (DM Mono)
Follow Tailwind's spacing scale for section padding: p-4 (1rem) on mobile, p-[60px] on desktop
Use rounded-lg (0.5rem) for small elements, rounded-xl (1rem) for medium elements, rounded-2xl (1.5rem) for large elements, and rounded-[16px] for buttons
Use duration-100 (0.1s) for fast transitions, duration-300 (0.3s) for normal transitions, and duration-600 (0.6s) for slow transitions
Use available custom animations: animate-accordion-down, animate-accordion-up, animate-scrollRight, animate-scrollLeft, animate-customspin, animate-spin-slow, animate-spin-slow-reverse, animate-marquee, animate-marquee-vertical, animate-shine
Prefer functional components with TypeScript
Extract reusable logic into custom hooks
Prefer controlled components over uncontrolled
Include proper aria labels for accessibility
Ensure keyboard navigation works in interactive components
Maintain proper heading hierarchy in page components
Provide alt text for images
Use 'class:' instead of the ternary operator in class tags whenever possible
Implement accessibility features on interactive elements (e.g., tabindex='0', aria-label, onClick, onKeyDown)
Always follow the design system defined in apps/web/src/lib/design-tokens.ts and apps/web/tailwind.config.ts

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
apps/web/src/components/**/*.{tsx,ts}

📄 CodeRabbit inference engine (apps/web/.cursor/rules/frontend_rules.mdc)

apps/web/src/components/**/*.{tsx,ts}: Use proper TypeScript types and avoid using any type
Use descriptive prop names and define prop types using TypeScript interfaces or types
Name components using PascalCase (e.g., UserProfile.tsx)

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
apps/web/src/**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (apps/web/.cursor/rules/frontend_rules.mdc)

apps/web/src/**/*.{tsx,ts,jsx,js}: Organize imports in order: React → third-party → local components → utils → types
Use absolute imports from @/ prefix when available
Remove unused imports
Use UPPER_SNAKE_CASE for constants
Use camelCase for functions and variables
Always use Tailwind classes for styling HTML elements; avoid using CSS or style tags
Use descriptive variable and function names; name event functions with a 'handle' prefix (e.g., handleClick, handleKeyDown)
Use const with arrow functions instead of function declarations (e.g., 'const toggle = () =>')

Files:

  • apps/web/src/components/landing-sections/Brands.tsx
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Follow Tailwind's spacing scale for section padding: p-4 (1rem) on mobile, p-[60px] on desktop
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Use rounded-lg (0.5rem) for small elements, rounded-xl (1rem) for medium elements, rounded-2xl (1.5rem) for large elements, and rounded-[16px] for buttons
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Maintain proper heading hierarchy in page components
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Use semantic color names from the design token system that describe purpose, not appearance (e.g., bg-brand-purple, bg-surface-primary, text-text-primary)

Applied to files:

  • apps/web/src/components/landing-sections/Brands.tsx
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Follow Tailwind's spacing scale for section padding: p-4 (1rem) on mobile, p-[60px] on desktop

Applied to files:

  • apps/web/src/components/landing-sections/Brands.tsx
📚 Learning: 2025-12-17T12:39:29.991Z
Learnt from: huamanraj
Repo: apsinghdev/opensox PR: 262
File: apps/web/src/components/checkout/CheckoutWrapper.tsx:5-5
Timestamp: 2025-12-17T12:39:29.991Z
Learning: In Next.js apps, avoid using redirect() from next/navigation inside Client Components during render. It should not be used in event handlers like onClick or onSubmit; for those cases, use useRouter().push() or router.replace() instead. This guidance applies to TSX files (React components) across the codebase; implement in client components to handle conditional redirects during render, and use router-based navigation in handlers.

Applied to files:

  • apps/web/src/components/landing-sections/Brands.tsx
🧬 Code graph analysis (1)
apps/web/src/components/landing-sections/Brands.tsx (1)
apps/web/src/app/(main)/(landing)/page.tsx (1)
  • main (15-34)
🔇 Additional comments (1)
apps/web/src/components/landing-sections/Brands.tsx (1)

50-50: Verify box-shadow inconsistency between columns.

The first column uses [box-shadow:0_0_100px_-10px_#14111C_inset] while this column uses [box-shadow:0_0_0px_-10px_#14111C_inset] (0px blur vs 100px blur).

If intentional for visual asymmetry, consider adding a comment explaining why. If unintentional, this may be a typo.

@huamanraj
Copy link
Contributor

@apsinghdev good to merge!

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.

[BUG] statistics section is not responsive on mobile (content gets cut)

2 participants