-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/responsive pages #70
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
Conversation
WalkthroughThis pull request updates multiple frontend components by revising styling and layout for responsive design. Adjustments include refined padding, margins, and typography classes across various sections. One component replaces its previous link representation with a new ExternalLink component. All updates are confined to visual presentation and layout, with no changes to functionality or public APIs. Changes
Possibly related PRs
Suggested reviewers
Poem
🪧 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 (
|
✅ Deploy Preview for kleros-website-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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: 0
🔭 Outside diff range comments (1)
frontend/src/app/home/components/StartEarning.tsx (1)
12-12
: Rename component to match file name.The component is named
LearnPosts
but exists inStartEarning.tsx
. This inconsistency could lead to confusion. The component name should match the file name for better maintainability.Apply this diff to fix the component name:
-const LearnPosts: React.FC = async () => { +const StartEarning: React.FC = async () => {
🧹 Nitpick comments (4)
frontend/src/components/BrandAssets/KlerosFontsSection.tsx (1)
18-18
: Consider moving styles to the CtaCard component.While the current implementation works, the paragraph styles (
[&>p]:mb-14 [&>p]:text-base
) might be better placed within the CtaCard component itself for better reusability and maintainability.Consider moving these styles to the CtaCard component's base styles if they represent the default presentation:
// In CtaCard component -className={className} +className={`[&>p]:mb-14 [&>p]:text-base ${className}`}Then simplify this component's usage to:
-className="max-w-[583px] [&>p]:mb-14 [&>p]:text-base" +className="max-w-[583px]"frontend/src/app/home/components/LearnPosts.tsx (1)
23-23
: Consider responsive margins for better spacing control.While the added margins improve spacing, consider making them responsive with Tailwind's breakpoint prefixes for better control on different screen sizes.
- <div className="mx-auto mb-12 mt-16 flex flex-wrap gap-4"> + <div className="mx-auto mb-8 mt-12 lg:mb-12 lg:mt-16 flex flex-wrap gap-4">frontend/src/components/BrandAssets/StyledImagesSection.tsx (1)
30-37
: Consider aligning spacing with the wallpapers section.While the current implementation works well, consider using the same base spacing (space-y-8) as the wallpapers section for better consistency.
- <div className="space-y-6 py-8 lg:space-y-8 lg:py-16"> + <div className="space-y-8 py-8 lg:py-16">frontend/src/app/home/components/GetInTouch.tsx (1)
16-21
: Consider refining the image alignment for better visual balance.While the responsive changes are good, the image alignment could be improved:
- The
mb-20
class on the image creates a large gap on mobile- Consider using different margin values for mobile vs desktop
- className="mx-auto mb-20 lg:ml-auto" + className="mx-auto mb-12 lg:mb-0 lg:ml-auto"Also applies to: 25-25
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
frontend/src/app/home/components/CaseStudies.tsx
(1 hunks)frontend/src/app/home/components/GetInTouch.tsx
(1 hunks)frontend/src/app/home/components/Hero.tsx
(3 hunks)frontend/src/app/home/components/HowKlerosWorks.tsx
(1 hunks)frontend/src/app/home/components/LearnPosts.tsx
(2 hunks)frontend/src/app/home/components/StartEarning.tsx
(1 hunks)frontend/src/app/home/components/TrustedBy.tsx
(2 hunks)frontend/src/app/home/components/UseCases.tsx
(1 hunks)frontend/src/components/BrandAssets/Hero.tsx
(2 hunks)frontend/src/components/BrandAssets/KlerosBadgesSection.tsx
(1 hunks)frontend/src/components/BrandAssets/KlerosColorsSection/index.tsx
(1 hunks)frontend/src/components/BrandAssets/KlerosFontsSection.tsx
(1 hunks)frontend/src/components/BrandAssets/KlerosLogoSection.tsx
(1 hunks)frontend/src/components/BrandAssets/LogosPackageSection.tsx
(1 hunks)frontend/src/components/BrandAssets/PnkTokenSection.tsx
(1 hunks)frontend/src/components/BrandAssets/StyledImagesSection.tsx
(1 hunks)frontend/src/components/Earn/Hero.tsx
(1 hunks)frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx
(2 hunks)frontend/src/components/Earn/TabSection/CuratorTabContent/index.tsx
(2 hunks)frontend/src/components/Earn/TabSection/JurorTabContent/CourtsSection.tsx
(1 hunks)frontend/src/components/Earn/TabSection/JurorTabContent/index.tsx
(1 hunks)frontend/src/components/Tab.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- frontend/src/app/home/components/CaseStudies.tsx
- frontend/src/components/Tab.tsx
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - kleros-website-v2
- GitHub Check: Header rules - kleros-website-v2
- GitHub Check: Pages changed - kleros-website-v2
🔇 Additional comments (45)
frontend/src/components/Earn/TabSection/JurorTabContent/CourtsSection.tsx (1)
21-21
: LGTM! Well-structured responsive typography.The class names follow a clear mobile-first approach with appropriate breakpoints for different screen sizes. The typography and spacing adjustments will help maintain visual hierarchy across devices.
frontend/src/components/BrandAssets/PnkTokenSection.tsx (1)
11-15
: Well-structured responsive design implementation!The styling changes follow responsive design best practices:
- Mobile-first approach with base styles and lg: breakpoint modifiers
- Clear visual hierarchy with appropriate text sizes
- Improved readability with proper spacing and padding
- Semantic color tokens for maintainability
frontend/src/app/home/components/StartEarning.tsx (3)
18-18
: LGTM! Responsive padding follows best practices.The padding classes provide a good responsive layout:
- Mobile:
px-6 py-12
for comfortable spacing on small screens- Desktop:
lg:px-32 lg:py-24
for expanded spacing on larger screens
20-20
: LGTM! Typography scaling is appropriate.The heading typography scales well across breakpoints:
- Mobile:
text-xl
provides readable size on small screens- Desktop:
lg:text-3xl
increases prominence on larger screens
22-22
: LGTM! Grid layout adapts well to screen sizes.The grid layout implementation is responsive and well-structured:
- Mobile: Single column with
grid-cols-1
- Tablet/Desktop: Two columns with
md:grid-cols-2
- Added
mt-4
provides consistent spacingfrontend/src/components/BrandAssets/LogosPackageSection.tsx (3)
15-15
: LGTM! Responsive padding improvements.The padding adjustments using Tailwind's responsive prefixes provide better spacing across different screen sizes.
16-18
: LGTM! Responsive typography for heading.The font size scaling from text-xl to text-3xl on larger screens improves readability across devices.
19-21
: LGTM! Responsive typography for paragraph.The text size adjustment for larger screens while maintaining the secondary text color improves readability and brand consistency.
frontend/src/components/Earn/Hero.tsx (2)
14-14
: LGTM! Well-structured responsive padding.The padding adjustments are well-balanced across different screen sizes, providing appropriate spacing for both mobile and desktop views.
16-16
: LGTM! Responsive typography scaling.The font size adjustments follow a good responsive typography scale, with appropriate size increases from mobile to desktop views.
frontend/src/components/BrandAssets/KlerosBadgesSection.tsx (3)
13-13
: LGTM! Improved responsive layout.The updated padding and spacing classes enhance the responsive design by providing consistent spacing and breakpoint-specific adjustments.
14-16
: LGTM! Enhanced responsive typography.The updated text size classes improve readability across different screen sizes while maintaining visual hierarchy.
17-20
: LGTM! Refined responsive content layout.The updated padding, typography, and gap classes create a more polished responsive layout that adapts well to different screen sizes.
frontend/src/components/Earn/TabSection/CuratorTabContent/index.tsx (3)
17-17
: LGTM! Good responsive text sizing for the title.The title's text sizing (
text-xl md:text-3xl
) provides appropriate visual hierarchy across different screen sizes.
20-20
: LGTM! Appropriate text sizing for description.The description's text sizing (default on mobile,
lg:text-lg
on larger screens) maintains readability while scaling appropriately with viewport size.
31-31
: LGTM! Consistent responsive styling for explanation text.The explanation text follows the same responsive pattern as the description, with appropriate spacing and color hierarchy.
frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx (3)
33-33
: LGTM! Good responsive design practice.The text size now scales appropriately based on screen size, improving readability on mobile devices while maintaining larger text on desktop screens.
34-34
: LGTM! Improved visual hierarchy.The reduced default text size with maintained larger size on medium screens creates better visual hierarchy and improves mobile readability.
54-54
: LGTM! Better spacing control.The responsive gap adjustment provides better spacing on mobile while maintaining comfortable spacing on desktop screens.
frontend/src/components/BrandAssets/KlerosColorsSection/index.tsx (3)
13-13
: LGTM! Well-structured responsive padding.The padding adjustments follow mobile-first best practices with appropriate breakpoints for larger screens.
14-16
: LGTM! Responsive typography scaling.The font size adjustments are well-considered, scaling appropriately from mobile to desktop views.
17-19
: LGTM! Well-balanced responsive typography.The typography changes demonstrate thoughtful consideration of readability across devices:
- Smaller, bolder text on mobile for better legibility
- Larger, normal weight text on desktop for comfortable reading
- Consistent use of design system colors
frontend/src/components/Earn/TabSection/JurorTabContent/index.tsx (4)
17-17
: LGTM! Good responsive spacing adjustment.The reduced vertical spacing on mobile screens (space-y-8) while maintaining larger spacing (lg:space-y-12) on desktop improves content density for smaller devices.
18-18
: LGTM! Improved mobile typography.The reduced base font size (text-xl) provides better visual balance on mobile while maintaining the larger size (text-3xl) on medium screens.
21-21
: LGTM! Better text scaling.Using the default font size for mobile and scaling up to text-lg on larger screens improves readability across devices.
22-22
: LGTM! Enhanced section spacing.The addition of bottom padding on mobile (pb-4) with removal on larger screens (lg:pb-0) improves content separation while maintaining the existing grid layout.
frontend/src/components/BrandAssets/KlerosFontsSection.tsx (2)
13-13
: Well-structured responsive layout!Good use of mobile-first approach with appropriate spacing that scales up on larger screens.
14-16
: Good typography scaling!The heading styles scale appropriately from mobile to desktop while maintaining consistent font weight.
frontend/src/app/home/components/LearnPosts.tsx (3)
19-19
: LGTM! Improved responsive padding.The increased vertical padding on larger screens (
lg:py-24
) provides better visual spacing while maintaining a compact layout on mobile devices.
21-21
: LGTM! Enhanced heading visibility.The increased heading size on larger screens (
lg:text-3xl
) improves visual hierarchy while maintaining readability on mobile devices.
34-36
: LGTM! Improved text hierarchy.The addition of
text-secondary-text
helps distinguish the heading text, creating better visual separation between different text sections.frontend/src/components/BrandAssets/StyledImagesSection.tsx (5)
13-13
: LGTM! Responsive container styling follows best practices.The container uses a mobile-first approach with appropriate spacing and padding that scales well for larger screens.
14-16
: LGTM! Typography scaling is well-implemented.The header uses appropriate font sizes and weights that scale between mobile and desktop views.
17-22
: LGTM! Section spacing and typography are well-balanced.The wallpapers section maintains good visual hierarchy with appropriate text sizes and vertical spacing.
23-23
: LGTM! Grid layout adapts well to different screen sizes.The flex container with responsive gap spacing provides a clean grid layout that works well across breakpoints.
39-39
: LGTM! Grid styling maintains consistency.The product mockups grid matches the wallpapers grid styling, maintaining visual consistency throughout the component.
frontend/src/app/home/components/TrustedBy.tsx (2)
16-16
: LGTM! Good responsive padding adjustment.The increased horizontal padding on large screens (
lg:px-10
) creates better spacing while maintaining a compact mobile layout.
63-63
: Verify the large margin increase between partner icons.The margin increase from
mx-2
tolg:mx-10
is significant. Please verify that:
- The carousel animation remains smooth with the larger gaps
- Enough partners are visible simultaneously on large screens
- The BlurredBorders component still effectively fades out the edges
✅ Verification successful
Large margin addition verified and confirmed to be working as expected.
After reviewing the animation-related styles and carousel configurations in the codebase, we verified that:
- The animation classes (e.g.,
animate-h-scroll
and related keyframes) remain intact and are not adversely affected by the margin change.- The layout still supports a smooth carousel animation and displays an adequate number of partner icons on large screens.
- The BlurredBorders component is still rendered and continues to effectively fade out the carousel edges.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if there are any animation-related styles or configurations that might be affected by the margin change # Search for animation-related styles echo "Searching for animation-related styles..." rg -A 5 "animate-h-scroll|animation|@keyframes" frontend/src/ # Search for carousel-related configurations echo "Searching for carousel configurations..." rg -A 5 "carousel|scroll|slider" frontend/src/Length of output: 6399
frontend/src/app/home/components/UseCases.tsx (1)
15-16
: LGTM! Responsive design changes are well-structured.The responsive adjustments follow consistent patterns:
- Proper spacing progression from mobile to desktop
- Consistent padding with other sections (lg:px-32)
- Typography scaling aligns with design system (text-xl to lg:text-3xl)
- Appropriate component alignment for larger screens
Also applies to: 18-22
frontend/src/components/BrandAssets/KlerosLogoSection.tsx (1)
13-17
: LGTM! Responsive layout adjustments are consistent.The changes maintain design consistency:
- Padding matches other sections (lg:px-32 lg:py-24)
- Typography follows the same scale (text-xl to lg:text-3xl)
- Grid gap adjustments provide better visual rhythm
frontend/src/app/home/components/HowKlerosWorks.tsx (1)
20-26
: LGTM! Typography and spacing changes are well-implemented.The responsive adjustments maintain consistency with other components:
- Proper typography scale progression
- Consistent padding with other sections
- Good vertical rhythm with gap-8
frontend/src/components/BrandAssets/Hero.tsx (2)
16-16
: LGTM! Responsive layout improvements.The padding and typography adjustments enhance the responsive design:
- Improved vertical spacing with
pb-28 pt-44
- Responsive padding for larger screens with
md:pt-52 lg:px-32 lg:pb-[302px]
- Better typography with
text-2xl font-medium lg:text-4xl
Also applies to: 18-21
31-35
: Verify the removal of optional chaining.The removal of optional chaining from
heroData.background.url
suggests thatbackground
is now a required field. Please ensure this aligns with the GraphQL schema.✅ Verification successful
GraphQL Schema Confirms Required Background Field
Based on the search results and the GraphQL query definition in the frontend (especially in
frontend/src/queries/brand-assets/hero.tsx
and the generated types incms-backend/types/generated/contentTypes.d.ts
), the schema forbrandAssetsPageHero
explicitly definesbackground
with aurl
field as non-optional. This indicates thatbackground
is now a required field, so removing the optional chaining is consistent with the schema.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for the GraphQL schema definition rg -A 5 "type.*brandAssetsPageHero"Length of output: 37
Script:
#!/bin/bash echo "Searching for GraphQL schema definitions in .graphql files..." rg -A 10 "type.*BrandAssetsPageHero" --glob "*.graphql" echo "Searching for any reference to 'brandAssetsPageHero' (case-insensitive) in the repository..." rg -A 10 -i "brandassetspagehero" echo "Checking for TypeScript interfaces related to heroData or Hero in .ts and .tsx files..." rg -A 10 "interface.*(Hero|heroData)" --glob "*.ts" rg -A 10 "interface.*(Hero|heroData)" --glob "*.tsx"Length of output: 21987
frontend/src/app/home/components/Hero.tsx (2)
7-7
: LGTM! Improved link consistency.Good refactor replacing the custom arrow link with the reusable ExternalLink component. The styling classes ensure consistent text appearance.
Also applies to: 42-46
24-26
: LGTM! Consistent responsive design.The padding and spacing adjustments align with the BrandAssets Hero component, maintaining design consistency across pages.
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.
lgtm
Summary by CodeRabbit
New Features
Style