-
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 default header for syslumenn organization #15959
Conversation
WalkthroughThe changes introduce a new header component, Changes
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
|
Datadog ReportBranch report: ✅ 0 Failed, 84 Passed, 0 Skipped, 30.92s Total Time |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15959 +/- ##
==========================================
- Coverage 36.86% 36.81% -0.05%
==========================================
Files 6714 6710 -4
Lines 137611 137366 -245
Branches 39119 39107 -12
==========================================
- Hits 50732 50576 -156
+ Misses 86879 86790 -89
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 58 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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 and nitpick comments (1)
apps/web/components/Organization/Wrapper/Themes/SyslumennTheme/SyslumennDefaultHeader.tsx (1)
18-63
: LGTM! Consider adding tests for the component.The
SyslumennDefaultHeader
component is well-implemented and adheres to the NextJS best practices. It efficiently manages the state using hooks and conditionally renders based on the window size and theme properties. The use of TypeScript for the component props ensures type safety.To further improve the component, consider adding tests to validate its behavior under different configurations, such as different window sizes and theme properties.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (4 hunks)
- apps/web/components/Organization/Wrapper/Themes/SyslumennTheme/SyslumennDefaultHeader.css.ts (1 hunks)
- apps/web/components/Organization/Wrapper/Themes/SyslumennTheme/SyslumennDefaultHeader.tsx (1 hunks)
- apps/web/components/Organization/Wrapper/Themes/SyslumennTheme/index.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- apps/web/components/Organization/Wrapper/Themes/SyslumennTheme/SyslumennDefaultHeader.css.ts
Additional context used
Path-based instructions (3)
apps/web/components/Organization/Wrapper/Themes/SyslumennTheme/index.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/Themes/SyslumennTheme/SyslumennDefaultHeader.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 not posted (6)
apps/web/components/Organization/Wrapper/Themes/SyslumennTheme/index.ts (2)
3-3
: LGTM!The import statement for the
DefaultHeader
component is correctly written and follows the NextJS best practices for importing components.
8-8
: LGTM!The export statement for the
SyslumennDefaultHeader
component is correctly written and enhances the module's functionality by providing an additional header option.apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx (4)
100-104
: LGTM!The import statement for the
SyslumennDefaultHeader
component is correctly added.
170-175
: LGTM!The changes in the
getThemeConfig
function correctly parse theorganization
object to extract theusingDefaultHeader
boolean value. This allows the function to determine whether to use the default header for the Syslumenn theme based on the organization's configuration.
201-202
: LGTM!The changes correctly include the
usingDefaultHeader
boolean in the condition for returning the theme configuration for light themes. This ensures that the default header is used for the Syslumenn theme whenusingDefaultHeader
istrue
, regardless of the theme.
Line range hint
271-282
: LGTM!The changes correctly update the rendering logic for the 'syslumenn' theme to conditionally render the appropriate header component based on the
usingDefaultHeader
value. TheSyslumennDefaultHeader
component is rendered whenusingDefaultHeader
istrue
, and the existingSyslumennHeader
component is rendered otherwise. The necessary props are passed to theSyslumennDefaultHeader
component.
apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx
Outdated
Show resolved
Hide resolved
* Add default header for syslumenn organization * Fix json parse --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Add default header for syslumenn organization
What
Make it possible to use default header for syslumenn organization via config.
Why
A design that was approved by Digital Iceland
Screenshots / Gifs
Before
After
Checklist:
Summary by CodeRabbit
New Features
Style
Documentation