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(dl-duplicate): cleaup and touchups for old application #17604

Merged
merged 7 commits into from
Jan 24, 2025

Conversation

albinagu
Copy link
Member

@albinagu albinagu commented Jan 22, 2025

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

  • Removals

    • Deleted several components: Alert, Cards, NotFilledOut
    • Removed localization-related imports and formatting functions
  • Form Structure Changes

    • Reordered application sections
    • Added new sectionSignatureAndPhoto
    • Simplified form fields and descriptions
    • Updated applicant information section
  • Styling Updates

    • Adjusted margins and text hierarchies
    • Removed unnecessary description fields
    • Streamlined component rendering
  • New Features

    • Added new section for signature and photo requirements
    • Enhanced form with more concise information display

@albinagu albinagu added the deploy-feature Deploys features to dev label Jan 22, 2025
Copy link
Contributor

coderabbitai bot commented Jan 22, 2025

Walkthrough

This pull request involves significant refactoring of the driving license duplicate application template. The changes include removing several components like Alert, Cards, and NotFilledOut, modifying form sections, and restructuring the application flow. Key modifications involve simplifying localization handling, removing unnecessary description fields, and introducing a new sectionSignatureAndPhoto to streamline the application process. The overall goal appears to be improving code clarity and reducing complexity in the application's form structure.

Changes

File Change Summary
fields/Alert.tsx, fields/Cards/index.tsx, fields/NotFilledOut/index.tsx Components completely removed
fields/CurrentLicense.tsx Removed formatText import, simplified message formatting
fields/QualityPhoto/QualityPhoto.tsx Removed application prop, simplified alt text generation
fields/QualitySignature/QualitySignature.tsx Adjusted margin properties
fields/SubmitAndDecline/SubmitAndDecline.tsx Removed useLocale import
fields/index.ts Removed exports for Alert and Cards
forms/application.ts Reordered sections, added sectionSignatureAndPhoto
forms/applicationSections/sectionDelivery.ts Removed description field, updated title configuration
forms/applicationSections/sectionInformation.ts Significant restructuring of applicant information section
forms/applicationSections/sectionOverview.ts Removed complex fields, simplified structure
forms/applicationSections/sectionReasonForApplication.ts Consolidated description handling
forms/applicationSections/sectionSignatureAndPhoto.ts New section added for signature and photo requirements
forms/declined.ts Added new fields, updated alert mechanisms
lib/messages.ts Added new message for applicant title

Suggested labels

automerge

Suggested reviewers

  • jonnigs

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.56%. Comparing base (5deb71a) to head (f189472).
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17604   +/-   ##
=======================================
  Coverage   35.56%   35.56%           
=======================================
  Files        7033     7033           
  Lines      150538   150538           
  Branches    42975    42979    +4     
=======================================
  Hits        53545    53545           
  Misses      96993    96993           
Flag Coverage Δ
air-discount-scheme-backend 48.13% <ø> (ø)
air-discount-scheme-web 0.00% <ø> (ø)
api 3.33% <ø> (ø)
api-domains-air-discount-scheme 37.84% <ø> (ø)
api-domains-assets 26.71% <ø> (ø)
api-domains-auth-admin 48.49% <ø> (ø)
api-domains-communications 39.47% <ø> (ø)
api-domains-criminal-record 47.73% <ø> (ø)
api-domains-driving-license 44.74% <ø> (ø)
api-domains-education 31.03% <ø> (ø)
api-domains-health-insurance 35.09% <ø> (ø)
api-domains-mortgage-certificate 34.91% <ø> (ø)
api-domains-payment-schedule 41.98% <ø> (ø)
application-api-files 61.73% <ø> (ø)
application-core 75.68% <ø> (ø)
application-system-api 38.66% <ø> (ø)
application-template-api-modules 27.57% <ø> (+0.01%) ⬆️
application-templates-accident-notification 27.60% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 25.79% <ø> (ø)
application-templates-driving-license 18.15% <ø> (ø)
application-templates-estate 13.58% <ø> (ø)
application-templates-example-payment 24.66% <ø> (ø)
application-templates-financial-aid 14.99% <ø> (ø)
application-templates-general-petition 23.11% <ø> (ø)
application-templates-inheritance-report 6.59% <ø> (ø)
application-templates-marriage-conditions 14.80% <ø> (ø)
application-templates-mortgage-certificate 43.73% <ø> (ø)
application-templates-new-primary-school 20.62% <ø> (ø)
application-templates-parental-leave 29.99% <ø> (+0.07%) ⬆️
application-types 6.47% <ø> (ø)
application-ui-components 1.17% <ø> (ø)
application-ui-shell 21.99% <ø> (ø)
clients-charge-fjs-v2 28.88% <ø> (ø)
clients-driving-license 40.60% <ø> (ø)
clients-driving-license-book 43.69% <ø> (ø)
clients-financial-statements-inao 49.41% <ø> (ø)
clients-license-client 1.26% <ø> (ø)
clients-regulations 42.66% <ø> (ø)
clients-rsk-company-registry 31.18% <ø> (ø)
clients-rsk-personal-tax-return 38.32% <ø> (ø)
clients-smartsolutions 12.77% <ø> (ø)
clients-syslumenn 49.14% <ø> (ø)
clients-zendesk 49.64% <ø> (ø)
cms 0.38% <ø> (ø)
cms-translations 38.79% <ø> (ø)
dokobit-signing 61.48% <ø> (ø)
email-service 59.51% <ø> (ø)
feature-flags 90.24% <ø> (ø)
file-storage 45.10% <ø> (ø)
financial-aid-backend 51.35% <ø> (ø)
judicial-system-api 20.07% <ø> (ø)
judicial-system-audit-trail 68.36% <ø> (ø)
judicial-system-backend 55.79% <ø> (ø)
judicial-system-message 66.16% <ø> (ø)
judicial-system-message-handler 47.72% <ø> (ø)
judicial-system-scheduler 71.20% <ø> (ø)
judicial-system-web 27.97% <ø> (ø)
license-api 42.84% <ø> (-0.02%) ⬇️
nest-config 75.92% <ø> (ø)
nest-feature-flags 50.56% <ø> (ø)
nova-sms 60.77% <ø> (ø)
portals-admin-regulations-admin 1.80% <ø> (ø)
portals-core 19.60% <ø> (ø)
services-auth-admin-api 52.51% <ø> (ø)
services-auth-delegation-api 58.43% <ø> (-0.09%) ⬇️
services-auth-ids-api 52.49% <ø> (ø)
services-auth-public-api 49.35% <ø> (ø)
services-sessions 65.31% <ø> (+0.04%) ⬆️
services-university-gateway 49.42% <ø> (+0.05%) ⬆️
services-user-notification 46.50% <ø> (+0.04%) ⬆️
services-user-profile 56.91% <ø> (ø)
web 2.39% <ø> (ø)

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


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 5deb71a...f189472. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Jan 22, 2025

Datadog Report

All test runs 617a0fe 🔗

10 Total Test Services: 0 Failed, 10 Passed
🔻 Test Sessions change in coverage: 2 decreased, 2 increased, 195 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
air-discount-scheme-backend 0 0 0 63 0 28.8s N/A Link
air-discount-scheme-web 0 0 0 2 0 8.13s N/A Link
api 0 0 0 4 0 8.51s N/A Link
api-catalogue-services 0 0 0 23 0 10.3s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 21.24s N/A Link
api-domains-assets 0 0 0 3 0 13.62s N/A Link
api-domains-auth-admin 0 0 0 18 0 11.84s N/A Link
api-domains-communications 0 0 0 5 0 36.36s N/A Link
api-domains-criminal-record 0 0 0 5 0 10.89s N/A Link
api-domains-driving-license 0 0 0 23 0 47.95s N/A Link

🔻 Code Coverage Decreases vs Default Branch (2)

  • services-university-gateway - jest 45.21% (-0.03%) - Details
  • license-api - jest 34.11% (-0.02%) - Details

@datadog-island-is
Copy link

datadog-island-is bot commented Jan 23, 2025

Datadog Report

All test runs 0c55eb8 🔗

10 Total Test Services: 0 Failed, 10 Passed
🔻 Test Sessions change in coverage: 2 decreased, 1 increased (+0.02%), 183 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
air-discount-scheme-backend 0 0 0 63 0 36.21s N/A Link
air-discount-scheme-web 0 0 0 2 0 6.07s N/A Link
api 0 0 0 4 0 2.79s 1 no change Link
api-domains-air-discount-scheme 0 0 0 6 0 16.97s N/A Link
api-domains-assets 0 0 0 3 0 11.4s N/A Link
api-domains-auth-admin 0 0 0 18 0 10.84s N/A Link
api-domains-communications 0 0 0 5 0 35.1s 1 no change Link
api-domains-criminal-record 0 0 0 5 0 8.16s N/A Link
api-domains-driving-license 0 0 0 23 0 30.07s N/A Link
services-auth-delegation-api 0 0 0 270 0 3m 21.77s 1 decreased (-0.04%) Link

🔻 Code Coverage Decreases vs Default Branch (2)

  • application-templates-parental-leave - jest 34.97% (-0.09%) - Details
  • services-auth-delegation-api - jest 50.44% (-0.04%) - Details

@albinagu albinagu marked this pull request as ready for review January 24, 2025 14:32
@albinagu albinagu requested a review from a team as a code owner January 24, 2025 14:32
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

🧹 Nitpick comments (7)
libs/application/templates/driving-license-duplicate/src/forms/declined.ts (2)

54-72: Alert message for rejected photo is clear.
The condition checks for both real and fake data, which is clever. Consider referencing a small shared function if the logic repeats elsewhere.


73-91: Alert message for rejected signature is properly synchronized with photo logic.
The condition structure is similar to photo’s. Future refactor could unify repeated checks into a single helper.

libs/application/templates/driving-license-duplicate/src/fields/QualityPhoto/QualityPhoto.tsx (1)

36-36: Reduced top margin might affect layout spacing.

Double-check that the new marginTop={2} maintains visual consistency with the design.

libs/application/templates/driving-license-duplicate/src/fields/QualitySignature/QualitySignature.tsx (2)

26-26: Alt text references a photo for a signature.

Consider creating a dedicated message key (e.g., m.qualitySignatureAltText) for more accurate accessibility text.

- alt={formatMessage(m.qualityPhotoAltText)}
+ alt={formatMessage(m.qualitySignatureAltText)}

39-39: Check spacing after margin reduction.

Similarly to QualityPhoto, decreasing the top margin may impact the UI flow. Verify alignment with other elements on screen.

libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionSignatureAndPhoto.ts (1)

13-76: Constructing sectionSignatureAndPhoto
This new section is well-structured and modular, checking external data for signature/photo availability. Consider extracting repeated logic (e.g., condition checks) into a helper if it simplifies maintainability. Overall, it’s a solid addition.

libs/application/templates/driving-license-duplicate/src/lib/messages.ts (1)

76-80: Consider using a more descriptive description to improve clarity.
Though your message object is valid, making the description more specific could help maintainers quickly grasp the message's purpose.

-    description: 'Information title',
+    description: 'Title specifically for the applicant section'
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5deb71a and f189472.

📒 Files selected for processing (16)
  • libs/application/templates/driving-license-duplicate/src/fields/Alert.tsx (0 hunks)
  • libs/application/templates/driving-license-duplicate/src/fields/Cards/index.tsx (0 hunks)
  • libs/application/templates/driving-license-duplicate/src/fields/CurrentLicense.tsx (3 hunks)
  • libs/application/templates/driving-license-duplicate/src/fields/NotFilledOut/index.tsx (0 hunks)
  • libs/application/templates/driving-license-duplicate/src/fields/QualityPhoto/QualityPhoto.tsx (2 hunks)
  • libs/application/templates/driving-license-duplicate/src/fields/QualitySignature/QualitySignature.tsx (2 hunks)
  • libs/application/templates/driving-license-duplicate/src/fields/SubmitAndDecline/SubmitAndDecline.tsx (0 hunks)
  • libs/application/templates/driving-license-duplicate/src/fields/index.ts (0 hunks)
  • libs/application/templates/driving-license-duplicate/src/forms/application.ts (2 hunks)
  • libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionDelivery.ts (1 hunks)
  • libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionInformation.ts (2 hunks)
  • libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionOverview.ts (5 hunks)
  • libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionReasonForApplication.ts (1 hunks)
  • libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionSignatureAndPhoto.ts (1 hunks)
  • libs/application/templates/driving-license-duplicate/src/forms/declined.ts (2 hunks)
  • libs/application/templates/driving-license-duplicate/src/lib/messages.ts (1 hunks)
💤 Files with no reviewable changes (5)
  • libs/application/templates/driving-license-duplicate/src/fields/index.ts
  • libs/application/templates/driving-license-duplicate/src/fields/NotFilledOut/index.tsx
  • libs/application/templates/driving-license-duplicate/src/fields/SubmitAndDecline/SubmitAndDecline.tsx
  • libs/application/templates/driving-license-duplicate/src/fields/Cards/index.tsx
  • libs/application/templates/driving-license-duplicate/src/fields/Alert.tsx
🧰 Additional context used
📓 Path-based instructions (11)
libs/application/templates/driving-license-duplicate/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."
libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionDelivery.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/driving-license-duplicate/src/forms/applicationSections/sectionReasonForApplication.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/driving-license-duplicate/src/forms/applicationSections/sectionOverview.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/driving-license-duplicate/src/fields/CurrentLicense.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/driving-license-duplicate/src/forms/application.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/driving-license-duplicate/src/fields/QualitySignature/QualitySignature.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/driving-license-duplicate/src/fields/QualityPhoto/QualityPhoto.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/driving-license-duplicate/src/forms/applicationSections/sectionSignatureAndPhoto.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/driving-license-duplicate/src/forms/applicationSections/sectionInformation.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/driving-license-duplicate/src/forms/declined.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."
🔇 Additional comments (30)
libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionOverview.ts (7)

15-16: Imports look good.
No issues found with these imports, and they appear consistent with the rest of the file.


40-43: Ensure proper testing of the new custom field.
The newly added CurrentLicense custom field looks correct. Make sure to include a test to confirm it behaves as intended.


49-49: Title variant change to h4 is consistent.
This update aligns well with the new heading structure. Check that the UI design guidelines are respected in all breakpoints.


62-62: Heading level change appears fine.
Switching from a higher heading to 'h4' could adjust the visual hierarchy. Looks good as part of the form streamlining.


75-76: Description callback might need a fallback path.
When no matching district is found, the code defaults to an empty string. Confirm this safely handles all scenarios or consider showing an explanatory message if there's no valid district.


89-89: Spacing behavior is correct.
Using space: 'gutter' is an appropriate way to adjust vertical spacing in the form.


97-97: Heading variant consistency.
This final heading aligns with the earlier changes to 'h4'. Good for consistent visual hierarchy.

libs/application/templates/driving-license-duplicate/src/forms/declined.ts (8)

7-8: Alert and KeyValue fields import.
Adding these imports is appropriate to build form fields. Good job referencing the core library.


10-10: Checked new import for Application, Form, and FormModes.
All looks correct. These types align with the usage context for building forms.


16-17: Proper usage of external schema and format function.
Great to see the NationalRegistryUser type used for clarity and the formatNationalId for consistent national ID formatting.


32-37: Key-value field for applicant's name.
This is a straightforward addition. The data source from nationalRegistry.data is correct.


38-43: Key-value field for applicant's national ID.
By formatting the applicant's identifier, you keep the UI consistent with national standards. This is good practice.


45-45: Renamed custom field to 'currentLicense'.
The new identifier is more descriptive and aligns with the naming in other parts of the code.


52-52: Heading variant change to h4.
Consistent with the rest of the form’s headings. Keep an eye on any design requirements.


92-101: Spacing fields for layout.
These empty description fields help form spacing. Looks good for ensuring a clean user experience.

libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionReasonForApplication.ts (1)

16-16: Good approach consolidating the description property.

This change simplifies the form structure by removing the extra buildDescriptionField. It’s a neat improvement for readability and maintainability.

libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionDelivery.ts (1)

15-16: Streamlined description and title handling look good.

Eliminating a separate description field and unifying it within buildMultiField keeps the code more concise. Nicely done.

libs/application/templates/driving-license-duplicate/src/fields/QualityPhoto/QualityPhoto.tsx (1)

25-25: Switched to a simpler message format for the alt text.

Using formatMessage without the application prop is more consistent with the rest of the codebase. Good job keeping alt text clear.

libs/application/templates/driving-license-duplicate/src/forms/application.ts (3)

12-12: Add import for signature/photo section
The new import for sectionSignatureAndPhoto cleanly integrates the new form section. Nicely done!


32-32: Insert sectionSignatureAndPhoto in new sequence
Inserting the signature/photo section here appears logical for guiding the user flow.


34-34: Verify updated placement of sectionDelivery
Relocating the delivery section after sectionDigitalLicenseInfo should be double-checked for any references expecting the old order.

Here is an optional script to confirm references:

libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionInformation.ts (5)

21-21: Aligning multiField ID
The multiField now also uses 'applicantInformation'. Maintaining consistent naming is good practice.


27-31: Providing applicant descriptor
The new description field for the applicant clarifies the form content. Good improvement for user context.


36-36: Switching to readOnly
Replacing disabled with readOnly allows copying the pre-filled name while preserving data integrity. Excellent for usability.


47-47: Consistent readOnly usage
Applying readOnly to the national ID field for consistency is commendable.


17-17: Renaming the section ID
Changing from 'information' to 'applicantInformation' clarifies the purpose. Ensure no code references the old ID.

Here is an optional script to verify no stale references remain:

✅ Verification successful

Section ID change is safe to proceed
The change from 'information' to 'applicantInformation' has no impact on other code as the old ID is not referenced elsewhere in the driving license duplicate application.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
rg -A5 'information'

Length of output: 107764


Script:

#!/bin/bash
# Search for section ID declarations
ast-grep --pattern 'id: $value' -p 'value: /information/'

# Search for section references in form files
rg -g '**/*form*.{ts,tsx,js,jsx}' -B2 -A2 'id.*information'

# Search specifically in application section files
rg -g '**/applicationSections/*.{ts,tsx}' -B2 -A2 'information'

Length of output: 67797


Script:

#!/bin/bash
# Search in driving license duplicate application files
rg -g '**/driving-license-duplicate/**' -B2 -A2 'id.*information'

# Search for any references to this section ID
rg -g '**/driving-license-duplicate/**' -B2 -A2 'information'

Length of output: 13076

libs/application/templates/driving-license-duplicate/src/forms/applicationSections/sectionSignatureAndPhoto.ts (1)

1-13: New imports for signature and photo
These imports look correct and add the necessary building blocks for the new section.

libs/application/templates/driving-license-duplicate/src/fields/CurrentLicense.tsx (3)

5-5: Removing unused formatText
Using formatMessage directly is simpler and prevents redundant imports.


42-46: Heading adjustment
Changing from h3 to h4 and simplifying margins makes the layout more consistent with the design system.


110-110: Minor box reconfiguration
The updated closing <Box> usage appears consistent with the simplified structure, causing no functional issues.

@albinagu albinagu enabled auto-merge January 24, 2025 14:51
@albinagu albinagu added this pull request to the merge queue Jan 24, 2025
Merged via the queue into main with commit 4c54505 Jan 24, 2025
175 checks passed
@albinagu albinagu deleted the samrit_cleanup branch January 24, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-feature Deploys features to dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants