operatorfabric-core
operatorfabric-core copied to clipboard
Remove keepChildCards deprecated feature (#6836)
Fix #6836
- In release notes :
- In chapter : Tasks
- Text : #6836 : Remove keepChildCards deprecated feature
Summary by CodeRabbit
-
New Features
- Introduced a more streamlined approach for managing child cards through the
actionsfield, replacing the deprecatedkeepChildCardsproperty. - Enhanced API documentation to reflect changes in card management operations.
- Introduced a more streamlined approach for managing child cards through the
-
Bug Fixes
- Updated logic in various components to ensure child card inclusion is based on actions rather than deprecated properties.
-
Documentation
- Improved clarity and usability of user card configuration documentation.
- Updated migration guide for version 4.5.0, detailing significant changes and deprecated fields.
-
Tests
- Refined test cases to align with the new logic for handling child cards and actions.
Walkthrough
The changes in this pull request primarily involve the removal of the keepChildCards property across multiple classes and files in the codebase. This property, which was previously used to indicate whether child cards should be retained, has been eliminated from various models, services, and documentation. The modifications also include updates to related logic, ensuring that the handling of card actions is streamlined, particularly by shifting the focus to an actions array that replaces the deprecated property.
Changes
| File Path | Change Summary |
|---|---|
| node-services/cards-external-diffusion/src/domain/application/card.ts | Removed property keepChildCards from Card class. |
| services/cards-consultation/src/main/java/org/opfab/cards/consultation/model/ArchivedCard.java | Removed field keepChildCards from ArchivedCard record and eliminated its constructor. |
| services/cards-consultation/src/main/java/org/opfab/cards/consultation/model/Card.java | Removed field keepChildCards from Card class. |
| services/cards-consultation/src/main/java/org/opfab/cards/consultation/repositories/ArchivedCardCustomRepositoryImpl.java | Updated comment in findByParentCard method for clarity regarding KEEP_CHILD_CARD action. |
| services/cards-publication/src/main/java/org/opfab/cards/publication/model/ArchivedCard.java | Removed field keepChildCards from ArchivedCard record and updated constructor. |
| services/cards-publication/src/main/java/org/opfab/cards/publication/model/Card.java | Removed field keepChildCards, along with its getter and setter methods from Card class. |
| services/cards-publication/src/main/java/org/opfab/cards/publication/model/LightCard.java | Removed field keepChildCards from LightCard record. |
| services/cards-publication/src/main/java/org/opfab/cards/publication/services/CardProcessingService.java | Updated methods to remove checks for keepChildCards. |
| services/cards-publication/src/main/modeling/swagger.yaml | Removed keepChildCards from Card definition and added actions property. |
| services/cards-publication/src/test/java/org/opfab/cards/publication/services/CardProcessServiceShould.java | Removed test method related to keepChildCards. |
| src/docs/asciidoc/reference_doc/user_cards.adoc | Updated documentation to replace keepChildCards with actions. |
| src/docs/asciidoc/resources/migration_guide_to_4.5.adoc | Added migration notes regarding the removal of keepChildCards. |
| src/test/api/karate/cards/cards.feature | Renamed scenario and removed references to keepChildCards. |
| src/test/api/karate/cards/userCards.feature | Updated scenarios to use actions instead of keepChildCards. |
| ui/main/src/app/business/model/card.model.ts | Removed keepChildCards from constructors of Card and CardForPublishing. |
| ui/main/src/app/business/model/light-card.model.ts | Removed keepChildCards from LightCard constructor. |
| ui/main/src/app/business/store/lightcards/lightcards-store.ts | Simplified logic in lightCardHasChildFromCurrentUserEntity method. |
| ui/main/src/app/business/view/userCard/cardBuilder/cardBuilder.spec.ts | Updated tests to focus on actions instead of keepChildCards. |
| ui/main/src/app/business/view/userCard/cardBuilder/cardBuilder.ts | Updated getCard method to check actions for KEEP_CHILD_CARDS. |
| ui/main/src/app/business/view/userCard/keepChildCardsForm/keepChildCardsForm.ts | Simplified logic for cardKeepChildCards based on actions. |
| ui/main/src/app/business/view/userCard/userCard.view.spec.ts | Updated tests to check for KEEP_CHILD_CARDS action instead of keepChildCard. |
| ui/main/src/app/business/view/userCard/userCard.view.ts | Simplified logic in getChildCardsForPreview method to check actions. |
| ui/main/src/tests/helpers.ts | Removed keepChildCards parameter from getOneLightCard and getOneCard functions. |
| client/cards/src/main/avro/card.avdl | Removed field keepChildCards from Card record in Avro IDL file. |
| client/cards/src/main/avro/responseCard.avdl | Removed field keepChildCards from ResponseCard record in Avro IDL file. |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
Remove keepChildCards deprecated feature (#6836) |
✅ | |
Add migration guide for removal of keepChildCards (#6836) |
✅ |
Possibly related PRs
- #7253: The changes in the main PR regarding the removal of the
keepChildCardsproperty in theCardclass are related to similar removals in theArchivedCardandCardclasses in thecards-consultationandcards-publicationmodules, indicating a broader refactor across the codebase to eliminate this property.
🐇 In the code, we made a change,
RemovingkeepChildCards, quite the range!
Now actions guide the way we play,
Simplifying logic, brightening the day.
Hopping through code, we leap and bound,
In our card world, new clarity found! 🌟
📜 Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL
📥 Commits
Files that changed from the base of the PR and between 21b1d621f2811d371960ca6588428c4a00ddb8e4 and cdfef3757cc1af304b634fe10d7dc3d7d7939ec0.
📒 Files selected for processing (25)
- client/cards/src/main/avro/card.avdl (0 hunks)
- client/cards/src/main/avro/responseCard.avdl (0 hunks)
- node-services/cards-external-diffusion/src/domain/application/card.ts (0 hunks)
- services/cards-consultation/src/main/java/org/opfab/cards/consultation/model/ArchivedCard.java (0 hunks)
- services/cards-consultation/src/main/java/org/opfab/cards/consultation/model/Card.java (0 hunks)
- services/cards-consultation/src/main/java/org/opfab/cards/consultation/repositories/ArchivedCardCustomRepositoryImpl.java (1 hunks)
- services/cards-publication/src/main/java/org/opfab/cards/publication/model/ArchivedCard.java (0 hunks)
- services/cards-publication/src/main/java/org/opfab/cards/publication/model/Card.java (0 hunks)
- services/cards-publication/src/main/java/org/opfab/cards/publication/model/LightCard.java (0 hunks)
- services/cards-publication/src/main/java/org/opfab/cards/publication/services/CardProcessingService.java (1 hunks)
- services/cards-publication/src/main/modeling/swagger.yaml (0 hunks)
- services/cards-publication/src/test/java/org/opfab/cards/publication/services/CardProcessServiceShould.java (0 hunks)
- src/docs/asciidoc/reference_doc/user_cards.adoc (0 hunks)
- src/docs/asciidoc/resources/migration_guide_to_4.5.adoc (1 hunks)
- src/test/api/karate/cards/cards.feature (2 hunks)
- src/test/api/karate/cards/userCards.feature (4 hunks)
- ui/main/src/app/business/model/card.model.ts (0 hunks)
- ui/main/src/app/business/model/light-card.model.ts (0 hunks)
- ui/main/src/app/business/store/lightcards/lightcards-store.ts (1 hunks)
- ui/main/src/app/business/view/userCard/cardBuilder/cardBuilder.spec.ts (2 hunks)
- ui/main/src/app/business/view/userCard/cardBuilder/cardBuilder.ts (1 hunks)
- ui/main/src/app/business/view/userCard/keepChildCardsForm/keepChildCardsForm.ts (1 hunks)
- ui/main/src/app/business/view/userCard/userCard.view.spec.ts (1 hunks)
- ui/main/src/app/business/view/userCard/userCard.view.ts (1 hunks)
- ui/main/src/tests/helpers.ts (0 hunks)
💤 Files with no reviewable changes (14)
- client/cards/src/main/avro/card.avdl
- client/cards/src/main/avro/responseCard.avdl
- node-services/cards-external-diffusion/src/domain/application/card.ts
- services/cards-consultation/src/main/java/org/opfab/cards/consultation/model/ArchivedCard.java
- services/cards-consultation/src/main/java/org/opfab/cards/consultation/model/Card.java
- services/cards-publication/src/main/java/org/opfab/cards/publication/model/ArchivedCard.java
- services/cards-publication/src/main/java/org/opfab/cards/publication/model/Card.java
- services/cards-publication/src/main/java/org/opfab/cards/publication/model/LightCard.java
- services/cards-publication/src/main/modeling/swagger.yaml
- services/cards-publication/src/test/java/org/opfab/cards/publication/services/CardProcessServiceShould.java
- src/docs/asciidoc/reference_doc/user_cards.adoc
- ui/main/src/app/business/model/card.model.ts
- ui/main/src/app/business/model/light-card.model.ts
- ui/main/src/tests/helpers.ts
🚧 Files skipped from review as they are similar to previous changes (11)
- services/cards-consultation/src/main/java/org/opfab/cards/consultation/repositories/ArchivedCardCustomRepositoryImpl.java
- services/cards-publication/src/main/java/org/opfab/cards/publication/services/CardProcessingService.java
- src/docs/asciidoc/resources/migration_guide_to_4.5.adoc
- src/test/api/karate/cards/cards.feature
- src/test/api/karate/cards/userCards.feature
- ui/main/src/app/business/store/lightcards/lightcards-store.ts
- ui/main/src/app/business/view/userCard/cardBuilder/cardBuilder.spec.ts
- ui/main/src/app/business/view/userCard/cardBuilder/cardBuilder.ts
- ui/main/src/app/business/view/userCard/keepChildCardsForm/keepChildCardsForm.ts
- ui/main/src/app/business/view/userCard/userCard.view.spec.ts
- ui/main/src/app/business/view/userCard/userCard.view.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?
🪧 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
84.0% Coverage on New Code
0.0% Duplication on New Code