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

Summary-screen changes and localization #1672

Merged
merged 16 commits into from
Oct 25, 2024
Merged

Summary-screen changes and localization #1672

merged 16 commits into from
Oct 25, 2024

Conversation

abishekTa-egov
Copy link
Collaborator

@abishekTa-egov abishekTa-egov commented Oct 25, 2024

Made summary screen datamgmt , and css changes, localiztions in user-access-roles

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced styling for health-related components with updated CSS.
    • Improved user interface for the Assumptions List and Campaign Boundary components, including new buttons and layout adjustments.
    • Added new customization options for the search results configuration.
    • Introduced dynamic state management and improved rendering logic in various components.
    • New methods added to the UICustomizations for enhanced functionality.
  • Bug Fixes

    • Resolved issues with the popup headings in the User Access component for better clarity.
  • Style

    • Various components received style updates for improved visual consistency and responsiveness, including background color changes and new class additions.
  • Chores

    • Cleaned up unused imports and optimized the code structure across multiple components.

@abishekTa-egov abishekTa-egov requested a review from a team as a code owner October 25, 2024 10:00
Copy link
Contributor

coderabbitai bot commented Oct 25, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces several updates across multiple files, primarily focusing on enhancing user interface components and updating CSS dependencies. Key changes include updating the stylesheet link for the health-related CSS from version 0.1.9 to 0.1.10, modifying various components in the microplan module to improve layout and functionality, and implementing state management in the FormulaConfigScreen component. Additional changes involve refining rendering logic, enhancing user interactions, and simplifying code structures across several components.

Changes

File Change Summary
health/micro-ui/web/micro-ui-internals/example/public/index.html Updated stylesheet link for @egovernments/digit-ui-health-css from 0.1.9 to 0.1.10.
health/micro-ui/web/public/index.html Updated stylesheet link for @egovernments/digit-ui-health-css from 0.1.9 to 0.1.10.
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss Added new classes (.header-container, .card-color, .marginBottom, .as-label-field), modified existing classes, and enhanced overall CSS structure for better layout and visual consistency.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/AssumptionsList.js Added imports for Button and LabelFieldPair, modified rendering to include an edit button, and updated rendering logic to use LabelFieldPair for key-value pairs.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/CampaignBoundary.js Restructured rendering logic for bHierarchy items, added Card component wrappers, and refined visibility toggling for items.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/DataMgmtComponent.js Added a style prop to the first Card component to adjust visual spacing.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.js Updated import statement for Button, modified Card component usage, and changed button handling.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigScreen.js Introduced state management with useState and useEffect, organized planConfigurations into a dictionary, and updated rendering logic based on state.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaView.js Simplified import statements, updated props to provide default values, and enhanced layout and responsiveness.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js Updated popup heading logic and refined display logic for jurisdiction chips.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/subBoundaryView.js Added style prop to the function signature and updated Card instantiation to accept this prop.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js Added additionalCustomization property to several column configurations and adjusted the structure of the configuration object.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js Added conditional checks in additionalCustomizations for several keys and refactored logic for MyMicroplanSearchConfig.
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js Updated data object to include new properties for styling behavior and modified props for FormulaConfigScreen.

Possibly related PRs

Suggested reviewers

  • nipunarora-eGov

🐰 In the garden, changes bloom,
Styles updated, making room.
Buttons, cards, all align,
With each tweak, the code will shine!
Hop along, let’s celebrate,
A brighter UI, oh, isn’t it great? 🌼


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.

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.

nabeelmd-eGov
nabeelmd-eGov previously approved these changes Oct 25, 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: 26

🧹 Outside diff range comments (7)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/AssumptionsList.js (1)

Line range hint 8-23: Consider separating data processing logic.

The component currently handles both data transformation and presentation. Consider:

  1. Moving the dictionary creation logic to a separate utility function
  2. Adding input validation for the assumptions data structure
  3. Using TypeScript to better define the data structure

Example refactor:

const processAssumptions = (assumptionValues) => {
  if (!Array.isArray(assumptionValues)) return {};
  
  return assumptionValues.reduce((acc, ob) => {
    const category = ob?.category || 'NA';
    const key = ob?.key || 'NA';
    const value = ob?.value || 'NA';
    
    return {
      ...acc,
      [category]: [...(acc[category] || []), { [key]: value }]
    };
  }, {});
};
🧰 Tools
🪛 Biome

[error] 11-11: This let declares a variable that is only assigned once.

'dic' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)

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

Line range hint 9-17: Remove commented out code.

The commented out console.log and data structure example should be removed as they add noise to the codebase and may become outdated.

-    // console.log("totalfiles", uploadedFiles);
-    // {
-    //     "filestoreId": "695334cb-5813-4892-a282-a46c075f0798",
-    //         "resourceId": "8650d05f-92dc-4410-b96b-29b39876f7c5",
-    //             "facilityname": "Population Template (19).xlsx",
-    //                 "type": "boundaryWithTarget",
-    //                     "inputFileType": "xlsx",
-    //                         "templateIdentifier": "Population"
-    // }

Line range hint 24-67: Reduce code duplication by extracting common logic.

The download handler and file name logic is duplicated in both the population and facilities sections. Consider extracting this into a reusable function.

+const renderFileList = (files) => {
+  return files?.map((item) => {
+    const fileName = item?.filename ?? `FileNo${item?.filestoreId}`;
+    return (
+      <FileComponent
+        title=""
+        fileName={fileName}
+        downloadHandler={() => {
+          Digit.Utils.campaign.downloadExcelWithCustomName({
+            fileStoreId: item?.filestoreId,
+            customName: String(fileName)
+          });
+        }}
+      />
+    );
+  });
+};

 return (
   <>
     <Card style={{marginBottom:"1rem"}}>
       <HeaderComp title="POPULATION" styles={{ color: "black" }} />
-      {uploadedFiles?.map((item) => {
-        const fileName = item?.filename ? (item?.filename) : (`FileNo${item?.filestoreId}`)
-        return (
-          <FileComponent
-            title=""
-            fileName={fileName}
-            downloadHandler={() => {
-              Digit.Utils.campaign.downloadExcelWithCustomName({
-                fileStoreId: item?.filestoreId,
-                customName: String(fileName)
-              });
-            }}
-          />
-        )
-      })}
+      {renderFileList(uploadedFiles)}
     </Card>
     <Card>
       <HeaderComp title="FACILITIES" styles={{ color: "black" }} />
-      {uploadedFacilities?.map((item) => {
-        const fileName = item?.filename ? (item?.filename) : (`FileNo${item?.filestoreId}`)
-        return (
-          <FileComponent
-            title=""
-            fileName={fileName}
-            downloadHandler={() => {
-              Digit.Utils.campaign.downloadExcelWithCustomName({
-                fileStoreId: item?.filestoreId,
-                customName: String(fileName)
-              });
-            }}
-          />
-        )
-      })}
+      {renderFileList(uploadedFacilities)}
     </Card>
   </>
 );
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/subBoundaryView.js (1)

Line range hint 1-93: Consider performance optimizations for the component.

While the overall structure is good, here are some suggestions to improve performance and maintainability:

  1. Memoize the component to prevent unnecessary re-renders
  2. Extract the chip rendering logic into a separate component
  3. Move the button styles to a CSS file for better maintainability

Here's how you could implement these improvements:

-import React, { useState } from 'react'
+import React, { useState, memo } from 'react'

+const ChipList = memo(({ items, t }) => (
+  items?.map((el, ind) => (
+    <Chip
+      key={ind}
+      className=""
+      error=""
+      extraStyles={{}}
+      iconReq=""
+      hideClose={true}
+      text={t(el)}
+    />
+  ))
+));

-const SubBoundaryView = ({ title, arr, style }) => {
+const SubBoundaryView = memo(({ title, arr, style }) => {
   // ... rest of the component code
   
   return (
     <div>
       {arr && arr.length > 0 ? (
         <Card type={"secondary"} style={style}>
           <HeaderComp title={title} />
           <div className="digit-tag-container userAccessCell">
-            {arr?.slice(0, 10)?.map((el, ind) => {
-              return (
-                <Chip
-                  key={ind}
-                  className=""
-                  error=""
-                  extraStyles={{}}
-                  iconReq=""
-                  hideClose={true}
-                  text={t(el)}
-                />
-              );
-            })}
+            <ChipList items={arr?.slice(0, 10)} t={t} />
             {/* ... rest of the code */}
           </div>
         </Card>
       ) : null}
     </div>
   );
-}
+});

Also, consider moving the button styles to a CSS file:

/* microplan.scss */
.more-button {
  height: 2rem;
  min-width: 4.188rem;
  min-height: 2rem;
  padding: 0.5rem;
  justify-content: center;
  align-items: center;
}

.more-button-text {
  height: auto;
  font-size: 0.875rem;
  font-weight: 400;
  width: 100%;
  line-height: 16px;
  color: #C84C0E;
}
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js (1)

Line range hint 1-124: Consider improving maintainability

A few suggestions to improve code maintainability:

  1. Extract hardcoded strings (labels, paths) into constants
  2. Add JSDoc or TypeScript type definitions for the configuration object

Example structure:

/** @typedef {Object} ColumnConfig
 * @property {string} label - The column label key
 * @property {string} jsonPath - Path to the data
 * @property {boolean} [additionalCustomization] - Whether custom rendering is needed
 */

const COLUMN_LABELS = {
  MICROPLAN_STATUS: 'MICROPLAN_STATUS',
  CAMPAIGN_DISEASE: 'CAMPAIGN_DISEASE',
  // ... other labels
};

/** @type {ColumnConfig[]} */
const columns = [
  {
    label: COLUMN_LABELS.MICROPLAN_STATUS,
    // ...
  }
];
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js (1)

Line range hint 27-236: Consider these improvements to enhance code maintainability

  1. Consider consolidating state management using useReducer for related states (showPopUp, chipPopUp, showToast).
  2. Extract duplicate Assign button logic into a reusable component.
  3. Add PropTypes for better type safety and documentation.

Here's a suggested implementation:

import PropTypes from 'prop-types';

// Define prop types
UserAccess.propTypes = {
  category: PropTypes.string.isRequired,
  setData: PropTypes.func.isRequired,
  nationalRoles: PropTypes.array.isRequired
};

// Extract Assign button component
const AssignButton = ({ onClick }) => {
  const { t } = useTranslation();
  return (
    <Button 
      variation="secondary" 
      label={t(`ASSIGN`)} 
      icon={"AddIcon"} 
      onClick={onClick} 
    />
  );
};

// Simplify state management with reducer
const initialState = {
  showPopUp: false,
  chipPopUp: false,
  showToast: null
};

function reducer(state, action) {
  switch (action.type) {
    case 'SET_POPUP':
      return { ...state, showPopUp: action.payload };
    case 'SET_CHIP_POPUP':
      return { ...state, chipPopUp: action.payload };
    case 'SET_TOAST':
      return { ...state, showToast: action.payload };
    default:
      return state;
  }
}

// In your component:
const [state, dispatch] = useReducer(reducer, initialState);
  1. Simplify Toast type logic:
-  type={showToast.key === "error" ? "error" : "success"}
+  type={showToast.key}
🧰 Tools
🪛 Biome

[error] 215-215: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)


[error] 215-215: 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] 217-217: 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/microplan/src/pages/employee/SummaryScreen.js (1)

Line range hint 1-339: Consider code cleanup and standardization.

The code could benefit from some general improvements:

  1. Remove commented-out code blocks if they're no longer needed
  2. Standardize the use of boolean props across all cards (use actual booleans instead of strings)
  3. Maintain consistent spacing between sections

Would you like me to provide specific examples of these improvements?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between b25bd58 and 6961db7.

⛔ 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 (14)
  • health/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/AssumptionsList.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/CampaignBoundary.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/DataMgmtComponent.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FileComponent.js (3 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaConfigScreen.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/FormulaView.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/subBoundaryView.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js (4 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (11)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/AssumptionsList.js (1)

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

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

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (3)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-10-08T20:11:07.772Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-10-08T20:11:12.539Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
🪛 Biome
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/AssumptionsList.js

[error] 11-11: This let declares a variable that is only assigned once.

'dic' is never reassigned.

Safe fix: Use const instead.

(lint/style/useConst)


[error] 49-49: 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/microplan/src/components/CampaignBoundary.js

[error] 338-341: 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] 345-348: 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)

🔇 Additional comments (15)
health/micro-ui/web/micro-ui-internals/example/public/index.html (2)

19-19: 🧹 Nitpick (assertive)

Verify the compatibility of the new CSS version.

The CSS version upgrade from 0.1.9 to 0.2.0 might introduce breaking changes. Please ensure all health module UI components render correctly with the new version.

Consider implementing the following improvements for better security and reliability:

  1. Add SRI (Subresource Integrity) hash:
-  <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
+  <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" 
+        integrity_no="sha384-[actual-hash]" 
+        crossorigin="anonymous" />
  1. Add a fallback in case the CDN fails:
+  <script>
+    function loadFallbackCSS(e) {
+      var link = document.createElement('link');
+      link.rel = 'stylesheet';
+      link.href = '/assets/digit-ui-health.css'; // Local fallback
+      document.head.appendChild(link);
+    }
+  </script>
+  <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" 
+        onerror="loadFallbackCSS(event)" />
  1. Add preconnect hint for performance:
+  <link rel="preconnect" href="https://unpkg.com">

19-19: Run the following verification script to check for potential UI issues.

✅ Verification successful

CSS version update appears consistent across the codebase

The version update to [email protected] is already correctly reflected in both the main application (health/micro-ui/web/public/index.html) and the example application (health/micro-ui/web/micro-ui-internals/example/public/index.html). Only the README contains an outdated reference to version 0.1.0, which is documentation and doesn't affect runtime behavior.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any health module UI components that might be affected by CSS changes

# Test 1: Look for health-related component files that might need testing
echo "Searching for health module components..."
fd -e js -e jsx . | rg -i "health.*/(components?|screens?)"

# Test 2: Check for any hardcoded CSS version references that need updating
echo "Checking for hardcoded CSS version references..."
rg -i "[email protected]" 

# Test 3: Look for custom CSS classes that might conflict
echo "Checking for potential CSS conflicts..."
rg -i "\.health-" 

Length of output: 14343


Script:

#!/bin/bash
# Let's check for any CSS imports and version references in the codebase

# Check for any digit-ui-health-css version references
echo "Checking for all digit-ui-health-css version references..."
rg -i "digit-ui-health-css@" -A 1 -B 1

# Check for any CSS imports or links in HTML files
echo "Checking CSS references in HTML files..."
fd -e html -x cat {} | rg -i "link.*rel=\"stylesheet\".*health"

# Look for any CSS class usage in health components
echo "Checking CSS class usage in health components..."
fd -e js -e jsx . | rg -i "health" | xargs rg -i "className.*health"

Length of output: 1736

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

14-14: Verify compatibility with the new CSS version.

The upgrade from 0.1.9 to 0.2.0 is a minor version bump that might introduce breaking changes. While the update aligns with the PR objectives, please ensure:

  1. The new version is compatible with other CSS dependencies:
  2. Visual regression testing has been performed to verify no unintended style changes.

Let's verify the changelog and compatibility:

✅ Verification successful

CSS version update appears safe to proceed

The version upgrade from 0.1.9 to 0.2.0 appears to be safe based on the following findings:

  1. The package.json shows proper version management and dependencies on standard CSS tools (tailwind, postcss).
  2. The package maintains compatibility with other CSS dependencies:
  3. The README doesn't indicate any breaking changes, and the package follows semantic versioning.

While no visual regression tests were found, the package's focused scope (health-specific CSS) and proper version management suggest minimal risk of conflicts.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for breaking changes in the new CSS version

# Test 1: Look for changelog or release notes
echo "Checking for changelog or release notes..."
fd -g "*CHANGELOG*" -g "*RELEASE*"

# Test 2: Check for any visual regression testing configuration
echo "Checking for visual regression testing setup..."
fd -g "*visual*test*" -g "*regression*test*" -g "*screenshot*test*"

Length of output: 572


Script:

#!/bin/bash
# Let's try a different approach to find relevant information

# Check for package.json files that might reference the CSS package
echo "Checking package dependencies..."
fd package.json --exec grep -l "@egovernments/digit-ui-health-css"

# Look for test configurations
echo "Checking for test configurations..."
fd -e yaml -e json -e js --exec grep -l "test" {}

# Search for visual testing related terms in the codebase
echo "Searching for visual testing related code..."
rg -i "visual.*(test|check|verify)" -g "!{node_modules,dist,build}/*"

# Look for CSS version references
echo "Searching for other CSS version references..."
rg "@egovernments/digit-ui-health-css" -g "!{node_modules,dist,build}/*"

Length of output: 5340


Script:

#!/bin/bash
# Let's examine the package.json file we found to check version compatibility

echo "Checking CSS package version details..."
cat ./health/micro-ui/web/micro-ui-internals/packages/css/package.json

# Look for any breaking changes or version information in the README
echo "Checking README for version information..."
cat ./health/micro-ui/web/micro-ui-internals/packages/css/README.md

# Check for other CSS package dependencies
echo "Checking other CSS dependencies..."
rg "digit-ui.*css" ./health/micro-ui/web/public/index.html

Length of output: 3299

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

1-6: LGTM! Clean imports and well-structured prop defaults.

The simplified imports and addition of default values for props improve the component's robustness by handling undefined cases gracefully.


6-12: LGTM! Clean component implementation.

The component follows React best practices with proper use of translation hook and clean functional component structure.

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

19-19: LGTM! Card styling update is consistent.

The Card component update with type="secondary" and style prop follows the consistent styling approach mentioned in the PR objectives.

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/MicroplanSearchConfig.js (2)

112-114: 🧹 Nitpick (assertive)

Verify hook implementation and consider documenting version strategy

The customHookName has been moved to the tab level. This hook appears to be from a versioned module ("microplanv1").

Consider adding a comment explaining:

  1. Why the hook was moved to tab level
  2. The versioning strategy for microplan hooks
✅ Verification successful

Based on the shell script results, I can now generate the final response:

Hook implementation is verified and properly versioned

The useSavedMicroplans hook is:

  • Properly exported from health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/hooks/useSavedMicroplans.js
  • Part of a consistent versioning strategy where microplanv1 namespace is used across the codebase
  • Used in multiple configurations including MicroplanSearchConfig.js and MyMicroplanSearchConfig.js

The hook movement to tab level aligns with the overall architecture where other microplanv1 hooks are used for specific feature implementations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the hook is properly exported and implemented
echo "Checking for hook implementation..."
rg -A 10 "export.*useSavedMicroplans" --type js

# Look for other version references
echo "Checking for version references..."
rg "microplanv[0-9]+" --type js

Length of output: 14386


82-97: 🛠️ Refactor suggestion

Verify custom column implementations and add null checks

The additionalCustomization flags suggest custom rendering logic for these columns. Ensure that the corresponding customization implementations in UICustomizations.js handle all possible data scenarios.

Consider adding null checks for nested properties. Example:

 {
   label:"CAMPAIGN_TYPE",
-  jsonPath:"additionalDetails.campaignType",
+  jsonPath:"additionalDetails?.campaignType",
   additionalCustomization:true
 }
✅ Verification successful

Based on the search results, I can see that the custom column implementations for these fields exist in UICustomizations.js and proper null checks are already in place. Let me verify the specific implementations with another search:


Custom column implementations are properly handled with null checks

The code in UICustomizations.js shows that all the columns with additionalCustomization:true have proper implementations with null value handling:

  • Each field (MICROPLAN_STATUS, CAMPAIGN_DISEASE, CAMPAIGN_TYPE, DISTIRBUTION_STRATEGY) has null checks using if(value && value!="NA")
  • When the value is null/NA, it returns a div with "NA" text
  • When value exists, it properly translates using the translation function t(value)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the custom column implementations
echo "Checking for column customization implementations..."
rg -A 10 "additionalCustomization.*MICROPLAN_STATUS|CAMPAIGN_DISEASE|CAMPAIGN_TYPE|DISTIRBUTION_STRATEGY" --type js

# Verify the existence of these nested paths in the response data
echo "Checking actual API response structure..."
rg -A 10 "PlanConfiguration.*disease|campaignType|resourceDistributionStrategyCode" --type js

Length of output: 343043


Script:

#!/bin/bash
# Search for the specific customization implementations in UICustomizations.js
rg -A 10 "MICROPLAN_STATUS|CAMPAIGN_DISEASE|CAMPAIGN_TYPE|DISTIRBUTION_STRATEGY" health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js

Length of output: 983

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

18-18: Verify the existence of 'card-color' CSS class.

The Card component uses a "card-color" class which should be defined in the stylesheet.

✅ Verification successful

The 'card-color' CSS class exists and is properly defined

The class is defined in microplan.scss with a light gray background color (#FAFAFA), which is appropriate for a secondary card component.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the card-color class definition
rg -g "*.scss" -g "*.css" "card-color"

Length of output: 134


Script:

#!/bin/bash
# Let's check the actual definition of the card-color class
rg -g "*.scss" -g "*.css" -A 5 "card-color"

Length of output: 630


75-80: 🛠️ Refactor suggestion

Verify the 'FileDownload' icon identifier.

The button's icon prop now uses a string identifier instead of a component. While the onClick change aligns with React conventions, we should verify that "FileDownload" is a valid icon identifier.

Consider maintaining consistency with other buttons in the file that use icon components:

-icon={"FileDownload"}
+icon={<DownloadIcon styles={{ height: "1.25rem", width: "2.5rem" }} />}
✅ Verification successful

The search results show that "FileDownload" is a valid icon identifier that exists in the codebase. It's exported from the svg-components package and is consistently used across multiple components in a similar way. The current usage in FileComponent.js matches the pattern seen in other files like UserUpload.js and UploadDataCustom.js where it's also used as icon={"FileDownload"}.

The 'FileDownload' icon identifier is valid and follows the established pattern.

The change from a component-based approach to using the string identifier "FileDownload" aligns with the codebase's conventions. The refactoring suggestion in the review comment should be withdrawn as it would actually deviate from the consistent pattern used across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other usages of FileDownload icon
rg "FileDownload" --type js

Length of output: 10302

health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (1)

36-36: LGTM! Background color change maintains consistency.

The background color change to #FAFAFA aligns with the card-color class, ensuring visual consistency across containers.

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

214-214: LGTM: Improved i18n key specificity

The change to use a dedicated translation key for the popup heading (${category}_POPUP_HEADING) improves i18n by allowing different translations for the card header and popup heading contexts.


Line range hint 1-3: Verify CSS dependencies and styling

The PR objectives mention CSS updates, but no direct CSS changes are visible in this file. Let's verify the styling dependencies.

✅ Verification successful

Let me gather more information about the CSS dependencies and their usage.


Based on the gathered information, I can now provide a final response:

CSS dependencies are properly integrated

The file correctly uses CSS classes from the microplanning stylesheet:

  • Uses userAccessCell class for tag containers
  • Uses roleComposer class for component styling
  • Imports required components from @egovernments/digit-ui-components which include their own styles
  • The microplanning.scss file contains all necessary styling definitions for these classes

The CSS updates mentioned in the PR objectives are properly implemented through the component-level classes and the centralized microplanning stylesheet.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for related CSS files and their changes
echo "Searching for related CSS files..."
rg -l "userAccessCell|digit-tag-container|roleComposer" --type css

# Check for any style-related imports
echo "Checking style-related imports..."
rg -l "tableCustomStyle|microplan\.scss" --type js

Length of output: 1320


Script:

#!/bin/bash
# Check the content of the microplanning.scss file
echo "Content of microplanning.scss:"
cat health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss

# Check how UserAccess.js uses the styles
echo -e "\nChecking style usage in UserAccess.js:"
rg "className" health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js

# Check if there are any style imports in UserAccess.js
echo -e "\nChecking style imports in UserAccess.js:"
rg "import.*\.scss|import.*style" health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/UserAccess.js

Length of output: 58381

🧰 Tools
🪛 Biome

[error] 215-215: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)


[error] 215-215: 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] 217-217: 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/microplan/src/pages/employee/SummaryScreen.js (2)

180-180: LGTM: Props passing simplified.

The simplified props passing removes unnecessary object nesting.


322-322: Verify the default active tab change.

The default active tab has been changed from "DATA_MGMT" (card7) to "MICROPLAN_ASSUMPTIONS" (card2). Please confirm if this change in the default navigation flow is intentional and aligns with the user experience requirements.

✅ Verification successful

Let me gather more specific information about the navigation configuration in the microplan module.


Default tab change to "MICROPLAN_ASSUMPTIONS" appears intentional and consistent

The change from "DATA_MGMT" (card7) to "MICROPLAN_ASSUMPTIONS" (card2) as the default active tab appears to be a deliberate UX improvement. The code shows a clear navigation structure where "MICROPLAN_ASSUMPTIONS" is positioned as a core configuration section, making it a logical starting point for users. All referenced cards are properly defined in the configuration with their respective purposes clearly mapped.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any related configuration or documentation about the navigation flow
rg -g '!*.{lock,svg,css}' -i "activeByDefault|default.*tab|navigation.*flow" 

Length of output: 5987


Script:

#!/bin/bash
# Search for card configurations and their mappings in the microplan module
rg -g '!*.{lock,svg,css}' "card[0-9]" health/micro-ui/web/micro-ui-internals/packages/modules/microplan/ -A 2 -B 2

Length of output: 11020

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 25, 2024
@abishekTa-egov abishekTa-egov changed the title Abi 24 10 Summary-screen changes and localization Oct 25, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 25, 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: 2

🧹 Outside diff range comments (1)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js (1)

Line range hint 1-321: Clean up commented code and resolve component duplication.

  1. There are several blocks of commented-out code that should be removed for better maintainability.
  2. The FormulaConfigScreen component appears in both card5 and card8. This duplication might cause confusion or maintenance issues.

Consider:

  1. Removing all commented code blocks
  2. Consolidating the duplicate FormulaConfigScreen usage into a single card or clarifying the purpose of each instance through clear naming
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 6961db7 and b467bec.

📒 Files selected for processing (2)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (2 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/configs/UICustomizations.js (1)

Pattern **/*.js: check

health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js (1)

Pattern **/*.js: check

🔇 Additional comments (3)
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/pages/employee/SummaryScreen.js (2)

99-99: Use boolean instead of string for noCardStyle prop.

This issue was previously identified. React properties that represent boolean values should use actual booleans rather than strings.


179-179: Verify FormulaConfigScreen prop handling.

The props are now being passed directly as customProps instead of being wrapped in an object. Please ensure that the FormulaConfigScreen component is updated to handle this prop structure correctly.

✅ Verification successful

Props are correctly handled in FormulaConfigScreen component

The FormulaConfigScreen component is already set up to receive and handle customProps directly. The component's definition shows it destructures customProps from its props and uses it appropriately:

const FormulaConfigScreen = ({ customProps }) => {
  // Uses customProps correctly in useState initialization
  const [planConfigurations, setPlanConfigurations] = useState(customProps?.sessionData?.FORMULA_CONFIGURATION?.formulaConfiguration?.formulaConfigValues);
  // ...
}
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for FormulaConfigScreen component definition and prop usage
ast-grep --pattern 'const FormulaConfigScreen = ({ $_ }) => {
  $$$
}'

Length of output: 7379

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

141-141: LGTM! Translation implemented as suggested.

The change correctly implements the translation for "NA" value as recommended in the previous review.

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

🧹 Outside diff range comments (1)
health/micro-ui/web/public/index.html (1)

Line range hint 8-14: Consider improving CSS dependency management.

The current implementation has several potential areas for improvement:

  1. Consider using SRI (Subresource Integrity) hashes for CDN resources
  2. Consider implementing a fallback mechanism in case the CDN is unavailable
  3. Version ranges could be used instead of exact versions to ease updates

Example implementation with SRI and fallback:

<link 
  rel="stylesheet" 
  href="https://unpkg.com/@egovernments/[email protected]/dist/index.css"
  integrity="sha384-HASH"
  crossorigin="anonymous"
  onerror="this.onerror=null;this.href='/fallback/health-css.css';"
/>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between b467bec and fe696da.

⛔ 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 (4)
  • health/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (2 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (1)

Pattern **/*.js: check

📓 Learnings (1)
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (3)
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-06-14T14:10:38.086Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-10-08T20:11:07.772Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
Learnt from: siddhant-nawale-egov
PR: egovernments/DIGIT-Frontend#876
File: micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss:1940-2392
Timestamp: 2024-10-08T20:11:12.539Z
Learning: Classes related to interactive elements in the microplan preview section are mostly passed to Higher Order Components (HOCs), and ARIA attributes for non-HOC elements will be managed directly by adding them where necessary.
🔇 Additional comments (11)
health/micro-ui/web/micro-ui-internals/example/public/index.html (1)

19-19: LGTM: CSS version update is consistent.

The update to version 0.1.10 of @egovernments/digit-ui-health-css aligns with the team's directive and maintains consistency across files.

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

14-14: LGTM! Verify the CSS version compatibility.

The health CSS module version update from 0.1.9 to 0.1.10 looks good. However, let's verify there are no breaking changes.

✅ Verification successful

Version update is consistent across the codebase

The CSS version update to 0.1.10 is correctly synchronized across all relevant files:

  • Both index.html files are using version 0.1.10
  • The package.json in the CSS package itself is at version 0.1.10
  • No other files need updates

While the README.md shows older version examples (0.1.0), this is just documentation and doesn't affect functionality.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any related CSS version updates in other files
# and potential breaking changes in the changelog

# Test 1: Look for other files that might need the same version update
rg -l "@egovernments/digit-ui-health-css@0\.1\.[0-9]+"

# Test 2: Look for any package.json files that might reference this dependency
fd "package.json" --exec grep -l "digit-ui-health-css"

Length of output: 341


Script:

#!/bin/bash
# Let's check the versions in the found files and package.json
echo "=== Checking index.html files ==="
rg "@egovernments/digit-ui-health-css@" health/micro-ui/web/public/index.html health/micro-ui/web/micro-ui-internals/example/public/index.html

echo -e "\n=== Checking package.json ==="
cat health/micro-ui/web/micro-ui-internals/packages/css/package.json

echo -e "\n=== Checking README.md ==="
cat health/micro-ui/web/micro-ui-internals/packages/css/README.md

Length of output: 3320

health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (5)

36-36: LGTM: Background color change improves visual contrast.

The new background color (#FAFAFA) provides better visual separation while maintaining a subtle appearance.


131-136: LGTM: Well-structured flex container implementation.

The flex layout with space-between and centered alignment provides a clean header structure.


183-185: LGTM with existing suggestions.


191-198: LGTM with existing suggestions.


138-170: 🧹 Nitpick (assertive)

Consider adding ARIA roles for better accessibility.

The table-like structure is well-implemented, but could benefit from ARIA roles for better screen reader support.

Add appropriate ARIA roles to improve accessibility:

.as-table-like {
  display: table;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
+ role: "table";
}

.as-table-row {
  display: table-row;
  border-bottom: 1px solid #D6D5D4;
+ role: "row";
}

.as-table-cell {
  display: table-cell;
  padding: 10px;
  vertical-align: top;
  box-sizing: border-box;
+ role: "cell";
}

Likely invalid or redundant comment.

health/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js (4)

885-885: ⚠️ Potential issue

Fix inconsistent spacing in conditional statements

Add a space after && to maintain consistent formatting in if(value &&value!="NA"){.

Apply this diff:

-if(value &&value!="NA"){
+if(value && value!="NA"){

Likely invalid or redundant comment.


896-896: ⚠️ Potential issue

Fix inconsistent spacing in conditional statements

Ensure consistent spacing by adding a space after && in the condition if(value &&value!="NA"){.

Apply this diff:

-if(value &&value!="NA"){
+if(value && value!="NA"){

Likely invalid or redundant comment.


885-885: ⚠️ Potential issue

Use strict equality operator '!=='

Ensure consistent use of strict inequality operators by replacing '!=' with '!==' in the condition if(value && value!="NA"){.

Apply this diff:

-if(value && value!="NA"){
+if(value && value!=="NA"){

Likely invalid or redundant comment.


896-896: ⚠️ Potential issue

Use strict equality operator '!=='

Update the condition to use '!==' for strict comparison, preventing type coercion issues.

Apply this diff:

-if(value && value!="NA"){
+if(value && value!=="NA"){

Likely invalid or redundant comment.

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 UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between fe696da and 9ec689b.

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

Pattern **/*.js: check

🪛 Biome
health/micro-ui/web/micro-ui-internals/packages/modules/microplan/src/components/CampaignBoundary.js

[error] 338-341: 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] 345-348: 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)

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