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): sc fixes 16.10 #16428

Merged
merged 5 commits into from
Oct 16, 2024
Merged

fix(signature-collection): sc fixes 16.10 #16428

merged 5 commits into from
Oct 16, 2024

Conversation

albinagu
Copy link
Member

@albinagu albinagu commented Oct 16, 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

    • Enhanced clarity in the Draft form by separating constituency and list names in the action cards.
    • Introduced an optional eyebrow property for action card details.
  • Bug Fixes

    • Removed the "managers and supervisors" section from the Prerequisites form, streamlining the user experience.
  • Documentation

    • Updated message definitions to reflect the removal of management-related messages, simplifying the message structure.

@albinagu albinagu requested review from a team as code owners October 16, 2024 13:28
Copy link
Contributor

coderabbitai bot commented Oct 16, 2024

Walkthrough

The pull request introduces several modifications across multiple files related to form configurations and message definitions. In the Draft.ts file, changes are made to the structure of action cards, specifically altering how constituency and list names are displayed. The Prerequisites.ts file sees the removal of a section for managers and supervisors. Additionally, the messages.ts file has several message definitions removed, and the Fields.ts file updates the ApplicationActionCardProps type to include a new optional property and modifications to existing properties.

Changes

File Change Summary
libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Draft.ts Modified the structure of action cards by separating constituency and list names in the heading and eyebrow properties.
libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Prerequisites.ts Removed the "managers and supervisors" section (ID: screen5) from the form configuration, retaining other sections intact.
libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts Deleted multiple message definitions related to managers and supervisors, simplifying the message structure.
libs/application/types/src/lib/Fields.ts Updated the ApplicationActionCardProps type by adding an optional eyebrow property and modifying types for tag, cta, and unavailable properties.

Possibly related PRs

Suggested labels

automerge

Suggested reviewers

  • kksteini

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 52643e1 and 45a1fbd.

📒 Files selected for processing (1)
  • libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts

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 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.

@albinagu albinagu changed the title Sc fixes 16.10 1 fix(signature-collection): sc fixes 16.10 Oct 16, 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

🧹 Outside diff range and nitpick comments (2)
libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Draft.ts (1)

280-290: Adherence to coding guidelines for library files.

The changes comply with the coding guidelines for libs/**/*:

  1. They don't affect the reusability of components and hooks across different NextJS apps.
  2. TypeScript usage for defining props and exporting types remains unchanged.
  3. The modifications don't impact effective tree-shaking and bundling practices.

Consider documenting how this change in the action card structure might affect the reusability of this component across different NextJS apps. If this is a common pattern, you might want to extract it into a shared utility function for consistency and easier maintenance.

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

Line range hint 566-576: LGTM! Consider adding JSDoc comments for better documentation.

The changes to ApplicationActionCardProps type enhance its flexibility and consistency. The new eyebrow property and the modifications to tag, cta, and unavailable properties improve the component's reusability across different NextJS apps.

To further improve the code:

Consider adding JSDoc comments to describe the purpose and usage of the new and modified properties. This will enhance code documentation and make it easier for other developers to understand and use the type correctly. For example:

export type ApplicationActionCardProps = Modify<
  ActionCardProps,
  {
    /** Text to display above the heading */
    eyebrow?: string
    heading?: FormText
    text?: FormText
    tag?: Modify<ActionCardProps['tag'], { label: FormText }>
    cta?: Modify<ActionCardProps['cta'], { label: FormText }>
    unavailable?: Modify<
      ActionCardProps['unavailable'],
      { label?: FormText; message?: FormText }
    >
  }
>
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f7773d8 and 52643e1.

📒 Files selected for processing (4)
  • libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Draft.ts (1 hunks)
  • libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Prerequisites.ts (0 hunks)
  • libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts (0 hunks)
  • libs/application/types/src/lib/Fields.ts (1 hunks)
💤 Files with no reviewable changes (2)
  • libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Prerequisites.ts
  • libs/application/templates/signature-collection/parliamentary-list-creation/src/lib/messages.ts
🧰 Additional context used
📓 Path-based instructions (2)
libs/application/templates/signature-collection/parliamentary-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/types/src/lib/Fields.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 (1)
libs/application/templates/signature-collection/parliamentary-list-creation/src/forms/Draft.ts (1)

280-290: Improved clarity in action card display.

The changes enhance the presentation of constituency and list information:

  1. Constituency name is now used as the heading, improving readability.
  2. List name is moved to the new eyebrow property, providing a clear hierarchy of information.

These modifications align with good UI practices by distinctly presenting related pieces of information.

Please ensure this change maintains consistency with how constituency and list information is displayed elsewhere in the application. Run the following script to check for similar patterns:

If the results show inconsistencies, consider updating other occurrences for a uniform user experience.

✅ Verification successful

Consistency Verified in Action Card Display.

The verification confirms that the changes to the heading and eyebrow properties are consistent across the codebase. No additional instances were found that deviate from the implemented changes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar patterns of constituency and list name usage
rg --type typescript 'heading:.*constituency.*name' libs
rg --type typescript 'eyebrow:.*list.*name' libs

Length of output: 179


Script:

#!/bin/bash
# Search for similar patterns of constituency and list name usage in .ts and .tsx files
rg 'heading:.*constituency.*name' libs --glob '*.ts' --glob '*.tsx'
rg 'eyebrow:.*list.*name' libs --glob '*.ts' --glob '*.tsx'

Length of output: 294

@datadog-island-is
Copy link

datadog-island-is bot commented Oct 16, 2024

Datadog Report

All test runs 66285cb 🔗

21 Total Test Services: 0 Failed, 20 Passed
➡️ Test Sessions change in coverage: 92 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-web 0 0 0 2 0 7.49s 1 no change Link
api 0 0 0 4 0 2.8s 1 no change Link
application-api-files 0 0 0 12 0 5.29s 1 no change Link
application-core 0 0 0 92 0 17.9s 1 no change Link
application-system-api 0 0 0 120 2 3m 34.99s 1 no change Link
application-template-api-modules 0 0 0 123 0 2m 12.4s 1 no change Link
application-templates-accident-notification 0 0 0 148 0 21.75s 1 no change Link
application-templates-criminal-record 0 0 0 2 0 13.36s 1 no change Link
application-templates-driving-license 0 0 0 13 0 20.25s 1 no change Link
application-templates-example-payment 0 0 0 2 0 14.12s 1 no change Link

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.73%. Comparing base (525e166) to head (2f12fd9).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16428   +/-   ##
=======================================
  Coverage   36.72%   36.73%           
=======================================
  Files        6809     6809           
  Lines      141165   141135   -30     
  Branches    40245    40242    -3     
=======================================
- Hits        51844    51839    -5     
+ Misses      89321    89296   -25     
Flag Coverage Δ
air-discount-scheme-web 0.00% <ø> (ø)
api 3.37% <ø> (ø)
application-api-files 58.02% <ø> (ø)
application-core 71.53% <ø> (ø)
application-system-api 41.40% <ø> (-0.01%) ⬇️
application-template-api-modules 27.89% <ø> (+0.01%) ⬆️
application-templates-accident-notification 29.29% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 26.35% <ø> (ø)
application-templates-driving-license 18.29% <ø> (ø)
application-templates-estate 12.31% <ø> (ø)
application-templates-example-payment 25.14% <ø> (ø)
application-templates-financial-aid 14.27% <ø> (ø)
application-templates-general-petition 23.43% <ø> (ø)
application-templates-inheritance-report 6.43% <ø> (ø)
application-templates-marriage-conditions 15.09% <ø> (ø)
application-templates-mortgage-certificate 43.78% <ø> (ø)
application-templates-parental-leave 29.97% <ø> (ø)
application-types 6.69% <ø> (ø)
application-ui-components 1.28% <ø> (ø)
application-ui-shell 21.35% <ø> (ø)
clients-charge-fjs-v2 24.11% <ø> (ø)
web 1.82% <ø> (ø)

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

Files with missing lines Coverage Δ
...on/parliamentary-list-creation/src/lib/messages.ts 100.00% <ø> (ø)
libs/application/types/src/lib/Fields.ts 100.00% <ø> (ø)

... and 3 files 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 525e166...2f12fd9. Read the comment docs.

@alexdiljar alexdiljar added the automerge Merge this PR as soon as all checks pass label Oct 16, 2024
@kksteini kksteini added the high priority VIP-Kodiak PR label Oct 16, 2024
@kodiakhq kodiakhq bot merged commit d356a2f into main Oct 16, 2024
85 checks passed
@kodiakhq kodiakhq bot deleted the sc_fixes_16.10_1 branch October 16, 2024 15:11
kksteini pushed a commit that referenced this pull request Oct 16, 2024
* fix(signature-collection): updating card

* cleanup

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
kodiakhq bot added a commit that referenced this pull request Oct 16, 2024
* fix(signature-colletion): remove candidate if all lists removed (#16425)

* fix: remove candidate if all lists removed

* fix: remove candidate if all lists removed make sure has candidate id

* chore: nx format:write update dirty files

* Update libs/clients/signature-collection/src/lib/signature-collection.service.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* fix(signature-collections): fixes 16.10 (#16423)

* fix(signature-collections): fixes 16.10

* tweak

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* fix(signature-collection): sc fixes 16.10 (#16428)

* fix(signature-collection): updating card

* cleanup

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

---------

Co-authored-by: Alex Diljar Birkisbur Hellsing <[email protected]>
Co-authored-by: andes-it <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: albinagu <[email protected]>
@coderabbitai coderabbitai bot mentioned this pull request Oct 29, 2024
6 tasks
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 high priority VIP-Kodiak PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants