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

Modifed date and updated stepper #39

Merged
merged 7 commits into from
Apr 4, 2024
Merged

Conversation

Swathi-eGov
Copy link
Contributor

@Swathi-eGov Swathi-eGov commented Apr 3, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a new Timeline component with customizable elements for different timeline states.
    • Added StringManipulator component for various string manipulation functions.
  • Style Updates
    • Enhanced button, header, info card, radio button, stepper, text input, textarea, and timeline styling for improved user interface.
    • Updated styling for mobile responsiveness and interactive elements like hover effects.
  • Bug Fixes
    • Adjusted event handling and logic in components like MultiSelectDropdown, TextInput, and Toggle for better performance and user experience.
  • Documentation and Refactor
    • Improved code organization, naming conventions, and readability across various components.
    • Updated storybook configurations for components like Checkbox, InfoCard, InputFields, Radio, Stepper, and Timeline.
  • Chores
    • Enhanced label rendering and error message handling in components for clearer user guidance.
    • Streamlined component rendering and variant assignment for consistency.

Copy link
Contributor

coderabbitai bot commented Apr 3, 2024

Walkthrough

This update ushers in a wave of refinements and additions across the UI components and styles of a React application. Significant changes include improvements to button, header, info card, radio button, stepper, text input, and textarea styles. A new Timeline component joins the mix, enhancing the application's visual appeal. The introduction of StringManipulator standardizes text presentation across various components, aiming to elevate user experience through enhanced visuals and smoother interactions.

Changes

Files Change Summary
.../buttonsV2.scss, .../headerV2.scss, .../infoCardV2.scss, .../radiobtnV2.scss, .../stepper.scss, .../textInputV2.scss, .../textareaV2.scss, .../index.scss Styling adjustments for buttons, headers, info cards, radio buttons, steppers, text inputs, and textareas; introduction of timeline styles.
.../services/atoms/urls.js, .../core/src/Module.js, .../sample/src/configs/SampleConfig.js, .../sample/src/pages/employee/Sample.js, .../sample/src/pages/employee/index.js Functional updates in modules and sample pages, including new variable assignments and layout adjustments.
.../atoms/BreadCrumb.js, .../atoms/CheckBox.js, .../atoms/InfoCard.js, .../atoms/MultiSelectDropdown.js, .../atoms/RadioButtons.js, .../atoms/Stepper.js, .../atoms/TextInput.js, .../atoms/Toggle.js, .../atoms/TreeSelect.js, .../atoms/StringManipulator.js, .../atoms/Timeline.js, .../atoms/Toast.js, .../atoms/index.js Introduction of StringManipulator, text handling adjustments in various atoms, and addition of new components.
.../hoc/FieldV1.js, .../hoc/stories/Checkbox.stories.js, .../hoc/stories/InfoCard.stories.js, .../hoc/stories/InputFields.stories.js, .../hoc/stories/Radio.stories.js, .../hoc/stories/Stepper.stories.js, .../hoc/stories/Timeline.stories.js Storybook and HOC updates for enhanced storytelling and component management.
.../molecules/CustomDropdown.js Styling consistency adjustments in CustomDropdown.

🐰✨
Changes abound, both big and small,
In styles and scripts that grace this hall.
With buttons bright and timelines tall,
Our app's transformed, for one and all.
Let's hop with joy, through code's great sprawl!
🌟🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

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

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 53ffa9c and 9167c8e.
Files selected for processing (36)
  • react/css/src/digitv2/components/buttonsV2.scss (5 hunks)
  • react/css/src/digitv2/components/headerV2.scss (1 hunks)
  • react/css/src/digitv2/components/infoCardV2.scss (2 hunks)
  • react/css/src/digitv2/components/radiobtnV2.scss (4 hunks)
  • react/css/src/digitv2/components/stepper.scss (5 hunks)
  • react/css/src/digitv2/components/textInputV2.scss (2 hunks)
  • react/css/src/digitv2/components/textareaV2.scss (2 hunks)
  • react/css/src/digitv2/components/timeline.scss (1 hunks)
  • react/css/src/digitv2/index.scss (1 hunks)
  • react/libraries/src/services/atoms/urls.js (1 hunks)
  • react/modules/core/src/Module.js (1 hunks)
  • react/modules/sample/src/configs/SampleConfig.js (34 hunks)
  • react/modules/sample/src/pages/employee/Sample.js (9 hunks)
  • react/modules/sample/src/pages/employee/index.js (1 hunks)
  • react/ui-components/src/atoms/BreadCrumb.js (1 hunks)
  • react/ui-components/src/atoms/CheckBox.js (5 hunks)
  • react/ui-components/src/atoms/InfoCard.js (3 hunks)
  • react/ui-components/src/atoms/MultiSelectDropdown.js (9 hunks)
  • react/ui-components/src/atoms/RadioButtons.js (5 hunks)
  • react/ui-components/src/atoms/Stepper.js (4 hunks)
  • react/ui-components/src/atoms/StringManipulator.js (1 hunks)
  • react/ui-components/src/atoms/TextInput.js (12 hunks)
  • react/ui-components/src/atoms/Timeline.js (1 hunks)
  • react/ui-components/src/atoms/Toast.js (3 hunks)
  • react/ui-components/src/atoms/Toggle.js (3 hunks)
  • react/ui-components/src/atoms/TreeSelect.js (2 hunks)
  • react/ui-components/src/atoms/index.js (2 hunks)
  • react/ui-components/src/hoc/FieldV1.js (9 hunks)
  • react/ui-components/src/hoc/stories/Checkbox.stories.js (2 hunks)
  • react/ui-components/src/hoc/stories/InfoCard.stories.js (6 hunks)
  • react/ui-components/src/hoc/stories/InputFields.stories.js (3 hunks)
  • react/ui-components/src/hoc/stories/Radio.stories.js (1 hunks)
  • react/ui-components/src/hoc/stories/Stepper.stories.js (3 hunks)
  • react/ui-components/src/hoc/stories/Timeline.stories.js (1 hunks)
  • react/ui-components/src/index.js (2 hunks)
  • react/ui-components/src/molecules/CustomDropdown.js (1 hunks)
Files skipped from review due to trivial changes (1)
  • react/libraries/src/services/atoms/urls.js
Additional comments not posted (67)
react/css/src/digitv2/components/headerV2.scss (1)

5-10: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-13]

Ensure the removal of the mobile-specific margin does not negatively impact the layout on mobile devices.

react/ui-components/src/hoc/stories/Stepper.stories.js (2)

1-1: Ensure the addition of useState is correctly utilized for state management in the Stepper stories.


15-17: Verify that the reorganization of props and the updates to currentStep, onStepClick, totalSteps, and customSteps props align with the intended functionality of the Stepper component.

Verification successful

The examination of the Stepper.stories.js and Stepper.js files confirms that the reorganization of props and the updates to currentStep, onStepClick, totalSteps, and customSteps props align with the intended functionality of the Stepper component. The Storybook configuration accurately reflects the dynamic behavior and usage of these props within the component, ensuring that the Stepper component's functionality is correctly demonstrated and tested in the Storybook environment.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Suggestion to manually verify the functionality of the updated Stepper stories.
echo "Manually verify the functionality of the updated Stepper stories."

Length of output: 140



Script:

#!/bin/bash
# Extract the relevant portions of the Stepper.stories.js file
fd "Stepper.stories.js" --exec cat {}

# Optionally, review the Stepper component's implementation to understand the usage of props
fd "Stepper.js" --exec cat {}

Length of output: 3773

react/ui-components/src/atoms/InfoCard.js (1)

23-31: Verify the functionality of the updated InfoCard component to ensure the integration of StringManipulator does not introduce any breaking changes or inconsistencies.

react/css/src/digitv2/components/infoCardV2.scss (1)

27-35: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [13-42]

Verify the visual presentation of the InfoCard component on various screen sizes to ensure the style adjustments enhance its appearance without negatively impacting the layout.

react/ui-components/src/atoms/Stepper.js (2)

4-4: The addition of StringManipulator import is correctly implemented.


62-72: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [54-69]

The updated class names for styling are well-named and follow a consistent naming convention.

react/css/src/digitv2/components/textareaV2.scss (2)

39-41: The hover effect adjustment with overflow-y: auto; is a good UX improvement for textareas.


99-103: The modifications to resizing behavior for .resize-smart class are correctly implemented and enhance the component's usability.

react/css/src/digitv2/components/radiobtnV2.scss (1)

60-72: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [4-82]

The styling adjustments for radio buttons, including flex properties, gap settings, alignment, and modifications to sizes and margins, are correctly implemented and enhance the component's visual presentation and usability.

react/ui-components/src/atoms/Toggle.js (2)

9-22: The improved formatting changes, including breaking long ternary operations into multiple lines and adjusting the calculation of maxLabelLength, enhance code readability and maintainability.


22-22: The dynamic width adjustment for the toggle component, ensuring a minimum width of 40px, is correctly implemented and enhances the component's usability.

react/ui-components/src/hoc/stories/InputFields.stories.js (2)

11-21: The restructuring of the options array for the type control, adding new options and adjusting formatting, is correctly implemented and enhances the configurability and usability of the storybook controls.


54-54: Ensure that the modifications to commonArgs in the storybook controls align with the intended functionality and usability improvements.

react/ui-components/src/atoms/CheckBox.js (3)

3-3: The addition of StringManipulator import is correctly implemented.


26-26: The introduction of sentenceCaseLabel for consistent label handling is correctly implemented.


58-70: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [46-81]

The replacement of direct label references with sentenceCaseLabel ensures consistent label presentation and is correctly implemented.

react/css/src/digitv2/components/timeline.scss (1)

1-140: The styling for the new digital timeline component is comprehensive and correctly implemented, covering layout, color, typography, and responsive design adjustments.

react/css/src/digitv2/components/stepper.scss (1)

22-47: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-151]

The renaming of CSS classes and the various style tweaks and adjustments in stepper.scss are correctly implemented, improving readability, maintainability, and the visual presentation of the stepper component.

react/ui-components/src/atoms/Toast.js (4)

38-38: Ensure StringManipulator is called correctly with its expected parameters and return type.


46-59: Verify the conditional rendering logic for error toasts to ensure it aligns with the intended design and functionality.


67-82: Double-check the conditional rendering for warning toasts, especially the handling of isWarningButtons and the display of custom buttons.


115-122: Confirm that the StringManipulator function is used correctly for both hideDetailsLabel and viewDetailsLabel transformations.

react/ui-components/src/atoms/RadioButtons.js (1)

50-56: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [34-72]

Validate the use of StringManipulator for transforming radio button labels, ensuring it aligns with the intended text manipulation logic.

react/ui-components/src/hoc/stories/Checkbox.stories.js (2)

8-14: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]

Confirm that the removal of label and value controls from argTypes aligns with the intended storybook configuration for the checkbox component.


8-14: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]

Ensure the adjustments to commonArgs by removing the value field do not impact the expected behavior of storybook stories for the checkbox component.

react/ui-components/src/atoms/Timeline.js (3)

17-40: Verify the implementation of responsive design logic for mobile view detection and ensure it functions as expected across different screen sizes.


79-79: Confirm that StringManipulator is used correctly for label transformation and matches the intended functionality.


116-122: Double-check the use of StringManipulator for transforming hideDetailsLabel and viewDetailsLabel, ensuring it aligns with the component's text manipulation requirements.

react/ui-components/src/molecules/CustomDropdown.js (1)

38-38: Ensure the modification of the style prop in the RadioButtons component aligns with the intended styling requirements and does not inadvertently remove necessary styles.

react/ui-components/src/hoc/stories/Timeline.stories.js (1)

1-1: Verify that the storybook configurations for the Timeline component accurately represent the intended use cases and visual representations for each variant.

react/css/src/digitv2/index.scss (1)

59-59: Confirm the inclusion of timeline.scss aligns with the project's styling conventions and that the file exists and contains the expected styles for the Timeline component.

react/css/src/digitv2/components/buttonsV2.scss (5)

23-25: Consider adding a comment explaining the purpose of the .icon-label-container:not(.link) selector.


158-158: Ensure consistent padding across all button types for a uniform look and feel.


188-188: Verify that the padding adjustment for .digit-button-link aligns with the design specifications.


195-195: Aligning text to the left within .digit-button-label might affect readability in certain layouts. Consider verifying this change with the UX team.


206-218: The changes to height, white-space, and word-break properties on hover might cause layout shifts. Test these changes across different browsers to ensure consistent behavior.

react/ui-components/src/index.js (1)

67-69: Ensure that the import paths for Timeline and StringManipulator are correct and that these components are properly exported from their respective files.

react/ui-components/src/atoms/TreeSelect.js (1)

90-97: Moving the isIntermediate function above the useEffect hook does not affect its functionality, but ensure that this rearrangement aligns with the component's logical structure and readability.

react/ui-components/src/atoms/index.js (1)

68-69: Ensure that the import paths for Timeline and StringManipulator are correct and that these components are properly exported from their respective files.

react/ui-components/src/hoc/stories/InfoCard.stories.js (6)

94-96: Disabling the variant control for InfoSuccess in the storybook is appropriate if the component's variant should not be changed in this context.


140-142: Disabling the variant control for InfoSuccessWithAdditionalElements ensures consistency in the storybook presentation.


151-153: Disabling the variant control for InfoWarning is suitable for maintaining the intended visual representation in the storybook.


197-199: Disabling the variant control for InfoWarningWithAdditionalElements helps in preserving the specific warning context in the storybook.


209-211: Disabling the variant control for InfoError is justified to keep the error representation consistent in the storybook.


254-256: Disabling the variant control for InfoErrorWithAdditionalElements ensures that the error context is clearly communicated in the storybook.

react/css/src/digitv2/components/textInputV2.scss (1)

106-107: LGTM! The changes correctly target empty and disabled date and time inputs to enhance the UI by hiding the webkit datetime edit.

react/ui-components/src/hoc/FieldV1.js (5)

52-53: The ternary expression simplification improves code readability.


71-79: The update to maxCharacters default value and the addition of a character count display enhance user feedback.


90-109: The enhanced error message handling using StringManipulator for truncation and case conversion is a good practice for consistent UI text presentation.


212-218: The streamlined variant assignment logic improves code readability and maintainability.


362-380: The conditional logic for label rendering enhances the component's flexibility and user interface.

react/ui-components/src/atoms/MultiSelectDropdown.js (6)

74-74: The updated filtering logic for options based on the search query enhances the component's usability.


89-89: Ensure that the logic for handling selection and deselection of options, including parent options in tree structures, is thoroughly tested for edge cases.


145-145: The function to count final child options in the selected state is a useful addition for displaying selected counts in the UI.


225-231: The mouse event handling for menu items improves the user experience by providing visual feedback.


269-271: Ensure that the rendering logic for options handles empty or undefined optionsToRender gracefully to prevent runtime errors.


366-366: The styling for the "Clear All" button enhances the visual consistency of the component.

react/ui-components/src/atoms/TextInput.js (2)

216-220: Ensure consistency in CSS class naming conventions to improve maintainability and readability of the code.


433-436: Enhance the PropTypes definition for inputRef by specifying the expected type of elements it can refer to, ensuring type safety.

react/modules/sample/src/pages/employee/Sample.js (7)

32-85: Ensure that the images used in additionalElementsforTimeline have appropriate alt text for accessibility and SEO purposes. Consider using more descriptive alt text than "Additional Element X".


96-132: Similar to the previous comment, ensure that the images used in additionalElementsforInfoCard have appropriate alt text for accessibility and SEO purposes.


217-227: For buttons with icons, ensure that the icons are accessible by providing an aria-label attribute or equivalent method to describe the button's action to screen reader users.


232-233: When disabling a button, consider providing feedback to the user explaining why the action is unavailable to improve the user experience.


237-255: Review the button labels for length and clarity, especially for buttons with very long labels. Consider simplifying the labels or providing tooltips for additional context.


488-517: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [478-492]

When adding additionalElements to InfoCard, ensure that these elements are relevant and enhance the information being presented to the user.


495-514: Validate the use of inline={false} in Timeline components. If inline is not a supported prop or if its default value is false, this prop can be omitted for cleaner code.

@@ -10,7 +10,7 @@ import {
MultiSelectDropdown,
MobileNumber,
InputTextAmount,
Stepper,
StringManipulator,
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The verification process has revealed that not all references to Stepper have been updated across the project. References to Stepper still exist in index files, story files, the component itself, and its usage in other components, indicating inconsistency with the intended update to StringManipulator.

Analysis chain

Ensure that all references to the Stepper component have been updated to StringManipulator across the project to maintain consistency.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Search for any remaining references to `Stepper` that should be updated.
rg --type js "Stepper"

Length of output: 878

@@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import { SVG } from "./SVG";
import Button from "./Button";
import StringManipulator from "./StringManipulator";
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider importing StringManipulator with curly braces if it's a named export.

- import StringManipulator from "./StringManipulator";
+ import { StringManipulator } from "./StringManipulator";

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import StringManipulator from "./StringManipulator";
import { StringManipulator } from "./StringManipulator";

@@ -1,6 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import isEqual from "lodash/isEqual";
import StringManipulator from "./StringManipulator";
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure StringManipulator is imported correctly as a named export.

- import StringManipulator from "./StringManipulator";
+ import { StringManipulator } from "./StringManipulator";

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import StringManipulator from "./StringManipulator";
import { StringManipulator } from "./StringManipulator";

Comment on lines 1 to 3
import React, { useState } from "react";
import { SVG } from "./SVG";
import StringManipulator from "./StringManipulator";
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure StringManipulator is imported correctly as a named export.

- import StringManipulator from "./StringManipulator";
+ import { StringManipulator } from "./StringManipulator";

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import React, { useState } from "react";
import { SVG } from "./SVG";
import StringManipulator from "./StringManipulator";
import React, { useState } from "react";
import { SVG } from "./SVG";
import { StringManipulator } from "./StringManipulator";

@@ -20,6 +20,7 @@ const DigitUIWrapper = ({ stateCode, enabledModules, moduleReducers, defaultLand
}

const i18n = getI18n();
const data=getStore(initData, moduleReducers(initData)) || {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure the data variable is used correctly within the Provider store prop to avoid redundancy.

- const data=getStore(initData, moduleReducers(initData)) || {};
  return (
-   <Provider store={getStore(initData, moduleReducers(initData))}>
+   <Provider store={data}>

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const data=getStore(initData, moduleReducers(initData)) || {};
return (
<Provider store={data}>

@@ -1417,7 +1488,7 @@ export const newConfig = [
populators: {
name: "treedropdown-Error",
optionsKey: "name",
error: "Error!",
error: "This field is mandatory!",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure the error message is localized for internationalization support.

- populators: { name: "treedropdown-Error", error: "This field is mandatory!", required: true },
+ populators: { name: "treedropdown-Error", error: i18n.t("This field is mandatory!"), required: true },

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
error: "This field is mandatory!",
error: i18n.t("This field is mandatory!"),

@@ -1542,7 +1613,7 @@ export const newConfig = [
populators: {
name: "nestedtextdropdown-Error",
optionsKey: "name",
error: "Error!",
error: "This field is mandatory!",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure the error message is localized for internationalization support.

- populators: { name: "nestedtextdropdown-Error", error: "This field is mandatory!", required: true },
+ populators: { name: "nestedtextdropdown-Error", error: i18n.t("This field is mandatory!"), required: true },

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
error: "This field is mandatory!",
error: i18n.t("This field is mandatory!"),

@@ -1701,7 +1772,7 @@ export const newConfig = [
populators: {
name: "profiledropdown-Error",
optionsKey: "name",
error: "Error!",
error: "This field is mandatory!",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure the error message is localized for internationalization support.

- populators: { name: "profiledropdown-Error", error: "This field is mandatory!", required: true },
+ populators: { name: "profiledropdown-Error", error: i18n.t("This field is mandatory!"), required: true },

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
error: "This field is mandatory!",
error: i18n.t("This field is mandatory!"),

Comment on lines 15 to 20
<li key={ci} style={props?.itemStyle} className="digit-bread-crumb--item">
<span onClick={() => window.history.back()}>{crumb.content}</span>
</li>
);
return (
<li key={ci} style={props?.style} className="digit-bread-crumb--item">
<li key={ci} style={props?.itemStyle} className="digit-bread-crumb--item">
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The verification process has revealed that the itemStyle prop is not being used in any of the identified instances of BreadCrumb across the application. This indicates that the suggestion to use itemStyle for consistent styling has not been implemented, confirming the validity of the review comment.

Analysis chain

Verify that all instances of BreadCrumb across the application are updated to use itemStyle for consistent styling.


Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Suggestion to manually verify the use of `itemStyle` in all instances of `BreadCrumb`.
echo "Manually verify the use of `itemStyle` in all instances of `BreadCrumb`."

Length of output: 290



Script:

#!/bin/bash
# Search for instances of `BreadCrumb` usage
rg "<BreadCrumb" --type js

Length of output: 509


Script:

#!/bin/bash
# Search for instances of `itemStyle` being passed to `BreadCrumb`
rg "<BreadCrumb.*itemStyle=" --type js

Length of output: 40

Comment on lines 48 to 52
StringManipulator.propTypes = {
functionName: PropTypes.func,
string: PropTypes.string,
props: PropTypes.object,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the prop type definition for functionName to correctly reflect its usage.

-  functionName: PropTypes.func,
+  functionName: PropTypes.string,

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
StringManipulator.propTypes = {
functionName: PropTypes.func,
string: PropTypes.string,
props: PropTypes.object,
};
StringManipulator.propTypes = {
functionName: PropTypes.string,
string: PropTypes.string,
props: PropTypes.object,
};

Copy link
Collaborator

@jagankumar-egov jagankumar-egov left a comment

Choose a reason for hiding this comment

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

@Swathi-eGov

i could not see any version change
ui componnent and css version has to be updated everywhere
and readme should be added

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 Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9167c8e and 18246f5.
Files ignored due to path filters (9)
  • react/css/package.json is excluded by !**/*.json
  • react/example/package.json is excluded by !**/*.json
  • react/modules/Project/package.json is excluded by !**/*.json
  • react/modules/core/package.json is excluded by !**/*.json
  • react/modules/sample/package.json is excluded by !**/*.json
  • react/package.json is excluded by !**/*.json
  • react/ui-components/package.json is excluded by !**/*.json
  • react/ui-components/yarn-error.log is excluded by !**/*.log, !**/*.log
  • react/yarn-error.log is excluded by !**/*.log, !**/*.log
Files selected for processing (1)
  • react/ui-components/README.md (1 hunks)
Additional comments not posted (2)
react/ui-components/README.md (2)

58-64: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [72-72]

Ensure the spelling of contributor names is correct to maintain the accuracy of the documentation.


61-61: The changelog is clear and concise, providing a straightforward history of changes.

Comment on lines 58 to 64
# Changelog

```bash
0.0.1-beta.4 fixed some date issues
0.0.3 Added new components
0.0.1 base version
```
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [2-2]

Consider starting the document title with an uppercase letter for consistency and professionalism.

- # digit-ui-components
+ # Digit-ui-components

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [18-18]

Add a comma for clarity in the sentence.

- This Package is more specific to DIGIT-UI's can be used across mission's
+ This Package is more specific to DIGIT-UI's, can be used across mission's

Copy link
Collaborator

@jagankumar-egov jagankumar-egov left a comment

Choose a reason for hiding this comment

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

@Swathi-eGov

version changes are not added in readme file of CSS?

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

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 18246f5 and 1e77899.
Files selected for processing (1)
  • react/css/README.md (1 hunks)
Additional comments not posted (1)
react/css/README.md (1)

45-45: The changelog is well-documented and provides clear version history and updates.

Comment on lines 42 to 48
# Changelog

```bash
1.8.2-coreui.3 styles for stepper and fixed date issue
1.8.0-beta.13 fixed the login text styling issue
1.8.0-beta.1 styles for login dropdown and homepage dropdowns
1.8.0-beta added workbench related css and some new Digit v2 constants based on em
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [3-3]

Please update the TODO comment to start with an uppercase letter and provide more context or remove it if it's no longer relevant.

- <!-- TODO: update this -->
+ <!-- TODO: Update this -->

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [20-20]

Consider rephrasing the sentence in the "Limitation" section for clarity and adding a comma for better readability.

- This Package is more specific to DIGIT-UI's can be used across mission's
+ This package is more specific to DIGIT-UI, but can be used across missions.

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [74-74]

Consider removing the duplicated phrase to enhance clarity in the "Published from DIGIT Core" section.

- ## Published from DIGIT Core Digit Core Repo
+ ## Published from DIGIT Core Repo

@jagankumar-egov jagankumar-egov merged commit d3fbd6e into develop Apr 4, 2024
1 check passed
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.

2 participants