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(signature-collection): renaming templates to presidential specific #15328

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

albinagu
Copy link
Member

@albinagu albinagu commented Jun 24, 2024

As we will now be working on adding Parliamentary elections, renaming current templates to Presidential specific

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

  • Refactor
    • Renamed "Signature List" to "Presidential List" across the application.
    • Updated related paths, import statements, and project configurations.
    • Removed feature flag references related to "Signature List".

Copy link
Contributor

coderabbitai bot commented Jun 24, 2024

Walkthrough

The recent updates primarily focus on renaming various parts of the project related to the "Signature List" functionalities to "Presidential List." This involves changing import paths, enum values, type names, project configurations, and documentation. The changes aim to reflect a shift in the terminology used to better describe the application's features, ensuring consistency and clarity.

Changes

File(s) Change Summary
libs/.../emailGenerators/applicationSubmitted.ts Updated import path for CreateListSchema from signature-list-creation to presidential-list-creation.
libs/.../signature-list-creation.service.ts, libs/.../signature-list-signing.service.ts Changed import paths for errorMessages and updated super() calls to use new ApplicationTypes values for creation and signing services.
libs/application/template-loader/src/lib/templateLoaders.ts Renamed template types from SIGNATURE_LIST_CREATION to PRESIDENTIAL_LIST_CREATION and SIGNATURE_LIST_SIGNING to PRESIDENTIAL_LIST_SIGNING.
libs/application/templates/signature-collection/README.md Updated terminology from "Signature List" to "Presidential List" and "Parliamentary List."
libs/.../presidential-list-creation/README.md, libs/.../presidential-list-signing/README.md Generated library documentation with instructions for running unit tests using Jest.
libs/.../presidential-list-creation/jest.config.ts, libs/.../presidential-list-signing/jest.config.ts Renamed displayName and updated coverage directory paths to use presidential-list-creation and presidential-list-signing.
libs/.../project.json Renamed projects and updated paths for presidential-list-creation and presidential-list-signing.
libs/.../signature-list-creation/src/forms/Draft.ts, libs/.../signature-list-creation/src/forms/Done.ts Renamed form ID to PresidentialListCreationDraft and removed coreMessages import.
libs/.../CreateListTemplate.ts, libs/.../SignListTemplate.ts Updated ApplicationTypes enum values and removed featureFlag for signatureListCreation.
libs/application/types/src/lib/ApplicationTypes.ts Renamed SIGNATURE_LIST_CREATION to PRESIDENTIAL_LIST_CREATION and SIGNATURE_LIST_SIGNING to PRESIDENTIAL_LIST_SIGNING in ApplicationTypes enum.
libs/application/types/src/lib/InstitutionMapper.ts Updated institutionMapper keys for list creation and signing functionalities.
tsconfig.base.json Renamed modules in signature-collection directory from signature-list-creation and signature-list-signing to presidential-list-creation and presidential-list-signing.

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

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 37.03%. Comparing base (f7b065e) to head (4bef789).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #15328      +/-   ##
==========================================
- Coverage   37.04%   37.03%   -0.01%     
==========================================
  Files        6539     6539              
  Lines      133085   133082       -3     
  Branches    38119    38119              
==========================================
- Hits        49296    49293       -3     
  Misses      83789    83789              
Flag Coverage Δ
air-discount-scheme-backend 53.99% <ø> (-0.02%) ⬇️
air-discount-scheme-web 0.00% <ø> (ø)
api 3.44% <ø> (ø)
api-catalogue-services 77.85% <ø> (ø)
api-domains-air-discount-scheme 36.79% <ø> (-0.04%) ⬇️
api-domains-assets 26.71% <ø> (ø)
api-domains-auth-admin 54.29% <ø> (ø)
api-domains-communications 40.76% <ø> (-0.01%) ⬇️
api-domains-criminal-record 47.89% <ø> (-0.04%) ⬇️
api-domains-driving-license 44.69% <ø> (-0.02%) ⬇️
api-domains-education 33.71% <ø> (-0.04%) ⬇️
api-domains-health-insurance 34.88% <ø> (-0.05%) ⬇️
api-domains-mortgage-certificate 35.32% <ø> (-0.04%) ⬇️
api-domains-payment-schedule 41.09% <ø> (-0.03%) ⬇️
application-api-files 56.93% <100.00%> (ø)
application-core 71.65% <100.00%> (-0.26%) ⬇️
application-system-api 42.07% <75.00%> (-0.01%) ⬇️
application-templates-accident-notification 19.93% <ø> (ø)
application-templates-car-recycling 4.23% <ø> (ø)
application-templates-criminal-record 22.35% <ø> (ø)
application-templates-driving-license 15.89% <ø> (ø)
application-templates-estate 11.94% <ø> (ø)
application-templates-example-payment 21.01% <ø> (ø)
application-templates-financial-aid 12.14% <ø> (ø)
application-templates-general-petition 19.05% <ø> (ø)
application-templates-health-insurance 23.46% <ø> (ø)
application-templates-inheritance-report 4.65% <ø> (ø)
application-templates-marriage-conditions 10.56% <ø> (ø)
application-templates-parental-leave 28.46% <ø> (ø)
application-types 7.28% <0.00%> (ø)
application-ui-components 1.43% <ø> (ø)
application-ui-shell 21.62% <ø> (ø)
auth-admin-web 2.43% <ø> (ø)
auth-api-lib 14.69% <ø> (-0.02%) ⬇️
auth-nest-tools 30.44% <ø> (ø)
auth-react 23.09% <ø> (ø)
auth-shared 75.00% <ø> (ø)
clients-charge-fjs-v2 27.54% <ø> (ø)
clients-driving-license 41.04% <ø> (-0.05%) ⬇️
clients-driving-license-book 44.05% <ø> (-0.03%) ⬇️
clients-financial-statements-inao 49.25% <ø> (-0.04%) ⬇️
clients-license-client 1.84% <ø> (ø)
clients-middlewares 73.24% <ø> (-0.09%) ⬇️
clients-regulations 42.82% <ø> (-0.05%) ⬇️
clients-rsk-company-registry 30.50% <ø> (+1.18%) ⬆️
clients-rsk-personal-tax-return 38.00% <ø> (ø)
clients-smartsolutions 12.77% <ø> (ø)
clients-syslumenn 49.63% <ø> (+0.36%) ⬆️
clients-zendesk 55.26% <ø> (ø)
cms 0.44% <ø> (ø)
cms-translations 39.88% <ø> (-0.01%) ⬇️
content-search-index-manager 95.65% <ø> (ø)
content-search-toolkit 8.57% <ø> (ø)
contentful-apps 6.05% <ø> (ø)
dokobit-signing 62.22% <ø> (-0.10%) ⬇️
download-service 44.77% <ø> (-0.02%) ⬇️
email-service 61.42% <ø> (ø)
feature-flags 90.16% <ø> (-0.08%) ⬇️
file-storage 52.17% <ø> (-0.13%) ⬇️
financial-aid-shared 19.03% <ø> (ø)
icelandic-names-registry-backend 54.18% <ø> (ø)
infra-nest-server 48.33% <ø> (ø)
infra-tracing 43.24% <ø> (ø)
island-ui-core 28.92% <ø> (ø)
judicial-system-api 17.86% <ø> (ø)
judicial-system-audit-trail 67.84% <ø> (-0.09%) ⬇️
judicial-system-backend 56.16% <ø> (-0.01%) ⬇️
judicial-system-formatters 81.33% <ø> (ø)
judicial-system-message 66.06% <ø> (-0.07%) ⬇️
judicial-system-message-handler 66.36% <ø> (-0.04%) ⬇️
judicial-system-scheduler 58.04% <ø> (-0.12%) ⬇️
judicial-system-types 48.59% <ø> (ø)
license-api 43.35% <ø> (+0.06%) ⬆️
localization 10.15% <ø> (ø)
logging 48.43% <ø> (ø)
message-queue 68.39% <ø> (ø)
nest-audit 68.20% <ø> (ø)
nest-config 77.61% <ø> (-0.07%) ⬇️
nest-feature-flags 51.46% <ø> (-0.07%) ⬇️
nest-problem 46.08% <ø> (ø)
nest-sequelize 94.44% <ø> (ø)
nest-swagger 51.71% <ø> (ø)
nova-sms 63.41% <ø> (ø)
portals-admin-regulations-admin 2.04% <ø> (ø)
portals-core 16.34% <ø> (ø)
reference-backend 50.31% <ø> (ø)
regulations 16.78% <ø> (ø)
residence-history 85.00% <ø> (ø)
services-documents 60.96% <ø> (ø)
services-endorsements-api 55.45% <ø> (-0.02%) ⬇️
services-sessions 65.42% <ø> (+0.03%) ⬆️
services-university-gateway 48.59% <ø> (+0.01%) ⬆️
services-user-profile 62.33% <ø> (-0.09%) ⬇️
shared-components 27.95% <ø> (ø)
shared-form-fields 31.94% <ø> (ø)
shared-mocking 64.62% <ø> (ø)
shared-pii 92.85% <ø> (ø)
shared-problem 87.50% <ø> (ø)
shared-utils 29.87% <ø> (ø)
skilavottord-ws 23.78% <ø> (ø)
web 1.89% <ø> (ø)

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

Files Coverage Δ
...t-creation/emailGenerators/applicationSubmitted.ts 9.09% <ø> (ø)
...e-list-creation/signature-list-creation.service.ts 29.16% <100.00%> (ø)
...ure-list-signing/signature-list-signing.service.ts 15.51% <100.00%> (ø)
...sidential-list-creation/src/dataProviders/index.ts 100.00% <ø> (ø)
...collection/presidential-list-creation/src/index.ts 100.00% <ø> (ø)
...ential-list-creation/src/lib/CreateListTemplate.ts 45.00% <ø> (ø)
...on/presidential-list-creation/src/lib/constants.ts 100.00% <ø> (ø)
...n/presidential-list-creation/src/lib/dataSchema.ts 66.66% <ø> (ø)
...ction/presidential-list-creation/src/lib/errors.ts 100.00% <ø> (ø)
...ion/presidential-list-creation/src/lib/messages.ts 100.00% <ø> (ø)
... and 11 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 f7b065e...4bef789. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Jun 24, 2024

Datadog Report

All test runs d2c1ce1 🔗

101 Total Test Services: 0 Failed, 99 Passed
🔻 Test Sessions change in coverage: 17 decreased, 2 increased, 180 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 81 0 37.38s N/A Link
air-discount-scheme-web 0 0 0 2 0 10.65s N/A Link
api 0 0 0 4 0 4.51s N/A Link
api-catalogue-services 0 0 0 23 0 17.5s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 36.93s N/A Link
api-domains-assets 0 0 0 3 0 24.81s N/A Link
api-domains-auth-admin 0 0 0 18 0 11.94s N/A Link
api-domains-communications 0 0 0 5 0 43.77s N/A Link
api-domains-criminal-record 0 0 0 5 0 16.64s N/A Link
api-domains-driving-license 0 0 0 23 0 56.04s N/A Link

🔻 Code Coverage Decreases vs Default Branch (17)

This report shows up to 5 code coverage decreases.

  • file-storage - jest 55.71% (-0.13%) - Details
  • judicial-system-scheduler - jest 60.58% (-0.12%) - Details
  • judicial-system-audit-trail - jest 70.03% (-0.09%) - Details
  • dokobit-signing - jest 64.97% (-0.09%) - Details
  • nest-feature-flags - jest 57.3% (-0.07%) - Details

@albinagu albinagu marked this pull request as ready for review June 24, 2024 12:23
@albinagu albinagu requested review from a team as code owners June 24, 2024 12:23
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/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-signing/signature-list-signing.service.ts (1)

Line range hint 32-34: Consider removing the unnecessary else clause for cleaner code.

The else clause after a return statement in the previous branch is redundant and can be omitted to enhance code readability.

-    } else {
-      throw new TemplateApiError(errorMessages.submitFailure, 405)
-    }
+    throw new TemplateApiError(errorMessages.submitFailure, 405)
Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between da9333e and 1ef4324.

Files selected for processing (20)
  • libs/application/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-creation/emailGenerators/applicationSubmitted.ts (1 hunks)
  • libs/application/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-creation/signature-list-creation.service.ts (2 hunks)
  • libs/application/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-signing/signature-list-signing.service.ts (1 hunks)
  • libs/application/template-loader/src/lib/templateLoaders.ts (1 hunks)
  • libs/application/templates/signature-collection/README.md (1 hunks)
  • libs/application/templates/signature-collection/presidential-list-creation/README.md (1 hunks)
  • libs/application/templates/signature-collection/presidential-list-creation/jest.config.ts (2 hunks)
  • libs/application/templates/signature-collection/presidential-list-creation/project.json (2 hunks)
  • libs/application/templates/signature-collection/presidential-list-creation/src/forms/Draft.ts (1 hunks)
  • libs/application/templates/signature-collection/presidential-list-creation/src/lib/CreateListTemplate.ts (2 hunks)
  • libs/application/templates/signature-collection/presidential-list-creation/src/lib/dataSchema.ts (1 hunks)
  • libs/application/templates/signature-collection/presidential-list-signing/README.md (1 hunks)
  • libs/application/templates/signature-collection/presidential-list-signing/jest.config.ts (2 hunks)
  • libs/application/templates/signature-collection/presidential-list-signing/project.json (2 hunks)
  • libs/application/templates/signature-collection/presidential-list-signing/src/lib/SignListTemplate.ts (2 hunks)
  • libs/application/templates/signature-collection/presidential-list-signing/src/lib/dataSchema.ts (1 hunks)
  • libs/application/types/src/lib/ApplicationTypes.ts (2 hunks)
  • libs/application/types/src/lib/InstitutionMapper.ts (1 hunks)
  • libs/feature-flags/src/lib/features.ts (1 hunks)
  • tsconfig.base.json (1 hunks)
Files skipped from review due to trivial changes (7)
  • libs/application/templates/signature-collection/presidential-list-creation/README.md
  • libs/application/templates/signature-collection/presidential-list-creation/src/lib/dataSchema.ts
  • libs/application/templates/signature-collection/presidential-list-signing/README.md
  • libs/application/templates/signature-collection/presidential-list-signing/jest.config.ts
  • libs/application/templates/signature-collection/presidential-list-signing/src/lib/dataSchema.ts
  • libs/application/types/src/lib/ApplicationTypes.ts
  • libs/feature-flags/src/lib/features.ts
Additional context used
Path-based instructions (12)
libs/application/templates/signature-collection/README.md (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/signature-collection/presidential-list-creation/jest.config.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/signature-collection/presidential-list-signing/project.json (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/signature-collection/presidential-list-creation/project.json (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/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-creation/emailGenerators/applicationSubmitted.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/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-creation/signature-list-creation.service.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/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-signing/signature-list-signing.service.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/signature-collection/presidential-list-creation/src/lib/CreateListTemplate.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/signature-collection/presidential-list-signing/src/lib/SignListTemplate.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/signature-collection/presidential-list-creation/src/forms/Draft.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/template-loader/src/lib/templateLoaders.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/types/src/lib/InstitutionMapper.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/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-creation/signature-list-creation.service.ts

[error] 25-25: Decorators are not valid here. (parse)

Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting the unsafeParameterDecoratorsEnabled option to true in your configuration file.

libs/application/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-signing/signature-list-signing.service.ts

[error] 32-34: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.

Additional comments not posted (17)
libs/application/templates/signature-collection/README.md (1)

5-9: Updated documentation to reflect new terminology.

The changes correctly update the terminology from "Signature List" to "Presidential List" and introduce "Parliamentary List". This aligns with the PR's objectives to prepare for the addition of Parliamentary elections.

libs/application/templates/signature-collection/presidential-list-creation/jest.config.ts (2)

3-3: Updated displayName for Jest configuration.

The displayName has been updated to match the new naming convention for the presidential list creation. This is a necessary change to keep the test configurations aligned with the project structure.


12-12: Updated coverage directory path.

The coverageDirectory path has been correctly updated to reflect the new directory structure. This ensures that code coverage metrics are stored in the correct location.

libs/application/templates/signature-collection/presidential-list-signing/project.json (1)

2-2: Updated project configuration to reflect new naming convention.

The project configuration has been thoroughly updated to reflect the renaming from "signature-list-signing" to "presidential-list-signing". This includes updates to the project name, source root, lint patterns, coverage directory, Jest configuration, and localization command. These changes are crucial for maintaining the integrity of the build and test environments following the renaming.

Also applies to: 4-4, 13-13, 20-20, 23-23, 30-30

libs/application/templates/signature-collection/presidential-list-creation/project.json (1)

2-2: Updated project configuration to reflect new naming convention.

Like the previous file, this project configuration has been correctly updated to reflect the renaming from "signature-list-creation" to "presidential-list-creation". The updates include the project name, source root, lint patterns, coverage directory, Jest configuration, and localization command. These updates ensure that the project configuration remains consistent and functional with the new directory structure.

Also applies to: 4-4, 13-13, 20-20, 23-23, 30-30

libs/application/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-creation/emailGenerators/applicationSubmitted.ts (2)

2-2: Import path is correctly updated to reflect the new structure.

The change aligns with the PR's objective to rename components related to presidential elections.


5-5: Function implementation is well-structured and clear.

The function generateApplicationSubmittedEmail correctly handles the email generation based on the application data. The use of modern JavaScript features like destructuring and template literals enhances readability and maintainability.

Also applies to: 8-32

libs/application/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-creation/signature-list-creation.service.ts (2)

16-16: Import path is correctly updated to reflect the new structure.

The change aligns with the PR's objective to rename components related to presidential elections.


29-29: Constructor correctly updated to use the new application type.

This change is necessary to align with the renaming in the application types, ensuring that the service operates under the correct context.

libs/application/template-api-modules/src/lib/modules/templates/signature-collection/signature-list-signing/signature-list-signing.service.ts (2)

10-10: Import path is correctly updated to reflect the new structure.

The change aligns with the PR's objective to rename components related to presidential elections.


18-18: Constructor correctly updated to use the new application type.

This change is necessary to align with the renaming in the application types, ensuring that the service operates under the correct context.

libs/application/templates/signature-collection/presidential-list-creation/src/lib/CreateListTemplate.ts (1)

31-31: Template configuration correctly updated to use the new application type.

This change is necessary to align with the renaming in the application types, ensuring that the template operates under the correct context.

libs/application/templates/signature-collection/presidential-list-signing/src/lib/SignListTemplate.ts (1)

31-31: Updated application type to match the new template name.

The change from SIGNATURE_LIST_SIGNING to PRESIDENTIAL_LIST_SIGNING aligns with the PR's objective to rename templates specific to Presidential elections. This ensures consistency across the application's configuration and its usage.

libs/application/templates/signature-collection/presidential-list-creation/src/forms/Draft.ts (1)

22-22: Updated form ID to reflect the new template name.

Renaming the form ID from SignatureListCreationDraft to PresidentialListCreationDraft is consistent with the renaming strategy of the application. This change is crucial for maintaining the integrity of form references throughout the application lifecycle.

libs/application/template-loader/src/lib/templateLoaders.ts (1)

132-138: Template import paths updated to reflect new structure.

The update of template import paths from signature-collection/signature-list-creation and signature-list-signing to presidential-list-creation and presidential-list-signing ensures that the application correctly loads the new templates. This is essential for the application to function with the updated template names and paths.

libs/application/types/src/lib/InstitutionMapper.ts (1)

210-214: Updated application types in Institution Mapper.

The mapping of PRESIDENTIAL_LIST_CREATION and PRESIDENTIAL_LIST_SIGNING to their respective institution details is correctly updated. This ensures that the application can accurately retrieve institution details based on the new application types.
[APROVED]

tsconfig.base.json (1)

481-482: Path updates align with renaming strategy

The changes in the module paths correctly reflect the renaming from "signature-list" to "presidential-list" for both creation and signing components. Ensure that the new paths accurately point to the existing directories or files in the project.

Also applies to: 484-485

Verification successful

Path updates align with renaming strategy

The changes in the module paths correctly reflect the renaming from "signature-list" to "presidential-list" for both creation and signing components. The verification confirms that the new paths accurately point to the existing directories and files in the project.

  • libs/application/templates/signature-collection/presidential-list-creation/src/index.ts
  • libs/application/templates/signature-collection/presidential-list-signing/src/index.ts
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the existence of the new paths in the tsconfig.

# Check if the directories exist.
if [ -d "libs/application/templates/signature-collection/presidential-list-creation/src" ] && [ -d "libs/application/templates/signature-collection/presidential-list-signing/src" ]; then
  echo "Directories exist."
else
  echo "One or both directories do not exist."
fi

Length of output: 229



Script:

#!/bin/bash
# Description: Verify the existence of the specific files in the new paths in the tsconfig.

# Check if the specific files exist.
if [ -f "libs/application/templates/signature-collection/presidential-list-creation/src/index.ts" ] && [ -f "libs/application/templates/signature-collection/presidential-list-signing/src/index.ts" ]; then
  echo "Files exist."
else
  echo "One or both files do not exist."
fi

Length of output: 235

Copy link
Member

@jonnigs jonnigs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@baering baering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core files LGTM.

@albinagu albinagu added the automerge Merge this PR as soon as all checks pass label Jun 24, 2024
@kodiakhq kodiakhq bot removed the automerge Merge this PR as soon as all checks pass label Jun 24, 2024
Copy link
Contributor

kodiakhq bot commented Jun 24, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

@albinagu albinagu added skip-nx-cache Skip NX's cache in a pull request and removed skip-nx-cache Skip NX's cache in a pull request labels Jun 24, 2024
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: 1

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1ef4324 and 443ee14.

Files selected for processing (6)
  • libs/application/template-loader/src/lib/templateLoaders.ts (1 hunks)
  • libs/application/templates/signature-collection/presidential-list-creation/src/forms/Done.ts (1 hunks)
  • libs/application/templates/signature-collection/presidential-list-signing/src/lib/SignListTemplate.ts (2 hunks)
  • libs/application/types/src/lib/ApplicationTypes.ts (2 hunks)
  • libs/application/types/src/lib/InstitutionMapper.ts (1 hunks)
  • tsconfig.base.json (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • libs/application/template-loader/src/lib/templateLoaders.ts
  • libs/application/types/src/lib/ApplicationTypes.ts
  • libs/application/types/src/lib/InstitutionMapper.ts
  • tsconfig.base.json
Additional context used
Path-based instructions (2)
libs/application/templates/signature-collection/presidential-list-creation/src/forms/Done.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/signature-collection/presidential-list-signing/src/lib/SignListTemplate.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."
GitHub Check: prepare
libs/application/templates/signature-collection/presidential-list-signing/src/lib/SignListTemplate.ts

[failure] 28-28:
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ ExampleForm: { slug: string; translation: string; }; Passport: { slug: string; translation: string; }; PassportAnnulment: { slug: string; translation: string; }; DrivingLearnersPermit: { slug: string; translation: string; }; ... 66 more ...; NewPrimarySchool: { ...; }; }'.


[failure] 28-28:
Property 'SIGNATURE_LIST_SIGNING' does not exist on type 'typeof ApplicationTypes'.


[failure] 28-28:
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ ExampleForm: { slug: string; translation: string; }; Passport: { slug: string; translation: string; }; PassportAnnulment: { slug: string; translation: string; }; DrivingLearnersPermit: { slug: string; translation: string; }; ... 66 more ...; NewPrimarySchool: { ...; }; }'.


[failure] 28-28:
Property 'SIGNATURE_LIST_SIGNING' does not exist on type 'typeof ApplicationTypes'.


[failure] 28-28:
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ ExampleForm: { slug: string; translation: string; }; Passport: { slug: string; translation: string; }; PassportAnnulment: { slug: string; translation: string; }; DrivingLearnersPermit: { slug: string; translation: string; }; ... 66 more ...; NewPrimarySchool: { ...; }; }'.


[failure] 28-28:
Property 'SIGNATURE_LIST_SIGNING' does not exist on type 'typeof ApplicationTypes'.


[failure] 28-28:
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ ExampleForm: { slug: string; translation: string; }; Passport: { slug: string; translation: string; }; PassportAnnulment: { slug: string; translation: string; }; DrivingLearnersPermit: { slug: string; translation: string; }; ... 66 more ...; NewPrimarySchool: { ...; }; }'.


[failure] 28-28:
Property 'SIGNATURE_LIST_SIGNING' does not exist on type 'typeof ApplicationTypes'.


[failure] 28-28:
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ ExampleForm: { slug: string; translation: string; }; Passport: { slug: string; translation: string; }; PassportAnnulment: { slug: string; translation: string; }; DrivingLearnersPermit: { slug: string; translation: string; }; ... 66 more ...; NewPrimarySchool: { ...; }; }'.


[failure] 28-28:
Property 'SIGNATURE_LIST_SIGNING' does not exist on type 'typeof ApplicationTypes'.

Additional comments not posted (3)
libs/application/templates/signature-collection/presidential-list-creation/src/forms/Done.ts (2)

Line range hint 1-1: Check for potential impact due to removal of coreMessages import.

The removal of coreMessages import from @island.is/application/core could potentially lead to issues if the messages are still referenced somewhere within this module or elsewhere in the application where this module's components are used.

#!/bin/bash
# Description: Check for references to `coreMessages` that might still exist in the application.

# Test: Search for `coreMessages` usage across the application.
rg 'coreMessages' --type ts

The coreMessages import was present in the initial commit of the Done.ts file and was removed later. To ensure that this removal does not affect the functionality, we need to verify if coreMessages was ever utilized within the file.

#!/bin/bash
# Description: Verify if `coreMessages` was used in the initial commit of the Done.ts file.

# Extract the initial commit hash for Done.ts
initial_commit_hash=$(git rev-list --max-parents=0 HEAD -- libs/application/templates/signature-collection/presidential-list-creation/src/forms/Done.ts)

# Show the content of Done.ts in the initial commit
git show $initial_commit_hash:libs/application/templates/signature-collection/presidential-list-creation/src/forms/Done.ts
libs/application/templates/signature-collection/presidential-list-signing/src/lib/SignListTemplate.ts (1)

35-35: Renamed ApplicationTypes usage to reflect new terminology.

The ApplicationTypes.SIGNATURE_LIST_SIGNING has been correctly updated to ApplicationTypes.PRESIDENTIAL_LIST_SIGNING in the configuration. This change aligns with the renaming objectives of the PR.

@albinagu albinagu added automerge Merge this PR as soon as all checks pass and removed automerge Merge this PR as soon as all checks pass labels Jun 24, 2024
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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 443ee14 and 4bef789.

Files selected for processing (1)
  • libs/application/templates/signature-collection/presidential-list-signing/src/lib/SignListTemplate.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • libs/application/templates/signature-collection/presidential-list-signing/src/lib/SignListTemplate.ts

@albinagu albinagu added the automerge Merge this PR as soon as all checks pass label Jun 25, 2024
@kodiakhq kodiakhq bot merged commit 0f98314 into main Jun 25, 2024
258 checks passed
@kodiakhq kodiakhq bot deleted the signature-collection-vol2 branch June 25, 2024 08:15
sigruntg pushed a commit that referenced this pull request Jun 27, 2024
#15328)

* fix(signature-collection): renaming templates to presidential specific

* minor tweaks

* chore: nx format:write update dirty files

* test commit

* build fix

---------

Co-authored-by: andes-it <builders@andes.is>
snaerseljan pushed a commit that referenced this pull request Jul 2, 2024
#15328)

* fix(signature-collection): renaming templates to presidential specific

* minor tweaks

* chore: nx format:write update dirty files

* test commit

* build fix

---------

Co-authored-by: andes-it <builders@andes.is>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants