-
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
fix(efs): Set up for separate feature flag #15974
Conversation
WalkthroughThe changes involve modifications to the inheritance report application's form handling and feature flag management. The Changes
Possibly related PRs
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: 1
Outside diff range and nitpick comments (1)
libs/application/templates/inheritance-report/src/lib/getApplicationFeatureFlags.ts (1)
22-33
: Add type annotations for the accumulator and return value of thereduce
function.To improve the readability and maintainability of the code, consider adding type annotations for the accumulator and return value of the
reduce
function.).reduce( ( - acc, + acc: Record<InheritanceReportFeatureFlags, boolean>, { key, value }: { key: InheritanceReportFeatureFlags; value: boolean }, - ) => { + ): Record<InheritanceReportFeatureFlags, boolean> => { return Object.assign(acc, { [key]: value }) }, {} as Record<InheritanceReportFeatureFlags, boolean>, )Tools
Biome
[error] 28-28: Avoid the use of spread (
...
) syntax on accumulators.Spread syntax should be avoided on accumulators (like those in
.reduce
) because it causes a time complexity ofO(n^2)
.
Consider methods such as .splice or .push instead.(lint/performance/noAccumulatingSpread)
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- libs/application/templates/inheritance-report/src/forms/prerequisites.ts (2 hunks)
- libs/application/templates/inheritance-report/src/lib/InheritanceReportTemplate.ts (2 hunks)
- libs/application/templates/inheritance-report/src/lib/getApplicationFeatureFlags.ts (1 hunks)
- libs/feature-flags/src/lib/features.ts (0 hunks)
Files not reviewed due to no reviewable changes (1)
- libs/feature-flags/src/lib/features.ts
Additional context used
Path-based instructions (3)
libs/application/templates/inheritance-report/src/lib/getApplicationFeatureFlags.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/inheritance-report/src/forms/prerequisites.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/inheritance-report/src/lib/InheritanceReportTemplate.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Biome
libs/application/templates/inheritance-report/src/lib/getApplicationFeatureFlags.ts
[error] 28-28: Avoid the use of spread (
...
) syntax on accumulators.Spread syntax should be avoided on accumulators (like those in
.reduce
) because it causes a time complexity ofO(n^2)
.
Consider methods such as .splice or .push instead.(lint/performance/noAccumulatingSpread)
Additional comments not posted (4)
libs/application/templates/inheritance-report/src/lib/getApplicationFeatureFlags.ts (1)
1-34
: Well-structured code with good practices!The code follows good practices such as:
- Using enums for feature flags.
- Using async/await for handling promises.
- Using
Promise.all
andmap
to fetch the values in parallel.Keep up the good work!
Tools
Biome
[error] 28-28: Avoid the use of spread (
...
) syntax on accumulators.Spread syntax should be avoided on accumulators (like those in
.reduce
) because it causes a time complexity ofO(n^2)
.
Consider methods such as .splice or .push instead.(lint/performance/noAccumulatingSpread)
libs/application/templates/inheritance-report/src/forms/prerequisites.ts (1)
12-15
: LGTM!The changes to the
getForm
function enhance its configurability by allowing dynamic control over enabling/disabling application types based on the provided boolean flags. The code changes are logically correct, and the implementation is accurate. The tooltip provides useful information to the user about the estate inheritance option being in development.Additionally, the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining the new function parameters.
- Effective tree-shaking and bundling practices.
Also applies to: 40-42, 47-47
libs/application/templates/inheritance-report/src/lib/InheritanceReportTemplate.ts (2)
29-33
: LGTM!The imports are correctly used to enable dynamic feature flag handling within the application.
70-88
: LGTM!The changes to the
formLoader
function enable the form to adapt its behavior based on the feature flags, enhancing the application's flexibility. The code is correctly implemented.
libs/application/templates/inheritance-report/src/lib/getApplicationFeatureFlags.ts
Show resolved
Hide resolved
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.
Core file LGTM.
Datadog ReportAll test runs ✅ 70 Total Test Services: 0 Failed, 68 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (21)
|
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)
libs/application/templates/inheritance-report/src/lib/messages.ts (1)
64-68
: Approve the message addition. Consider adding a description.The new message
preDataCollectionApplicationForDefaultTooltip
provides useful contextual information to the user. The message ID and default text are appropriate.However, please consider adding a description for this message to improve maintainability and make it easier for other developers to understand its purpose.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- libs/application/templates/inheritance-report/src/forms/prerequisites.ts (2 hunks)
- libs/application/templates/inheritance-report/src/lib/messages.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- libs/application/templates/inheritance-report/src/forms/prerequisites.ts
Additional context used
Path-based instructions (1)
libs/application/templates/inheritance-report/src/lib/messages.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Checklist:
Summary by CodeRabbit
New Features
Improvements
Deprecations