-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore(frontend): request for full quality hero images #76
Conversation
WalkthroughThe changes update multiple Hero components across the project by adding a new property, quality={100}, to each Image component. This adjustment is applied uniformly in various sections—including for-lawyers, home, brand assets, community, cooperative, earn, for builders, PNKToken, and research development—to explicitly set the image rendering quality. 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
🧹 Nitpick comments (2)
frontend/src/components/ForBuilders/Hero.tsx (1)
45-52
: Consider centralizing image quality configuration.Since all hero components now use the same quality setting, consider moving this configuration to a central constant or theme configuration. This would make it easier to:
- Maintain consistency
- Adjust quality globally if needed
- Implement responsive quality settings
Example implementation:
// src/config/image.ts export const IMAGE_QUALITY = { hero: 100, // Add other image types as needed } as const; // Usage in components import { IMAGE_QUALITY } from '@/config/image'; // In Hero component <Image quality={IMAGE_QUALITY.hero} // ... other props />frontend/src/components/Earn/Hero.tsx (1)
53-53
: Consider optimizing the quality value for better performance.While
quality={100}
provides maximum quality, consider using a value between 80-90 which often provides visually identical results with better performance. The human eye typically can't perceive quality differences above this range.- quality={100} + quality={85}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
frontend/src/app/for-lawyers/components/Hero.tsx
(1 hunks)frontend/src/app/home/components/Hero.tsx
(1 hunks)frontend/src/components/BrandAssets/Hero.tsx
(1 hunks)frontend/src/components/Community/hero.tsx
(1 hunks)frontend/src/components/Cooperative/hero.tsx
(1 hunks)frontend/src/components/Earn/Hero.tsx
(1 hunks)frontend/src/components/ForBuilders/Hero.tsx
(1 hunks)frontend/src/components/PNKToken/Hero.tsx
(1 hunks)frontend/src/components/ResearchDevelopment/Hero.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- frontend/src/app/home/components/Hero.tsx
- frontend/src/components/ResearchDevelopment/Hero.tsx
- frontend/src/app/for-lawyers/components/Hero.tsx
- frontend/src/components/PNKToken/Hero.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 (4)
frontend/src/components/BrandAssets/Hero.tsx (1)
30-37
: Consider performance implications of maximum quality.Setting
quality={100}
will increase the image file size significantly compared to the default Next.js quality of 75. While this ensures the highest visual fidelity, it comes with a performance trade-off:
- Larger file sizes mean slower page loads
- Higher bandwidth consumption for users
Since this is a background image, consider if the visual difference between quality 75 and 100 justifies the performance cost.
To help make this decision, you can:
- Compare visual quality vs file size differences
- Consider using a lower quality for mobile devices
- Use the Network tab in Chrome DevTools to measure the impact
Would you like me to provide example code for implementing responsive quality settings?
frontend/src/components/Community/hero.tsx (1)
33-40
: LGTM! Consistent with other hero components.The quality setting matches other hero components, maintaining visual consistency across the site.
frontend/src/components/Cooperative/hero.tsx (1)
41-48
: LGTM! Consistent with other hero components.The quality setting matches other hero components, maintaining visual consistency across the site.
frontend/src/components/Earn/Hero.tsx (1)
53-53
: LGTM! Quality setting aligns with PR objectives.The addition of
quality={100}
ensures full quality for the hero background image as requested.
Summary by CodeRabbit