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

User download file #1531

Merged
merged 40 commits into from
Oct 16, 2024
Merged

User download file #1531

merged 40 commits into from
Oct 16, 2024

Conversation

abishekTa-egov
Copy link
Collaborator

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

Some css changes for user-management-screen

Summary by CodeRabbit

  • New Features

    • Updated CSS stylesheet version to enhance styling and functionality.
    • Included the HCM Workbench module.
  • Bug Fixes

    • Corrected CSS properties for better display and layout of elements.

Copy link
Contributor

coderabbitai bot commented Oct 16, 2024

📝 Walkthrough

Walkthrough

This pull request includes updates to the index.html files in two locations, changing the linked CSS stylesheet version of @egovernments/digit-ui-css from earlier versions to 1.0.81-campaign. Additionally, modifications are made to the microplan.scss file, adjusting CSS properties for specific classes to enhance layout and visibility.

Changes

File Change Summary
health/micro-ui/web/micro-ui-internals/example/public/index.html Updated stylesheet link from 1.0.80-campaign to 1.0.81-campaign.
health/micro-ui/web/public/index.html Updated stylesheet link from 1.0.79-campaign to 1.0.81-campaign. Includes HCM Workbench module.
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss Modified .dm-code class properties and updated margin-bottom and font-size in .dm-audit-info11.

Possibly related PRs

  • css fix #1374: Updates the stylesheet link for @egovernments/digit-ui-css in micro-ui/web/public/index.html.
  • css fix  #1399: Similar stylesheet link update for @egovernments/digit-ui-css in micro-ui/web/public/index.html.
  • bug fixes for sandbox #1439: Updates the stylesheet link for @egovernments/digit-ui-css in micro-ui/web/micro-ui-internals/example/public/index.html.
  • Sandbox UI fixes #1442: Related stylesheet link update in micro-ui/web/public/index.html.
  • SN 261 #1460: Similar stylesheet link update for @egovernments/digit-ui-css in micro-ui/web/public/index.html.
  • updated versions #1469: Updates the stylesheet link for @egovernments/digit-ui-components-css in micro-ui/web/micro-ui-internals/example/public/index.html.
  • HCMPRE-700, HCMPRE-701 and HCMPRE-741 #1471: Updates the stylesheet link for @egovernments/digit-ui-css in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • Mp assumptions #1477: Updates the stylesheet link for @egovernments/digit-ui-css in both health/micro-ui/web/micro-ui-internals/example/public/index.html and health/micro-ui/web/public/index.html.
  • User management screen #1496: Updates the stylesheet link for @egovernments/digit-ui-css in health/micro-ui/web/public/index.html.
  • User Token cache remove for multiroottenant and css fix #1506: Updates the stylesheet link for @egovernments/digit-ui-css in micro-ui/web/public/index.html.
  • User download file #1529: Updates the stylesheet link for @egovernments/digit-ui-css in both health/micro-ui/web/micro-ui-internals/example/public/index.html and health/micro-ui/web/public/index.html.

Suggested reviewers

  • nipunarora-eGov
  • jagankumar-egov

Poem

🐇 In the meadow where bunnies play,
A stylesheet update brightens the day.
From 1.0.80 to 1.0.81,
Our code hops forward, oh what fun!
With styles so fresh, we dance and cheer,
A new version's here, let’s spread the cheer! 🌼


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
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 comments (2)
health/micro-ui/web/micro-ui-internals/example/public/index.html (1)

Confirmed Issue: Multiple Versions of @egovernments/digit-ui-css Linked

The verification process has confirmed that multiple versions of @egovernments/digit-ui-css are linked in the following files:

Implications:

  1. CSS Conflicts: Multiple versions can override each other's styles unpredictably.
  2. Inconsistent Styling: The application may exhibit inconsistent UI elements across different components or pages.
  3. Increased Load Time: Loading multiple CSS files can negatively impact the application's performance.

Recommendations:

  • Consolidate CSS Imports:
    • Identify the most appropriate version required for the current implementation.
    • Remove redundant or outdated CSS imports.
  • Modularize Styling:
    • If different versions are necessary for specific features, isolate them within their respective components to minimize conflicts.
🔗 Analysis chain

Line range hint 15-24: Potential issue: Multiple versions of CSS library linked

There are multiple versions of @egovernments/digit-ui-css linked in this file:

  1. 1.8.2-beta.34
  2. 1.8.0-alpha.6
  3. 1.0.81-campaign (newly updated)
  4. 1.0.50-microplan

Additionally, there's a link to @egovernments/digit-ui-components-css version 0.0.2-beta.36.

This setup can lead to:

  1. CSS conflicts
  2. Inconsistent styling
  3. Unexpected behavior due to style overrides
  4. Increased load time due to multiple CSS file downloads

Consider consolidating these CSS imports:

  1. Determine which version is actually needed for your current implementation.
  2. Remove unnecessary imports.
  3. If different versions are required for specific features, consider using more specific selectors or separate them into different components/pages.

Example cleanup:

-  <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" />
-  <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" />
-  <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />

To help identify which CSS versions are actually being used:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for CSS class usage across the project to determine which versions are necessary

# Test: Search for CSS classes from different versions
rg -i 'class=|className=' --type html --type jsx --type tsx | sort | uniq

Length of output: 109


Script:

#!/bin/bash
# Description: Retry searching for CSS class usage across the project using file extensions.

rg -i 'class=|className=' -g "*.html" -g "*.jsx" -g "*.tsx" | sort | uniq

Length of output: 75


Script:

#!/bin/bash
# Description: Locate all instances of @egovernments/digit-ui-css with their versions across the codebase.

# Search for @egovernments/digit-ui-css@<version> in HTML, JSX, TSX, and CSS files
rg '@egovernments/digit-ui-css@([0-9]+\.[0-9]+\.[a-zA-Z0-9\.-]+)' -g "*.html" -g "*.jsx" -g "*.tsx" -g "*.css" --only-matching | sort | uniq

Length of output: 1147

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

Line range hint 124-131: Fix syntax errors in .dm-audit-info11 class

There are two issues in the .dm-audit-info11 class that need to be addressed:

  1. The values for margin-bottom and font-size are incorrectly enclosed in quotes. In CSS, numeric values and units should not be quoted.
  2. These new properties are added at the end of the ruleset, which is unconventional and may lead to confusion.

Please apply the following changes:

.dm-audit-info11 {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #C84C0E;
-  margin-bottom: "1rem";
-  font-size: "0.875rem"
+  margin-bottom: 1rem;
+  font-size: 0.875rem;
}

This will correct the syntax errors and improve code readability by placing the new properties in a more conventional order.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between f6da599 and 044b619.

⛔ Files ignored due to path filters (1)
  • health/micro-ui/web/micro-ui-internals/packages/css/package.json is excluded by !**/*.json
📒 Files selected for processing (3)
  • health/micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (1 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
🧰 Additional context used
🔇 Additional comments (3)
health/micro-ui/web/micro-ui-internals/example/public/index.html (2)

Line range hint 1-41: Suggestion: Clean up commented code

The HTML structure is correct, but there are several commented-out <link> and <script> tags throughout the file. While comments can be useful for documentation, excessive commented-out code can clutter the file and make maintenance more difficult.

Consider cleaning up the file by removing unnecessary comments:

  1. Remove commented-out CSS links if they are no longer needed.
  2. Remove the commented-out script tag for globalConfigs.js if it's not going to be used.
  3. If these comments are retained for a specific reason (e.g., for quick switching between configurations), consider adding explanatory comments to clarify their purpose.

Example cleanup:

-  <!-- <link
-    rel="stylesheet"
-    href="https://unpkg.com/@egovernments/[email protected]/dist/index.css"
-  /> -->

-  <!-- added below css for hcm-workbench module inclusion-->
-  <!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" /> -->

-  <!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css/dist/index.css"/> -->
-  <!-- <script src="https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js"></script> -->

To help identify which commented elements might still be relevant:

#!/bin/bash
# Description: Search for usage of commented-out CSS versions or scripts in other parts of the project

# Test: Search for references to commented-out CSS versions or scripts
rg -i '1.8.0-alpha.6|1.5.41|globalConfigs.js' --type html --type jsx --type tsx

21-21: Approved: CSS library version update

The update of @egovernments/digit-ui-css from version 1.0.80-campaign to 1.0.81-campaign is noted. This change aligns with the PR objectives mentioning CSS changes.

To ensure this update doesn't introduce any unintended side effects, please verify:

  1. The changes introduced in this new version.
  2. The compatibility of these changes with your current implementation.
health/micro-ui/web/micro-ui-internals/packages/css/src/components/microplan.scss (1)

114-117: Improved text display and layout for .dm-code

These changes effectively address potential issues with text overflow and layout:

  1. max-width: 100% allows full width utilization, preventing unnecessary constraints.
  2. display: block ensures each item appears on a new line, improving readability.
  3. white-space: normal allows text to wrap, preventing horizontal overflow.
  4. overflow: visible ensures no content is cut off.

These modifications will enhance the readability and prevent content from being hidden or truncated.

health/micro-ui/web/public/index.html Show resolved Hide resolved
@abishekTa-egov abishekTa-egov merged commit c56553d into console Oct 16, 2024
3 checks passed
@abishekTa-egov abishekTa-egov deleted the user-download-file branch October 16, 2024 09:56
@coderabbitai coderabbitai bot mentioned this pull request Nov 12, 2024
This was referenced Nov 20, 2024
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