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

Fix the Facilties tab overflow in Organization Layout #9778

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

AnveshNalimela
Copy link
Contributor

@AnveshNalimela AnveshNalimela commented Jan 6, 2025

Proposed Changes

@ohcnetwork/care-fe-code-reviewers
Screenshot from 2025-01-06 11-05-21
Screenshot from 2025-01-06 11-05-49

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

Summary by CodeRabbit

  • Internationalization

    • Added translation support for text in the Organizations view.
    • Replaced hardcoded strings with translatable text.
  • UI/UX Improvements

    • Enhanced layout responsiveness for organization cards and search input.
    • Adjusted padding and container widths for better visual consistency.
    • Updated the Menubar styling to occupy full width and height with horizontal overflow.

@AnveshNalimela AnveshNalimela requested a review from a team as a code owner January 6, 2025 05:36
Copy link
Contributor

coderabbitai bot commented Jan 6, 2025

Walkthrough

This pull request involves updates to the OrganizationLayout, FacilityOrganizationView, and OrganizationView components. The Menubar in OrganizationLayout has been styled to occupy the full width and height with horizontal overflow. The FacilityOrganizationView and OrganizationView components have integrated internationalization support using the t function for text translations and made layout adjustments for improved responsiveness.

Changes

File Change Summary
src/pages/Organization/components/OrganizationLayout.tsx Added className="w-full h-full overflow-x-auto" to <Menubar> for improved styling.
src/pages/FacilityOrganization/FacilityOrganizationView.tsx - Integrated t() for internationalization of text strings
- Updated search input container layout for responsiveness
- Adjusted padding and margins for layout consistency.
src/pages/Organization/OrganizationView.tsx - Updated organization child cards layout with flex-wrap
- Changed "View Details" button text to use t() for localization
- Added margin adjustments for better spacing.

Assessment against linked issues

Objective Addressed Explanation
Facilities Tab Overflow [#9775] Layout changes made, but it is unclear if they directly resolve the overflow issue on mobile views.

Possibly related PRs

Suggested labels

needs review

Suggested reviewers

  • rithviknishad
  • Jacobjeevan
  • bodhish

Poem

🐰 Hop, hop, through code's domain,
Styling and text, no longer plain!
Menubar flows, translations sing,
A rabbit's touch makes features wing! 🌈
Code evolves with playful might! 🚀


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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

netlify bot commented Jan 6, 2025

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit 3165de4
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/67863db3313fa40008bdedff
😎 Deploy Preview https://deploy-preview-9778--care-ohc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AnveshNalimela AnveshNalimela marked this pull request as draft January 6, 2025 05:37
@AnveshNalimela
Copy link
Contributor Author

Screenshot from 2025-01-06 11-18-20

Screenshot from 2025-01-06 11-18-45

@AnveshNalimela AnveshNalimela marked this pull request as ready for review January 6, 2025 06:13
@rithviknishad
Copy link
Member

let's improve this, something feels off about this.

image

@AnveshNalimela
Copy link
Contributor Author

let's improve this, something feels off about this.

image

image

@AnveshNalimela
Copy link
Contributor Author

Screenshot from 2025-01-06 12-10-25

@rithviknishad
Copy link
Member

the search field is too small in mobile screens now.

@rithviknishad
Copy link
Member

follow consistent designs with how it's there in other pages

@AnveshNalimela
Copy link
Contributor Author

@rithviknishad

Screenshot from 2025-01-07 17-31-59
Screenshot from 2025-01-07 17-32-23
Screenshot from 2025-01-07 17-33-03

@Jacobjeevan
Copy link
Contributor

Jacobjeevan commented Jan 9, 2025

Check multiple devices from the device list (browser) 👍

image

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

👋 Hi, @AnveshNalimela,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Jan 10, 2025
@Jacobjeevan
Copy link
Contributor

Check multiple devices from the device list (browser) 👍
image

The issue is still present btw.

@nihal467
Copy link
Member

@AnveshNalimela what is the status on this PR

@AnveshNalimela
Copy link
Contributor Author

@AnveshNalimela what is the status on this PR

@Nihal small chnages need to be done. Working on it

@AnveshNalimela
Copy link
Contributor Author

Check multiple devices from the device list (browser) 👍
image

The issue is still present btw.

@Jacobjeevan Confused with OrganizationView with facility OrganizationView. Updated the Changes . You can check now

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)
src/pages/Organization/OrganizationView.tsx (1)

Line range hint 47-56: Make search input width responsive.

The search field has a fixed width which might be too small on mobile screens, as noted in PR feedback. Consider making it more responsive:

-          <div className="w-72">
+          <div className="w-full sm:w-72">
🧹 Nitpick comments (1)
src/pages/Organization/OrganizationView.tsx (1)

92-93: Layout improvements look good, consider additional mobile optimizations.

The flex-wrap and margin adjustments help address the overflow issues. However, based on the PR feedback about mobile screens, consider adding responsive padding/margin classes to ensure optimal spacing across different screen sizes.

-                        <div className="flex items-center justify-between flex-wrap">
-                          <div className="space-y-1 mb-2">
+                        <div className="flex items-center justify-between flex-wrap gap-2 sm:gap-4">
+                          <div className="space-y-1 mb-2 sm:mb-3">
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4dd9abf and 3165de4.

📒 Files selected for processing (2)
  • src/pages/FacilityOrganization/FacilityOrganizationView.tsx (5 hunks)
  • src/pages/Organization/OrganizationView.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/FacilityOrganization/FacilityOrganizationView.tsx
🔇 Additional comments (1)
src/pages/Organization/OrganizationView.tsx (1)

113-113: Verify translation key exists.

Good job on internationalizing the "View Details" text. Let's ensure the translation key is properly defined.

✅ Verification successful

Translation key view_details is properly defined

The key exists in all language files with appropriate translations. ✅

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the "view_details" translation key in i18n files
rg -g '*.json' '"view_details"' public/locales/

Length of output: 105


Script:

#!/bin/bash
# First, find all JSON files that might contain translations
fd -e json

Length of output: 497


Script:

#!/bin/bash
# Search for "view_details" key in locale files
rg -g '*.json' '"view_details"' public/locale/

Length of output: 344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Facilties Tab overflow in Home page
4 participants