Skip to content
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(inheritance-report): EFS fixes 6/06 #15132

Merged
merged 2 commits into from
Jun 6, 2024
Merged

fix(inheritance-report): EFS fixes 6/06 #15132

merged 2 commits into from
Jun 6, 2024

Conversation

albinagu
Copy link
Member

@albinagu albinagu commented Jun 6, 2024

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Added new fields for deceased assets and spouse share percentage in the inheritance report form.
    • Introduced new validation conditions for inheritance report data.
  • Improvements

    • Made the description field mandatory in the assets section.
    • Updated message identifiers for better clarity.

@albinagu albinagu requested a review from a team as a code owner June 6, 2024 13:59
Copy link
Contributor

coderabbitai bot commented Jun 6, 2024

Walkthrough

The recent changes focus on enhancing the inheritance report template by making the description field mandatory in the assets section, reordering and adding fields in the deceased section, refining validation conditions in the data schema, and updating message identifiers and adding a new message. These updates aim to improve the clarity and functionality of the form, ensuring accurate data collection and validation.

Changes

Files Change Summary
libs/application/templates/inheritance-report/src/forms/sections/assets.ts Marked the description field as required in the assets section.
libs/application/templates/inheritance-report/src/forms/sections/deceased.ts Reordered fields, removed a buildRadioField, and added new fields for deceased assets and spouse share percentage.
libs/application/templates/inheritance-report/src/lib/dataSchema.ts Added a new refinement condition to the inheritanceReportSchema for amount, exchangeRateOrInterest, and description.
libs/application/templates/inheritance-report/src/lib/messages.ts Modified id for stocksDescription message and added a new message deceasedSharePart.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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/dataSchema.ts (1)

Line range hint 529-529: Simplify the conditional expression by directly assigning the result without using a ternary operator.

- return nationalId !== '' ? true : false
+ return nationalId !== ''
Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 85c51cd and b73fb2b.

Files selected for processing (4)
  • libs/application/templates/inheritance-report/src/forms/sections/assets.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/forms/sections/deceased.ts (3 hunks)
  • libs/application/templates/inheritance-report/src/lib/dataSchema.ts (1 hunks)
  • libs/application/templates/inheritance-report/src/lib/messages.ts (2 hunks)
Additional context used
Path-based instructions (4)
libs/application/templates/inheritance-report/src/forms/sections/deceased.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/dataSchema.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/sections/assets.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/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."
Biome
libs/application/templates/inheritance-report/src/lib/dataSchema.ts

[error] 529-529: Unnecessary use of boolean literals in conditional expression. (lint/complexity/noUselessTernary)

Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with

Additional comments not posted (6)
libs/application/templates/inheritance-report/src/forms/sections/deceased.ts (2)

101-101: Reordering of options in buildRadioField for hasCustomSpouseSharePercentage enhances user experience by aligning with common patterns (No/Yes).


118-136: Addition of buildDescriptionField for spacing and re-addition of buildRadioField for deceasedHadAssets improves form structure and clarity.

libs/application/templates/inheritance-report/src/lib/dataSchema.ts (1)

273-282: The added refinement condition for amount, exchangeRateOrInterest, and description in stocks ensures that these fields meet specific criteria, enhancing data integrity.

libs/application/templates/inheritance-report/src/forms/sections/assets.ts (1)

501-501: Making the description field required in the stocks section ensures that all entries have a descriptive label, which is crucial for clarity and record-keeping.

libs/application/templates/inheritance-report/src/lib/messages.ts (2)

636-636: Change in message ID to include markdown suffix approved.

Ensure that markdown rendering is supported where this message is used.


1208-1212: Addition of deceasedSharePart message approved.

Verify the necessity of this message in the context of the application, ensuring it does not duplicate existing functionality.

@datadog-island-is
Copy link

datadog-island-is bot commented Jun 6, 2024

Datadog Report

All test runs f92159b 🔗

10 Total Test Services: 0 Failed, 10 Passed
🔻 Test Sessions change in coverage: 1 decreased (-0.02%), 26 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
api 0 0 0 4 0 4.92s 1 no change Link
application-system-api 0 0 0 111 2 3m 55.09s 1 decreased (-0.02%) Link
application-template-api-modules 0 0 0 109 0 2m 56.24s 1 no change Link
application-templates-financial-aid 0 0 0 11 0 39.14s 1 no change Link
application-templates-parental-leave 0 0 0 162 0 47s 1 no change Link
application-ui-shell 0 0 0 74 0 1m 5.58s 1 no change Link
financial-aid-backend 0 0 0 219 0 1m 32.96s 1 no change Link
financial-aid-shared 0 0 0 29 0 16.49s 1 no change Link
services-auth-personal-representative 0 0 0 59 0 1m 15.31s 1 no change Link
web 0 0 0 84 0 30.85s 1 no change Link

🔻 Code Coverage Decreases vs Default Branch (1)

  • application-system-api - jest 37.65% (-0.02%) - Details

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 37.05%. Comparing base (3a44dfe) to head (bf9c047).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #15132      +/-   ##
==========================================
- Coverage   37.06%   37.05%   -0.01%     
==========================================
  Files        6422     6422              
  Lines      130903   130936      +33     
  Branches    37406    37438      +32     
==========================================
+ Hits        48515    48517       +2     
- Misses      82388    82419      +31     
Flag Coverage Δ
api 3.44% <ø> (ø)
application-system-api 41.99% <ø> (-0.02%) ⬇️
application-template-api-modules 24.24% <ø> (-0.02%) ⬇️
application-templates-financial-aid 12.13% <ø> (ø)
application-templates-parental-leave 28.44% <ø> (ø)
application-ui-shell 21.78% <ø> (ø)
financial-aid-backend 56.34% <ø> (ø)
services-auth-personal-representative 48.50% <ø> (ø)
web 1.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...es/inheritance-report/src/forms/sections/assets.ts 0.00% <ø> (ø)
...n/templates/inheritance-report/src/lib/messages.ts 100.00% <ø> (ø)
.../inheritance-report/src/forms/sections/deceased.ts 0.00% <0.00%> (ø)
...templates/inheritance-report/src/lib/dataSchema.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4b8568...bf9c047. Read the comment docs.

@juni-haukur juni-haukur added the deprecated:automerge (Disabled) Merge this PR as soon as all checks pass label Jun 6, 2024
@kodiakhq kodiakhq bot merged commit 4eb7705 into main Jun 6, 2024
53 checks passed
@kodiakhq kodiakhq bot deleted the efs_fixes_6_6 branch June 6, 2024 15:27
sigruntg pushed a commit that referenced this pull request Jun 12, 2024
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
lodmfjord pushed a commit that referenced this pull request Jun 14, 2024
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated:automerge (Disabled) Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants