-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(web): Add logoImageClassName to default header #16582
feat(web): Add logoImageClassName to default header #16582
Conversation
WalkthroughThe changes in this pull request introduce a new optional property Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
Documentation and Community
|
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: 4
🧹 Outside diff range and nitpick comments (1)
apps/web/components/DefaultHeader/DefaultHeader.tsx (1)
35-35
: Consider renaming the prop for better clarity.The prop name
logoImageClassName
suggests it accepts a string class name, but it's actually a boolean toggle. Consider renaming to something more descriptive likeisLogoLarge
oruseLargeLogo
to better reflect its purpose.- logoImageClassName?: boolean + isLogoLarge?: boolean
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
- apps/web/components/DefaultHeader/DefaultHeader.css.ts (1 hunks)
- apps/web/components/DefaultHeader/DefaultHeader.tsx (4 hunks)
- apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
apps/web/components/DefaultHeader/DefaultHeader.css.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/web/components/DefaultHeader/DefaultHeader.tsx (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (4)
apps/web/components/DefaultHeader/DefaultHeader.css.ts (1)
134-137
: Implementation follows established patterns.The new
logoLarge
style is correctly implemented using vanilla-extract and maintains consistency with existing logo styles.apps/web/components/DefaultHeader/DefaultHeader.tsx (2)
59-59
: LGTM!The prop is correctly destructured and follows the component's parameter ordering convention.
93-99
: LGTM! Good accessibility implementation.The logo implementation is well-structured with proper conditional class application and includes alt text for accessibility.
apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (1)
616-622
: LGTM! The faggilding case implementation looks good.The implementation:
- Correctly uses the DefaultHeader component
- Properly passes the logoImageClassName prop using the namespace function
- Follows the existing pattern of other organization cases
- Aligns with the PR objective to support larger logos for Faggilding organization
apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16582 +/- ##
========================================
Coverage 36.78% 36.78%
========================================
Files 6858 6855 -3
Lines 142402 142297 -105
Branches 40613 40592 -21
========================================
- Hits 52378 52346 -32
+ Misses 90024 89951 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 20 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 84 Passed, 0 Skipped, 29.71s Total Time |
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: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
- apps/web/components/DefaultHeader/DefaultHeader.tsx (4 hunks)
- apps/web/components/Organization/Wrapper/OrganizationWrapper.css.ts (1 hunks)
- apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/web/components/DefaultHeader/DefaultHeader.tsx
🧰 Additional context used
📓 Path-based instructions (2)
apps/web/components/Organization/Wrapper/OrganizationWrapper.css.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (1)
apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (1)
616-622
: Verify DefaultHeader component integration.Let's ensure the DefaultHeader component properly supports the new logoImageClassName prop.
✅ Verification successful
DefaultHeader integration is properly configured
The verification shows that:
- The
DefaultHeader
component properly accepts thelogoImageClassName
prop in its interface definition- The corresponding CSS style
logoLarge
exists inOrganizationWrapper.css.ts
with appropriate width and height settings- The style is correctly passed to the component
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify DefaultHeader component supports logoImageClassName prop # and corresponding CSS styles exist # Test 1: Check if DefaultHeader component accepts logoImageClassName prop ast-grep --pattern 'interface DefaultHeaderProps { $$$ logoImageClassName?: $_ $$$ }' # Test 2: Check for corresponding CSS styles rg -A 2 'logoLarge|logo.*large' '*.css.ts'Length of output: 1980
Script:
#!/bin/bash # Let's check the CSS styles with the correct file extension and path pattern rg -A 2 'logoLarge|logo.*large' --type css # Also verify how the logoImageClassName is used in DefaultHeader ast-grep --pattern 'const DefaultHeader = ($$$) => { $$$ logoImageClassName $$$ }' # Check other usages of DefaultHeader with logoImageClassName rg "DefaultHeader.*logoImageClassName" -A 2Length of output: 181
Script:
#!/bin/bash # Let's check the actual implementation of DefaultHeader to see how logoImageClassName is used ast-grep --pattern 'export const DefaultHeader = ({ $$$, logoImageClassName, $$$ }: DefaultHeaderProps) => { $$$ }' # Check the styles file in the Organization/Wrapper directory rg -l "logoLarge" apps/web/components/Organization/Wrapper/ # Check for any CSS module files in the Organization/Wrapper directory fd ".*\.module\.(css|scss)" apps/web/components/Organization/Wrapper/Length of output: 384
Script:
#!/bin/bash # Let's check the content of the CSS file to verify the logoLarge style cat apps/web/components/Organization/Wrapper/OrganizationWrapper.css.ts # Let's also check how DefaultHeader is used with logoImageClassName in the wrapper rg -A 5 "DefaultHeader.*logoImageClassName" apps/web/components/Organization/Wrapper/OrganizationWrapper.tsxLength of output: 7228
Add logoImageClassName to default header
What
Why
This was requested by Digital Iceland to make Faggilding organization logo larger.
Screenshots / Gifs
Before
After
Checklist:
Summary by CodeRabbit
New Features
Styling Enhancements