-
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(estate): bug fix #15254
fix(estate): bug fix #15254
Conversation
WalkthroughThe changes modified conditional rendering and input handling in several components across different files. Specifically, the "required" property of a field now depends on its initial value, property number handling in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AdditionalEstateMember
participant RealEstateNumberField
participant Helpers
User->>+AdditionalEstateMember: Interact with form
AdditionalEstateMember-->>-User: Render field based on `initial` value
User->>+RealEstateNumberField: Input property number
RealEstateNumberField-->>RealEstateNumberField: Check if `readOnly`
alt readOnly is false
RealEstateNumberField->>Helpers: Validate property number
Helpers-->>RealEstateNumberField: Return validation result
end
RealEstateNumberField-->>-User: Display validation message
User->>+Helpers: Validate string input
Helpers-->>-User: Return validation result
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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 (3)
libs/application/templates/inheritance-report/src/lib/utils/helpers.ts (1)
Line range hint
127-127
: Consider using optional chaining to simplify null checks.- application?.answers && - getValueViaPath(application.answers, 'customShare.deceasedHadAssets') === YES + getValueViaPath(application?.answers, 'customShare.deceasedHadAssets') === YESlibs/application/templates/estate/src/fields/EstateMembersRepeater/AdditionalEstateMember.tsx (1)
Line range hint
1-200
: Ensure reusability and adherence to TypeScript best practices across NextJS applications.libs/application/templates/inheritance-report/src/fields/AssetsRepeater/index.tsx (1)
Line range hint
1-500
: Ensure effective tree-shaking and bundling practices are followed in the module.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- libs/application/templates/estate/src/fields/EstateMembersRepeater/AdditionalEstateMember.tsx (1 hunks)
- libs/application/templates/inheritance-report/src/fields/AssetsRepeater/index.tsx (1 hunks)
- libs/application/templates/inheritance-report/src/lib/utils/helpers.ts (1 hunks)
Additional context used
Path-based instructions (3)
libs/application/templates/inheritance-report/src/lib/utils/helpers.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/estate/src/fields/EstateMembersRepeater/AdditionalEstateMember.tsx (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/fields/AssetsRepeater/index.tsx (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/utils/helpers.ts
[error] 127-127: Change to an optional chain. (lint/complexity/useOptionalChain)
Unsafe fix: Change to an optional chain.
Additional comments not posted (3)
libs/application/templates/inheritance-report/src/lib/utils/helpers.ts (1)
24-26
: Explicit return statement added for clarity and consistency.libs/application/templates/estate/src/fields/EstateMembersRepeater/AdditionalEstateMember.tsx (1)
184-184
: Conditional rendering of therequired
property based onfield.initial
enhances form flexibility.libs/application/templates/inheritance-report/src/fields/AssetsRepeater/index.tsx (1)
416-440
: Conditional processing ofpropertyNumber
based onreadOnly
state enhances form control and prevents unnecessary operations.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15254 +/- ##
=======================================
Coverage 37.10% 37.11%
=======================================
Files 6448 6448
Lines 131455 131444 -11
Branches 37574 37570 -4
=======================================
- Hits 48781 48779 -2
+ Misses 82674 82665 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Checklist:
Summary by CodeRabbit