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

Hide Create Button in questionnaire, as it's not yet wired #10433

Closed
wants to merge 2 commits into from

Conversation

nihal467
Copy link
Member

@nihal467 nihal467 commented Feb 5, 2025

Proposed Changes

  • Fixes #issue_number
  • Change 1
  • Change 2
  • More?

@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

  • New Features

    • Enhanced observation displays with improved formatting and loading text.
    • Improved dropdown interaction on the facility home page.
    • Added a dynamic component to enrich patient demographic details.
    • Updated encounter notes to show message times in a relative format.
  • Refactor

    • Adjusted questionnaire response updates to replace values instead of appending.
    • Removed the questionnaire creation button.
    • Simplified appointment cards by removing appointment type details.

@nihal467 nihal467 requested a review from a team as a code owner February 5, 2025 20:53
Copy link
Contributor

coderabbitai bot commented Feb 5, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request introduces several UI and utility updates across multiple components. The changes include updating the formatValue function usage in observation and questionnaire displays, modifying component properties such as the DropdownMenu’s modal prop, integrating a new plugin component in patient demography, and refining input handling in a questionnaire date-time field. Additional updates include dynamic date formatting in encounter notes, removal of outdated UI elements, and enhancements to type definitions for messages and plugin components.

Changes

File(s) Change Summary
src/components/.../ConsultationDetails/ObservationsList.tsx,
src/components/.../ConsultationDetails/QuestionnaireResponsesList.tsx
In ObservationsList.tsx, added an import for formatValue and replaced raw value display with formatValue(item.value.value, item.value_type); updated the loading text. In QuestionnaireResponsesList.tsx, updated the formatValue function to be exported.
src/components/.../QuestionTypes/DateTimeQuestion.tsx,
src/components/.../index.tsx (Questionnaire)
In DateTimeQuestion.tsx, modified the handleTimeChange function to replace existing values with the new dateTime value. In index.tsx, commented out the Button import and its usage, removing the new questionnaire creation button.
src/index.tsx,
src/pluginTypes.ts,
src/types/.../messages.ts
In src/index.tsx, updated the comment to clarify that environment variables are exposed for plugins. In pluginTypes.ts, added a new type for PatientDetailsTabDemographyGeneralInfoComponentType and updated SupportedPluginComponents. In messages.ts, enhanced the Message interface by adding created_date and modified_date, and updated the comment on the message property.
src/components/.../FacilityHome.tsx Updated the DropdownMenu component by adding the prop modal={false}, affecting its behavior.
src/components/.../PatientDetailsTab/Demography.tsx,
src/pages/Patient/index.tsx
In Demography.tsx, added an import and usage of PLUGIN_Component within the data array. In Patient/index.tsx, removed the block that displayed the appointment type in appointment cards.
src/pages/.../EncounterNotesTab.tsx Integrated dynamic relative date formatting for message timestamps using formatRelative from date-fns and removed the error toast from the message creation mutation’s error handling.

Possibly related PRs

Suggested labels

needs review, changes required

Suggested reviewers

  • rithviknishad
  • khavinshankar

Poem

I'm a hopping rabbit in a field of code,
Skipping through changes on this refreshing road.
Carrots of logic and lines crisp and neat,
I nibble on bugs until the updates are complete.
With a twitch of my nose and a joyful hop,
These new tweaks make our codebase pop!
🥕🐇


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 5, 2025

Deploy Preview for care-ohc failed.

Name Link
🔨 Latest commit 34f43c9
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/67a3cfcc84524f00087d0e29

@nihal467 nihal467 changed the base branch from develop to staging February 5, 2025 20:54
Copy link

cloudflare-workers-and-pages bot commented Feb 5, 2025

Deploying care-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2ee5ef2
Status: ✅  Deploy successful!
Preview URL: https://a194813c.care-fe.pages.dev
Branch Preview URL: https://hide-create.care-fe.pages.dev

View logs

Copy link

cypress bot commented Feb 5, 2025

CARE    Run #4636

Run Properties:  status check passed Passed #4636  •  git commit 2ee5ef2cc4: Hide Create Button in questionnaire, as it's not yet wired
Project CARE
Branch Review hide-create
Run status status check passed Passed #4636
Run duration 05m 53s
Commit git commit 2ee5ef2cc4: Hide Create Button in questionnaire, as it's not yet wired
Committer Mohammed Nihal
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 10
View all changes introduced in this branch ↗︎

@nihal467 nihal467 closed this Feb 6, 2025
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.

1 participant