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

tenant logo css fix #1828

Merged
merged 2 commits into from
Nov 14, 2024
Merged

tenant logo css fix #1828

merged 2 commits into from
Nov 14, 2024

Conversation

Swathi-eGov
Copy link
Contributor

@Swathi-eGov Swathi-eGov commented Nov 14, 2024

Choose the appropriate template for your PR:

Summary by CodeRabbit

  • New Features

    • Updated health module styling to version 0.1.34, which may include new styles or fixes.
    • Enhanced logo styling in the top bar for improved visual presentation.
  • Bug Fixes

    • Resolved potential styling issues by updating CSS links across multiple HTML files.

@Swathi-eGov Swathi-eGov requested a review from a team as a code owner November 14, 2024 08:24
Copy link
Contributor

coderabbitai bot commented Nov 14, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request involve updates to CSS stylesheet links in two HTML files and the addition of a new CSS rule in a SCSS file. The stylesheet version for the health module has been incremented from 0.1.33 to 0.1.34 in both index.html files located in the micro-ui-internals/example/public and web/public directories. Additionally, a new CSS rule has been added to the facility.scss file to set the width of a logo element to fit-content.

Changes

File Change Summary
health/micro-ui/web/micro-ui-internals/example/public/index.html Updated stylesheet link from version 0.1.33 to 0.1.34.
health/micro-ui/web/public/index.html Updated stylesheet link from version 0.1.33 to 0.1.34.
health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/facility.scss Added new CSS rule for .digit-topbar .digit-logo-ulb-wrapper .digit-topbar-logo with width: fit-content !important;.

Possibly related PRs

  • css fix #1374: Updates the stylesheet link for the health module in micro-ui/web/public/index.html.
  • css fix  #1399: Similar update to the stylesheet link for the health module in micro-ui/web/public/index.html.
  • updated versions #1469: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • Mp assumptions #1477: Updates the stylesheet link for the health module in both health/micro-ui/web/micro-ui-internals/example/public/index.html and health/micro-ui/web/public/index.html.
  • Update table style and fixes #1637: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • resolved HCMPRE-1070,1073-910,1075 #1668: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • fixed facilitysearch issue #1697: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • fixed the flow and some ui/ux issues #1704: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • css of summary screen #1728: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • Console UI UX audit fixes #1746: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • css fixes #1792: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.
  • ui/ux fixes #1810: Updates the stylesheet link for the health module in health/micro-ui/web/micro-ui-internals/example/public/index.html.

Suggested reviewers

  • jagankumar-egov

🐰 In the garden, the CSS blooms,
A version change dispels the glooms.
With styles anew, the logo shines,
Fit-content now, in perfect lines.
Hopping along, we cheer and play,
For brighter UIs, hip-hip-hooray! 🌼


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

🧹 Outside diff range comments (1)
health/micro-ui/web/public/index.html (1)

Line range hint 8-13: Consider consolidating CSS dependencies to reduce HTTP requests.

The file loads multiple CSS files from the same package family with beta versions:

Consider:

  1. Bundling these CSS files together during build time to reduce HTTP requests
  2. Creating a strategy to move away from beta versions to stable releases
  3. Documenting the purpose of each CSS dependency to avoid style conflicts
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Reviewing files that changed from the base of the PR and between 51dbc45 and 4d42062.

⛔ 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/pages/employee/facility.scss (1 hunks)
  • health/micro-ui/web/public/index.html (1 hunks)
🔇 Additional comments (2)
health/micro-ui/web/public/index.html (1)

13-13: Verify the CSS version contains the tenant logo fix.

The version update from 0.1.33 to 0.1.34 should contain the tenant logo CSS fix mentioned in the PR title.

✅ Verification successful

CSS version update appears to contain the tenant logo fix

The git log shows a recent commit with message "tenant logo css fix" (b213dba), and the diff between versions 0.1.33 and 0.1.34 shows logo-related CSS changes, particularly in the .employeeCard .complaint-links-container .header .logo selector. These findings align with the PR's purpose.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the changes in the new CSS version

# Get the diff between versions to confirm logo-related changes
curl -s https://unpkg.com/@egovernments/[email protected]/dist/index.css > old.css
curl -s https://unpkg.com/@egovernments/[email protected]/dist/index.css > new.css
diff old.css new.css | grep -A 5 -B 5 "logo"

# Check if the package is published with the expected changes
curl -s https://registry.npmjs.org/@egovernments/digit-ui-health-css/0.1.34 | jq '.description,.time."0.1.34"'

Length of output: 657


Script:

#!/bin/bash
# Let's try a different approach to verify the logo-related changes

# Search for any CSS files in the repository that might contain logo styles
fd -e css -x grep -l "logo" {}

# Check for any recent commits mentioning logo fixes
git log --grep="logo" --since="3 months ago" --pretty=format:"%h %s"

# Look for any documentation or changelog entries about the logo fix
fd -e md -x grep -l "logo" {}

Length of output: 1224

health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/facility.scss (1)

216-217: 🧹 Nitpick (assertive)

Consider investigating the root cause of specificity issues

The need for !important suggests there might be competing styles with high specificity. Consider investigating:

  1. Which styles are being overridden
  2. If the original styles could be adjusted to avoid the override
  3. If the selector specificity alone could solve this without !important
✅ Verification successful

Let me gather more specific information about the styles affecting this logo element.


Let me check for any other files that might be defining styles for this component.


Let me check the complete styles in these specific files to understand the full styling context.


Based on the analysis of the CSS files, I can now provide a final response:

The use of !important here is justified and not a specificity issue

The !important declaration on the logo width is necessary because:

  1. The component is part of a design system where the topbar is styled globally in coreOverride.scss
  2. The facility.scss needs to override the base styles specifically for this use case
  3. The modification is intentional and scoped to this specific implementation
  • The override is properly scoped using the specific selector .digit-topbar .digit-logo-ulb-wrapper .digit-topbar-logo
  • The base styles are part of the core design system, making !important an appropriate solution for component variants
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for competing logo width styles
rg -l "digit-topbar-logo" | xargs rg "width|max-width|min-width"

Length of output: 798


Script:

#!/bin/bash
# Get full context of the styles for digit-topbar-logo
rg -B 3 -A 3 "digit-topbar-logo"

Length of output: 665


Script:

#!/bin/bash
# Search for all files containing digit-topbar or digit-logo styles
rg -l "digit-topbar|digit-logo" | grep -i "\.s?css$" | xargs rg "digit-(topbar|logo)"

Length of output: 453


Script:

#!/bin/bash
# Get the complete content of the relevant CSS files
echo "=== index.scss ==="
cat health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss
echo -e "\n=== coreOverride.scss ==="
cat health/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/coreOverride.scss

Length of output: 18723

@nipunarora-eGov nipunarora-eGov merged commit af070ec into console Nov 14, 2024
3 checks passed
@nipunarora-eGov nipunarora-eGov deleted the Tenant-Logo-Fix branch November 14, 2024 08:42
@coderabbitai coderabbitai bot mentioned this pull request Nov 15, 2024
This was referenced Nov 27, 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.

2 participants