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

Dpg 2385 #75

Merged
merged 4 commits into from
May 31, 2024
Merged

Dpg 2385 #75

merged 4 commits into from
May 31, 2024

Conversation

Swathi-eGov
Copy link
Contributor

No description provided.

Copy link
Contributor

coderabbitai bot commented May 31, 2024

Walkthrough

The recent updates primarily focus on enhancing the Panel component's success animation across various files. This includes styling adjustments in the CSS and SCSS files, version updates in HTML, and conditional rendering logic in JavaScript. Additionally, the Stepper component has been streamlined by removing unnecessary code, and storybook files for animations have been refined for better control and display.

Changes

File Path Change Summary
react/css/README.md Updated to include changes in Panel success animation styles for version 1.8.2-coreui.23.
react/css/src/digitv2/components/panels.scss Adjusted styling for success and error states, including padding and background color adjustments.
react/example/public/index.html Updated stylesheet version to 1.8.2-coreui.23 for @egovernments/digit-ui-css.
react/ui-components/README.md Documented update to Panel success animation in version 0.0.1-beta.32.
react/ui-components/src/atoms/Panels.js Added conditional rendering for props.type and props.showAsSvg, and updated class names for styling.
react/ui-components/src/atoms/Stepper.js Removed commented-out code and adjusted initialization of isMobileView based on aspect ratio.
react/ui-components/src/hoc/stories/Animation.stories.js Updated Template function, control structures, and component usage for success and error animations.

Poem

In the code where panels gleam,
Success now flows like a dream.
With padding snug and colors bright,
Animations dance in pure delight.
Step by step, we clear the way,
For a smoother, brighter display.
🎨✨


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.
    • @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 as 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.

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/schema.v2.json

Documentation and Community

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range and nitpick comments (3)
react/ui-components/src/atoms/Stepper.js (2)

Line range hint 69-77: Ensure accessibility by pairing mouse events with corresponding keyboard events in interactive elements.

+ onKeyUp={handleKeyUp}

Line range hint 108-112: JSX elements without children should be self-closing to improve readability and maintain consistency.

- <span className={`stepper-connect ${((index < currentStep - 1) || (index < activeSteps && index < activeSteps - 1 ) ) && "active"} ${direction ? direction : ""}`}></span>
+ <span className={`stepper-connect ${((index < currentStep - 1) || (index < activeSteps && index < activeSteps - 1 ) ) && "active"} ${direction ? direction : ""}`} />
react/ui-components/src/atoms/Panels.js (1)

Line range hint 99-133: Refactor JSX to use self-closing tags and simplify boolean expressions.

-            <SVG.CheckCircleOutline
-              fill={"#FFFFFF"}
-              width={width}
-              height={height}
-            ></SVG.CheckCircleOutline>
+            <SVG.CheckCircleOutline fill={"#FFFFFF"} width={width} height={height} />
-            <Animation
-              animationData={successAnimation}
-              width={width}
-              height={width}
-              loop={props?.animationProps?.loop === true ? true : false}
-              autoplay={props?.animationProps?.noAutoplay === true ? false : true}
-            ></Animation>
+            <Animation
+              animationData={successAnimation}
+              width={width}
+              height={width}
+              loop={props?.animationProps?.loop}
+              autoplay={!props?.animationProps?.noAutoplay}
+            />
-            <SVG.ErrorOutline
-              fill={"#FFFFFF"}
-              width={width}
-              height={height}
-            ></SVG.ErrorOutline>
+            <SVG.ErrorOutline fill={"#FFFFFF"} width={width} height={height} />
-            <Animation
-              animationData={errorAnimation}
-              width={width}
-              height={height}
-              loop={props?.animationProps?.loop === true ? true : false}
-              autoplay={props?.animationProps?.noAutoplay === true ? false : true}
-            ></Animation>
+            <Animation
+              animationData={errorAnimation}
+              width={width}
+              height={height}
+              loop={props?.animationProps?.loop}
+              autoplay={!props?.animationProps?.noAutoplay}
+            />
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e1115bd and f8282a2.

Files ignored due to path filters (8)
  • 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/src/animations/success.json is excluded by !**/*.json
Files selected for processing (7)
  • react/css/README.md (1 hunks)
  • react/css/src/digitv2/components/panels.scss (2 hunks)
  • react/example/public/index.html (1 hunks)
  • react/ui-components/README.md (1 hunks)
  • react/ui-components/src/atoms/Panels.js (2 hunks)
  • react/ui-components/src/atoms/Stepper.js (1 hunks)
  • react/ui-components/src/hoc/stories/Animation.stories.js (1 hunks)
Additional context used
LanguageTool
react/css/README.md

[uncategorized] ~20-~20: Possible missing comma found.
Context: ...it UI's ``` ## Usage After adding the dependency make sure you have this dependency in ...


[grammar] ~94-~94: This phrase is duplicated. You should probably use “DIGIT Core” only once.
Context: ...ishnakole-wtt-egov] ## Published from DIGIT Core Digit Core Repo (https://github.com/egovernments/D...

Markdownlint
react/css/README.md

92-92: Expected: 0 or 2; Actual: 1
Trailing spaces


94-94: Expected: 0 or 2; Actual: 1
Trailing spaces


42-42: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines


90-90: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines


94-94: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


41-41: null
Fenced code blocks should be surrounded by blank lines


89-89: null
Fenced code blocks should be surrounded by blank lines


95-95: null
Bare URL used


99-99: null
Files should end with a single newline character

react/ui-components/README.md

43-43: Expected: 0 or 2; Actual: 1
Trailing spaces


98-98: Expected: 0 or 2; Actual: 1
Trailing spaces


57-57: Expected: 1; Actual: 2
Multiple consecutive blank lines


107-107: Expected: 1; Actual: 2
Multiple consecutive blank lines


108-108: Expected: 1; Actual: 3
Multiple consecutive blank lines


128-128: Expected: 1; Actual: 2
Multiple consecutive blank lines


147-147: Expected: 1; Actual: 2
Multiple consecutive blank lines


42-42: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines


101-101: null
Fenced code blocks should be surrounded by blank lines


115-115: null
Fenced code blocks should be surrounded by blank lines


119-119: null
Fenced code blocks should be surrounded by blank lines


121-121: null
Fenced code blocks should be surrounded by blank lines


131-131: null
Bare URL used


139-139: null
Bare URL used

Biome
react/ui-components/src/atoms/Stepper.js

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


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


[error] 45-45: This hook specifies more dependencies than necessary: activeSteps


[error] 72-72: Avoid using the index of an array as key property in an element.

react/ui-components/src/atoms/Panels.js

[error] 47-50: This else clause can be omitted because previous branches break early.


[error] 73-73: Useless case clause.


[error] 83-83: Useless case clause.


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


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


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


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


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


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


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


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


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

Additional comments not posted (7)
react/example/public/index.html (1)

12-12: Updated stylesheet link to version 1.8.2-coreui.23 aligns with the changelog updates.

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

28-42: Updated Template function with additional styling properties enhances the visual presentation.


55-55: Updated animation data for SuccessAnimation and ErrorAnimation components aligns with the new animation assets.

Also applies to: 61-61

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

5-21: Updated SCSS for .digit-panel-wrapper improves responsiveness and visual consistency across different screen sizes.

Also applies to: 25-38, 50-62, 66-79

react/css/README.md (1)

45-45: Updated changelog reflects the new version 1.8.2-coreui.23 and associated style updates.

react/ui-components/README.md (1)

61-61: Updated changelog in react/ui-components/README.md accurately reflects the new features and enhancements.

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

96-96: LGTM! Dynamic class name adjustment enhances component flexibility.

@jagankumar-egov jagankumar-egov merged commit 96416c1 into develop May 31, 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