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

resolved Appointments select practitioner options Bug: popover inconsistent spacing between options within the popover content #10636

Merged
merged 3 commits into from
Feb 17, 2025

Conversation

hrit2773
Copy link
Contributor

@hrit2773 hrit2773 commented Feb 16, 2025

…t spacing between the options bug

Proposed Changes

@ohcnetwork/care-fe-code-reviewers

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

  • Refactor
    • Enhanced the appointments page interface with a more structured and organized user selection menu.
    • Added extra practitioner type information alongside names for improved clarity.
    • Preserved the "show all" option to reset selection filters.

@hrit2773 hrit2773 requested a review from a team as a code owner February 16, 2025 17:29
Copy link
Contributor

coderabbitai bot commented Feb 16, 2025

Walkthrough

The pull request refactors the user selection interface in the AppointmentsPage component. It replaces the PopoverClose components with CommandItem components for a more structured user selection experience. The "show all" option is retained as a CommandItem that sets practitioner and slot query parameters to null. Additionally, user types are now displayed alongside names in the selection list, improving clarity while maintaining existing selection logic.

Changes

File Change Summary
src/pages/.../AppointmentsPage.tsx Refactored the user selection interface in the Popover by replacing PopoverClose components with CommandItem components. Displays user type alongside names; retains "show all" functionality.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant AP as AppointmentsPage
    participant P as Popover

    U->>AP: Open Appointments Page
    AP->>P: Render user selection list (with structured layout)
    U->>P: Click to open Popover
    P->>U: Display list of users with names & types
    U->>P: Select a user (or click "show all")
    P->>AP: Update practitioner and slot query parameters
    AP-->>U: Reflect selection in the interface
Loading

Possibly related PRs

Suggested labels

tested, reviewed

Suggested reviewers

  • rithviknishad
  • Jacobjeevan

Poem

I'm a rabbit with a hop and a code-filled cheer,
Seeing structured layouts make the UI clear.
Users and types join in a neat parade,
In every refactored line, improvements are displayed.
With every change, I dance with delight,
Hoping our code springs freshness, day and night!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8d67b1a and 73e6351.

📒 Files selected for processing (1)
  • src/pages/Appointments/AppointmentsPage.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/Appointments/AppointmentsPage.tsx
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Test
  • GitHub Check: OSSAR-Scan
  • GitHub Check: cypress-run (1)

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 Feb 16, 2025

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit 73e6351
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/67b2ea2d50ca9a00082cf953
😎 Deploy Preview https://deploy-preview-10636.preview.ohc.network
📱 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.

</CommandItem>
</PopoverClose>
))}
<div className="flex flex-col align-top">
Copy link
Member

@rithviknishad rithviknishad Feb 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what you've done is just a hack around instead of solving the root cause. the right way to solve this is to compose in this way without needing any extra div's or classes

<CommandItem key={...}>
  <PopoverClose className="flex items-center gap-2">
    ...
  </PopoverClose>
</CommandItem>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rithviknishad ohh you're right that will be better will change it

@rithviknishad rithviknishad added changes required invalid This doesn't seem right labels Feb 16, 2025
@hrit2773
Copy link
Contributor Author

@rithviknishad
Screenshot 2025-02-17 122144
I think now Its better what I did is I did not use any div tag as such just used popoverclose inside commandInput component as you mentioned and adjusted the class names no new tags

@github-actions github-actions bot added needs-triage question Further information is requested labels Feb 17, 2025
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

🧹 Nitpick comments (1)
package.json (1)

85-85: Clarify the local dependency path.
The new dependency "care_fe": "file:" has been added. Please verify that the local dependency reference is complete and correct. In many cases, a local dependency path should include a relative path (e.g., "file:./path/to/care_fe"), unless "file:" is intentionally used as a placeholder. Adding a brief inline comment for clarity could help future maintainers understand the intended structure.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4b8b031 and 3dfe21d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json (1 hunks)
  • src/pages/Appointments/AppointmentsPage.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/Appointments/AppointmentsPage.tsx
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Redirect rules - care-ohc
  • GitHub Check: Header rules - care-ohc
  • GitHub Check: Pages changed - care-ohc
  • GitHub Check: Test
  • GitHub Check: cypress-run (1)

@rithviknishad rithviknishad added tested and removed invalid This doesn't seem right question Further information is requested changes required needs-triage labels Feb 17, 2025
@rithviknishad rithviknishad merged commit 4ecd90a into ohcnetwork:develop Feb 17, 2025
14 of 15 checks passed
Copy link

@hrit2773 Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌

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

Successfully merging this pull request may close these issues.

Appointments Select Practitioner search UI Bug
2 participants