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

Home page break issue fix, landing page css fix #1487

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

nabeelmd-eGov
Copy link
Contributor

@nabeelmd-eGov nabeelmd-eGov commented Oct 9, 2024

Summary by CodeRabbit

  • New Features

    • Added a configuration button in the Role-Based Employee Home component for enhanced user interaction.
  • Improvements

    • Enhanced visual layout and responsiveness of the sandbox component with updated SCSS styles.
    • Adjusted dimensions of the tick mark in the ViewUrl component for better UI representation.
  • Bug Fixes

    • Updated stylesheet link to the latest version for improved styling consistency.

@nabeelmd-eGov nabeelmd-eGov requested a review from a team as a code owner October 9, 2024 12:21
Copy link
Contributor

coderabbitai bot commented Oct 9, 2024

📝 Walkthrough

Walkthrough

The pull request introduces several modifications across different components in the micro-ui project. Key changes include updates to SCSS styles for the sandbox component, enhancements to the RoleBasedEmployeeHome component by adding a configuration button, adjustments to the ViewUrl component's tick mark dimensions, and an update to the stylesheet link in the index.html file. These changes collectively improve the layout, functionality, and visual presentation of the affected components.

Changes

File Change Summary
micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss Adjusted margin properties, defined new classes, modified existing classes for layout and typography, and added media queries for responsiveness.
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js Added Button and LandingPageWrapper imports, enhanced component logic to include a configuration button, and wrapped children in LandingPageWrapper.
micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ViewUrl/index.js Changed dimensions of SVG.TickMark component from height 40 to 30 and width 60 to 70.
micro-ui/web/public/index.html Updated stylesheet link for @egovernments/digit-ui-css from version 1.8.2-beta.39 to 1.8.2-beta.40.

Possibly related PRs

  • css fix  #1399: Modifies the sandbox.scss file, adding new styles and rules that may interact with the changes made in the main PR.
  • sandbox enhancement #1411: Updates the sandbox.scss file, introducing new classes and modifying existing ones related to the sandbox component.
  • CSS Issue fix, locaisation/mdms cache issue fix  #1418: Includes updates to the sandbox.scss file, focusing on styles that could affect the layout and visual consistency of the sandbox component.
  • Sandbox UI fixes #1442: Makes modifications to the sandbox.scss file, including media queries and new styles that enhance responsiveness.
  • CSS Issue fix #1446: Introduces additional styles in the sandbox.scss file that may complement the changes made in the main PR.
  • Upload api update #1449: Includes extensive modifications to the sandbox.scss file, focusing on layout and styling enhancements related to the main PR.
  • fixes #1466: Updates the sandbox.scss file with new styles and adjustments impacting the overall design and layout of the sandbox component.
  • updated versions #1469: Updates the stylesheet links in index.html, ensuring that the latest styles are applied.
  • HCMPRE-700, HCMPRE-701 and HCMPRE-741 #1471: Updates the stylesheet links in index.html, relating to the main PR by ensuring the latest styles are utilized.

Suggested reviewers

  • jagankumar-egov

Poem

🐇 In the sandbox where bunnies play,
Styles are spruced in a cheerful way.
Buttons added, tick marks resized,
With each change, our joy is amplified!
Hopping through code, we dance and cheer,
For a polished UI that brings us near! 🌼


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

🧹 Outside diff range comments (1)
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (1)

Line range hint 91-110: Consider using dynamic icon for LandingPageCard.

The icon prop in LandingPageCard is currently set to a hardcoded value "SupervisorAccount". Consider using the icon from moduleData for consistency.

Here's a suggested fix:

 const propsForModuleCard = {
-  icon: "SupervisorAccount",
+  icon: moduleData?.icon || "SupervisorAccount",
   moduleName: t(moduleData?.label),
   // ... rest of the props
 };

This change will use the icon from moduleData if available, falling back to "SupervisorAccount" if not.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 0011669 and 3a5c137.

⛔ Files ignored due to path filters (1)
  • micro-ui/web/micro-ui-internals/packages/css/package.json is excluded by !**/*.json
📒 Files selected for processing (4)
  • micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (1 hunks)
  • micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ViewUrl/index.js (1 hunks)
  • micro-ui/web/public/index.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (1)

Pattern **/*.js: check

micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ViewUrl/index.js (1)

Pattern **/*.js: check

🔇 Additional comments (9)
micro-ui/web/public/index.html (1)

10-10: CSS package version update looks good.

The update of the @egovernments/digit-ui-css package from version 1.8.2-beta.39 to 1.8.2-beta.40 aligns with the PR objective of fixing the landing page CSS. This minor version bump suggests that it likely includes bug fixes or small improvements.

To ensure that this CSS update doesn't introduce any breaking changes or unexpected behavior, please run the following verification steps:

After running these verification steps, please ensure:

  1. The new CSS version exists and is accessible.
  2. There isn't a significant unexpected change in file size.
  3. No other files are still referencing the old CSS version.

If any issues are found, please address them before merging this PR.

micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ViewUrl/index.js (1)

36-36: LGTM! Verify visual appearance.

The change to the SVG.TickMark dimensions (height: 30, width: 70) looks good. This adjustment will make the tick mark shorter and wider, which may improve its visual appearance or fit better within the layout.

Please verify that this change achieves the desired visual effect in the UI. Consider the following:

  1. Does the new size of the tick mark align well with other elements in the component?
  2. Is the tick mark clearly visible and not distorted?
  3. Does this change maintain consistency with similar icons or visual elements across the application?
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/RoleBasedEmployeeHome.js (3)

2-2: LGTM: New imports added correctly.

The addition of Button and LandingPageWrapper imports from @egovernments/digit-ui-components is appropriate for the changes made in the component.


Line range hint 73-89: LGTM: Improved sorting logic and multi-root tenant handling.

The addition of sorting logic for card modules and links based on mdmsOrderData enhances the component's flexibility. The condition for applying sorting only in multi-root tenant scenarios is a good optimization.


Line range hint 113-117: LGTM: Improved component structure with LandingPageWrapper.

The use of LandingPageWrapper to encapsulate the children improves the layout structure of the component. The React.Children.map with React.cloneElement is a good practice for modifying child elements.

micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/sandbox.scss (4)

100-100: Verify the impact of reduced margin on layout

The bottom margin for .sandbox-url-footer has been reduced from 3rem to 1rem. This change might affect the overall layout and spacing of the sandbox component.

Please confirm that this change doesn't negatively impact the visual appearance or cause any unintended layout shifts.


Line range hint 435-463: Review the new home wrapper layout

New styles have been added for the .homeWrapper class, implementing a flex layout for better organization of components. This change improves the layout of the home page, providing a clear separation between the main content and the quick setup component.

The implementation looks good, but please ensure that it's responsive and works well on different screen sizes.


Line range hint 701-793: Nice addition of loader and installation steps

The new styles for the sandbox loader and installation steps provide a visually appealing and informative user experience during the installation process. The use of animations and transitions enhances the overall look and feel.

Great job on implementing these visual enhancements. They should significantly improve the user experience during the installation process.


Line range hint 1-793: Overall assessment of sandbox.scss

The changes and additions to this SCSS file appear to enhance the user interface and experience of the sandbox component. The styles are well-organized, follow consistent naming conventions, and incorporate responsive design techniques.

Key improvements include:

  1. Adjusted layout for the home wrapper
  2. Addition of visually appealing loader and installation steps

While the changes look good overall, please ensure that:

  1. All new styles are thoroughly tested across different screen sizes and browsers
  2. The reduced margin for .sandbox-url-footer doesn't negatively impact the layout
  3. The animations and transitions perform well, even on lower-end devices

Great work on improving the sandbox component's styles. These changes should contribute to a better user experience.

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