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

HCMPRE-1766: App Configuration Screen Setup #2117

Merged
merged 7 commits into from
Jan 8, 2025
Merged

Conversation

nabeelmd-eGov
Copy link
Contributor

@nabeelmd-eGov nabeelmd-eGov commented Jan 8, 2025

  • HCMPRE-1766: Added AppScreenConfiguration Feature screen
  • added enhancement in app configuration

Choose the appropriate template for your PR:

Feature PR

Feature Request

JIRA ID

Module

Description

Related Issues


Bugfix PR

Bugfix Request

JIRA ID

Module

Description

Root Cause

Related Issues


Release PR

Summary by CodeRabbit

  • New Features

    • Added App Configuration module to Campaign Manager
    • Introduced new components: SidePanel, Switch, AppFieldComposer, DrawerFieldComposer, and AppFieldScreenWrapper
    • Enhanced CampaignCard with a new action link for app configuration
  • Style Updates

    • Updated CSS stylesheets for components
    • Modified SCSS classes for improved layout and visual presentation
  • Chores

    • Updated stylesheet version links
    • Added new routing for App Configuration module

@nabeelmd-eGov nabeelmd-eGov requested a review from a team as a code owner January 8, 2025 06:11
Copy link
Contributor

coderabbitai bot commented Jan 8, 2025

Warning

Rate limit exceeded

@nabeelmd-eGov has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 31 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5c6b7d6 and 5841dda.

⛔ Files ignored due to path filters (1)
  • health/micro-ui/web/micro-ui-internals/packages/css/package.json is excluded by !**/*.json
📒 Files selected for processing (3)
  • health/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/UploadDataMappingWrapper.js (2 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
📝 Walkthrough

Walkthrough

This pull request introduces several new components and updates to the campaign management module, focusing on app configuration functionality. The changes include adding a new AppConfigurationWrapper component, creating supporting components like SidePanel, Switch, and DrawerFieldComposer, and updating stylesheet versions. The modifications enhance the UI and interaction capabilities for managing campaign configurations, with a particular emphasis on providing a flexible and dynamic interface for field and section management.

Changes

File Change Summary
health/micro-ui/web/micro-ui-internals/example/public/index.html Updated stylesheet versions for digit-ui-components-css and digit-ui-health-css
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss Added new CSS classes, updated existing styles for various components
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js Added AppConfigurationWrapper import, updated moduleCode and componentsToRegister
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SidePanel.js Added new component SidePanel
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/Switch.js Added new component Switch
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppConfigurationWrapper.js Added new component AppConfigurationWrapper
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldComposer.js Added new component AppFieldComposer
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldScreenWrapper.js Added new component AppFieldScreenWrapper
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/DrawerFieldComposer.js Added new component DrawerFieldComposer
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js Added AppConfigurationWrapper route and component registration
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/OldCampaignCard.js Added new link for app configuration action
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignCard.js Added new link for app configuration action

Sequence Diagram

sequenceDiagram
    participant User
    participant AppConfigurationWrapper
    participant AppFieldScreenWrapper
    participant DrawerFieldComposer
    participant SidePanel

    User->>AppConfigurationWrapper: Open App Configuration
    AppConfigurationWrapper->>AppFieldScreenWrapper: Render Field Screen
    User->>AppFieldScreenWrapper: Select/Add Fields
    AppFieldScreenWrapper->>DrawerFieldComposer: Open Field Configuration
    User->>DrawerFieldComposer: Configure Field Details
    DrawerFieldComposer->>AppConfigurationWrapper: Update Configuration
    User->>SidePanel: Interact with Side Panel
    SidePanel->>AppConfigurationWrapper: Manage Panel State
Loading

Possibly related PRs

Suggested reviewers

  • nipunarora-eGov
  • Swathi-eGov
  • jagankumar-egov

Poem

🐰 A Rabbit's Ode to App Configuration 🔧

In the realm of code, a new feature springs,
With panels that slide and switches that sing,
Configuration magic, so flexible and bright,
Bringing campaigns to life with digital might!

Hop, hop, hooray for UI delight! 🎉


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.

CodeRabbit Configuration File (.coderabbit.yaml)

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

Documentation and Community

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 24

🔭 Outside diff range comments (1)
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss (1)

Line range hint 1-268: Add documentation for new app configuration classes

Consider adding comments to document the purpose and usage of the new app configuration classes. This will help other developers understand the intended use of each class.

// Example documentation:
// App Configuration Classes
//
// .appConfiglabelField - Base style for configuration field containers
// .appConfiglabelField.selected - Style for selected configuration fields
// .appConfig-flow-stepper - Container for configuration flow steps
// .app-config-add-section - Style for the add section button container
// .appConfigScreenCard - Card container for configuration screens
// .appConfiglabelField-label - Label style for configuration fields
// .app-config-actionBar - Fixed position action bar for configuration actions
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b368b9c and 1cc5937.

📒 Files selected for processing (12)
  • health/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss (4 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (3 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SidePanel.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/Switch.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppConfigurationWrapper.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldComposer.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldScreenWrapper.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/DrawerFieldComposer.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SidePanel.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/OldCampaignCard.js (1 hunks)
👮 Files not reviewed due to content moderation or server errors (3)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldComposer.js
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/OldCampaignCard.js
🧰 Additional context used
📓 Path-based instructions (10)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/OldCampaignCard.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldComposer.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/DrawerFieldComposer.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldScreenWrapper.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/Switch.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppConfigurationWrapper.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SidePanel.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SidePanel.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/Module.js (1)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#741
File: micro-ui/web/micro-ui-internals/packages/modules/hcm-microplanning/src/Module.js:15-15
Timestamp: 2024-11-10T20:01:49.000Z
Learning: When adding a new module code like "campaignmanager" to `moduleCode`, ensure that it is properly handled in all relevant conditional checks and function parameters across the codebase.
🪛 Biome (1.9.4)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldComposer.js

[error] 52-68: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 99-115: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 133-149: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 165-181: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 197-213: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 228-244: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 75-75: This code is unreachable

... because this statement will return from the function beforehand

(lint/correctness/noUnreachable)


[error] 122-122: This code is unreachable

... because this statement will return from the function beforehand

(lint/correctness/noUnreachable)


[error] 155-155: This code is unreachable

... because this statement will return from the function beforehand

(lint/correctness/noUnreachable)


[error] 187-187: This code is unreachable

... because this statement will return from the function beforehand

(lint/correctness/noUnreachable)


[error] 252-252: This code is unreachable

... because this statement will return from the function beforehand

(lint/correctness/noUnreachable)


[error] 257-268: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 12-12: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/DrawerFieldComposer.js

[error] 54-54: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 66-66: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 125-144: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 161-161: Unsafe usage of optional chaining.

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

(lint/correctness/noUnsafeOptionalChaining)


[error] 91-91: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldScreenWrapper.js

[error] 34-34: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 44-44: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 45-45: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 46-46: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 103-103: Unsafe usage of optional chaining.

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

(lint/correctness/noUnsafeOptionalChaining)


[error] 122-122: Unnecessary use of boolean literals in conditional expression.

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

(lint/complexity/noUselessTernary)


[error] 111-111: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)


[error] 113-113: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)


[error] 117-147: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/Switch.js

[error] 33-33: The HTML element div is non-interactive. Do not use tabIndex.

Adding non-interactive elements to the keyboard navigation flow can confuse users.
Unsafe fix: Remove the tabIndex attribute.

(lint/a11y/noNoninteractiveTabindex)


[error] 41-41: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 42-42: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 43-43: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppConfigurationWrapper.js

[error] 32-32: Unsafe usage of optional chaining.

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

(lint/correctness/noUnsafeOptionalChaining)


[error] 166-166: Use Number.POSITIVE_INFINITY instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.POSITIVE_INFINITY instead.

(lint/style/useNumberNamespace)


[error] 167-167: Use Number.POSITIVE_INFINITY instead of the equivalent global.

ES2015 moved some globals into the Number namespace for consistency.
Safe fix: Use Number.POSITIVE_INFINITY instead.

(lint/style/useNumberNamespace)


[error] 192-192: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)


[error] 199-199: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SidePanel.js

[error] 109-114: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 115-115: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 118-132: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 141-141: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 172-172: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 184-184: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 167-167: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)


[error] 179-179: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SidePanel.js

[error] 145-150: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 151-151: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 154-168: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 177-177: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.

Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.

(lint/a11y/useKeyWithClickEvents)


[error] 193-193: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 203-203: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 189-189: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)


[error] 199-199: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

🔇 Additional comments (8)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppFieldScreenWrapper.js (2)

173-188: Ensure accessibility for interactive elements

The Button component for adding sections should be accessible and comply with accessibility guidelines.

Ensure that the ADD_SECTION button has appropriate ARIA labels and event handlers.


150-167: 🧹 Nitpick (assertive)

Ensure accessibility for interactive elements

The Button component should have an accessible label and proper event handlers to support all users, including those using assistive technologies.

Verify that the ADD_FIELD button is accessible and complies with accessibility guidelines.

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/Switch.js (1)

41-43: Ensure interactive elements are accessible

The switch component should be accessible to all users. Ensure that keyboard navigation and screen readers can interact with the element properly.

Test the component with keyboard-only navigation and screen readers to ensure it meets accessibility standards.

🧰 Tools
🪛 Biome (1.9.4)

[error] 41-41: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 42-42: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)


[error] 43-43: JSX elements without children should be marked as self-closing. In JSX, it is valid for any element to be self-closing.

Unsafe fix: Use a SelfClosingElement instead

(lint/style/useSelfClosingElements)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/DrawerFieldComposer.js (1)

91-91: ⚠️ Potential issue

Add a key prop to iterated elements

When rendering a list with map, each item should have a unique key prop.

Apply this diff:

-              {drawerState?.dropDownOptions?.map((item, index) => (
+              {drawerState?.dropDownOptions?.map((item, index) => (
+                <div key={item.id} style={{ display: "flex", gap: "1rem" }}>

Likely invalid or redundant comment.

🧰 Tools
🪛 Biome (1.9.4)

[error] 91-91: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js (1)

107-108: LGTM! Route registration follows existing patterns.

The AppConfigurationWrapper component is correctly registered and follows the established routing patterns.

Also applies to: 158-158

health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/campaign.scss (2)

70-72: LGTM: Well-implemented hover effect

The hover effect with semi-transparent background and pointer cursor provides good visual feedback for interactive table rows.


189-189: LGTM: Consistent font family declarations

The font family declarations are well-structured with proper fallbacks and consistent use of double quotes.

Also applies to: 196-196, 202-202

health/micro-ui/web/micro-ui-internals/example/public/index.html (1)

14-15: Verify the compatibility of updated CSS versions.

Please ensure that the updated CSS versions are compatible with the new app configuration feature and have been tested with the UI changes.

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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1cc5937 and 5c6b7d6.

📒 Files selected for processing (1)
  • health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignCard.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignCard.js (1)

Pattern **/*.js: check

🔇 Additional comments (2)
health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/CampaignCard.js (2)

Line range hint 1-72: Well-structured component with good documentation!

The component is well-documented with JSDoc comments, has clear role definitions, and implements proper role-based access control. The new link addition maintains the existing pattern of role-based filtering.


67-72: Verify the impact of the new app configuration link

The new link has been added correctly with appropriate role-based access control. However, let's verify if there are any dependent components or routes configured to handle this new path.

✅ Verification successful

The app configuration link is properly configured and implemented

The route /workbench-ui/employee/campaign/app-configuration is correctly set up with:

  • Protected route configuration with proper access control
  • Fully implemented AppConfigurationWrapper component with all necessary functionality
  • Integration with required dependencies and systems
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the route and component for app-configuration exist
echo "Checking for route configuration..."
rg -l "app-configuration" --type js

echo "Checking for AppConfiguration component..."
fd -e js -e jsx AppConfiguration

Length of output: 670


Script:

#!/bin/bash
# Check route configuration and component implementation
echo "Checking route configuration in index.js..."
rg -A 5 -B 5 "app-configuration" health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/index.js

echo -e "\nChecking AppConfigurationWrapper implementation..."
cat health/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/AppConfigurationWrapper.js

Length of output: 7538

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 8, 2025
@jagankumar-egov jagankumar-egov merged commit 1eea6a1 into console Jan 8, 2025
3 checks passed
@jagankumar-egov jagankumar-egov deleted the HCMPRE-1766 branch January 8, 2025 07:13
@coderabbitai coderabbitai bot mentioned this pull request Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants