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

added shpicon in customsvgs #136

Merged
merged 2 commits into from
Oct 14, 2024
Merged

added shpicon in customsvgs #136

merged 2 commits into from
Oct 14, 2024

Conversation

Swathi-eGov
Copy link

No description provided.

Copy link

coderabbitai bot commented Oct 14, 2024

Walkthrough

The changes in this pull request involve updating the linked CSS stylesheet version from 0.0.2-beta.37 to 0.0.2-beta.38 across several HTML files. Additionally, a new SVG component named ShpIcon is introduced, and a new Storybook configuration for the BottomSheet component is created, which includes multiple story exports for various configurations.

Changes

File Path Change Summary
react/example/public/index.html Updated CSS stylesheet link from 0.0.2-beta.37 to 0.0.2-beta.38.
react/ui-components/.storybook/preview-head.html Updated CSS stylesheet link from 0.0.2-beta.37 to 0.0.2-beta.38.
react/ui-components/public/index.html Updated CSS stylesheet link from 0.0.2-beta.37 to 0.0.2-beta.38.
react/ui-components/src/atoms/CustomSVG.js Introduced new component ShpIcon that renders an SVG with a patterned rectangular background.
react/ui-components/src/molecules/stories/BottomSheet.stories.js Added new story file for BottomSheet with various configurations and states.

Possibly related PRs

  • css issue fix-updated css version for components #125: This PR also involves updating the CSS version for components, specifically mentioning the same CSS package @egovernments/digit-ui-components-css, which connects it directly to the changes in the main PR regarding the CSS stylesheet version update.
  • React component changes #126: Similar to the main PR, this PR includes an update to the CSS version in the index.html file, indicating a direct relationship with the changes made in the main PR.

Suggested reviewers

  • jagankumar-egov

Poem

🐰 In the garden of code, changes bloom bright,
CSS updated, a new version in sight.
A ShpIcon hops in, with patterns to show,
While BottomSheet stories begin to flow.
With each little tweak, our project takes flight,
Together we build, from morning till night! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 220279b and 33a3839.

📒 Files selected for processing (1)
  • react/ui-components/src/atoms/CustomSVG.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • react/ui-components/src/atoms/CustomSVG.js

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.

Copy link

@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 and nitpick comments (1)
react/ui-components/src/atoms/CustomSVG.js (1)

3-13: LGTM with suggestions for improvement

The ShpIcon component is implemented correctly and follows React best practices. However, consider the following improvements:

  1. Extract the base64-encoded image data to a separate file or use an external image source for better maintainability.
  2. Add PropTypes for type checking the className prop.

Example of adding PropTypes:

import PropTypes from 'prop-types';

// ... component implementation ...

ShpIcon.propTypes = {
  className: PropTypes.string
};
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between aa08933 and 220279b.

⛔ Files ignored due to path filters (6)
  • react/css/package.json is excluded by !**/*.json
  • react/example/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
📒 Files selected for processing (5)
  • react/example/public/index.html (1 hunks)
  • react/ui-components/.storybook/preview-head.html (1 hunks)
  • react/ui-components/public/index.html (1 hunks)
  • react/ui-components/src/atoms/CustomSVG.js (2 hunks)
  • react/ui-components/src/molecules/stories/BottomSheet.stories.js (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • react/ui-components/.storybook/preview-head.html
  • react/ui-components/public/index.html
🧰 Additional context used
🔇 Additional comments (6)
react/example/public/index.html (1)

12-12: CSS version update looks good, but verify compatibility.

The update of the CSS version from 0.0.2-beta.37 to 0.0.2-beta.38 seems correct. This change likely introduces new styles or fixes for the DIGIT UI components.

To ensure this change doesn't introduce any breaking changes or inconsistencies, please:

  1. Verify that this version update is consistent across all files in the project.
  2. Check the changelog for @egovernments/digit-ui-components-css to understand what changes are introduced in this version.
  3. Test the application thoroughly to ensure no visual regressions or unexpected behavior.

Run the following script to check for consistency across the project:

This script will help identify any inconsistencies in the CSS version across the project.

✅ Verification successful

CSS version update is consistent across the project.

All instances of @egovernments/digit-ui-components-css have been successfully updated to version 0.0.2-beta.38, ensuring consistency throughout the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency of CSS version across HTML files

# Test: Search for occurrences of digit-ui-components-css version
echo "Searching for digit-ui-components-css versions:"
rg --type html "digit-ui-components-css@[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+"

echo "Verifying consistency:"
rg --type html "digit-ui-components-css@0\.0\.2-beta\.38" | wc -l

Length of output: 593

react/ui-components/src/molecules/stories/BottomSheet.stories.js (4)

1-27: LGTM: Imports and Storybook configuration are well-structured.

The imports are appropriate for the BottomSheet component stories. The Storybook configuration in the default export is comprehensive, covering all necessary props with proper control types.


29-37: LGTM: Template and commonArgs are well-defined.

The Template function and commonArgs object follow best practices for Storybook stories. This setup promotes consistency across stories and reduces code duplication.


61-94: LGTM: Basic state stories are well-structured and comprehensive.

The stories for different BottomSheet states (Closed, Fixed, Quarter, Intermediate, and Full) are implemented consistently and cover all possible initial states. The use of Template.bind({}) and spreading commonArgs promotes code reuse and maintainability.


96-139: LGTM: Stories with actions are comprehensive and consistent.

The stories for BottomSheet states with actions enabled are well-implemented. They maintain consistency with the basic state stories while adding the enableActions prop and actions array. This set of stories ensures good coverage of the component's functionality with actions.

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

3564-3565: LGTM: Correct export of the new component

The ShpIcon component is correctly added to the existing export object, maintaining consistency with other components in the file.

@jagankumar-egov
Copy link
Collaborator

add svgs only into svg library

@jagankumar-egov jagankumar-egov merged commit 90b0f96 into develop Oct 14, 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