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

GSoC - Doctor Notes Enhancement #8016

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

Conversation

UdaySagar-Git
Copy link
Contributor

@UdaySagar-Git UdaySagar-Git commented Jun 11, 2024

This PR is created to track my progress on the GSoC project (#7159) and to merge all PRs related to Doctor notes.

Backend RR: coronasafe/care#2295

  • Reply feature in doctore notes
  • Profile image support for a user
  • Markdown Support

File Upload Option

  • support for camera captures
  • support for audio recording
  • support for uploading files
  • file preview support for uploaded files
  • Integrating above features with doctor notes (currenltly it uploads to a hardcoded noteId)
  • support for audio and image embedds into markdown
  • support for copy paste of images to directly upload instead of manually selecting

User Tagging Mechanism

  • support for tagging a user (mentions)
  • Improving the logic for fetching users for mentions
  • sending notifications upon mention
  • hover card to show user details

  • Show Uploaded files under patient consultation page
  • Fix bugs in rich text editor

@UdaySagar-Git UdaySagar-Git requested a review from a team as a code owner June 11, 2024 13:40
Copy link

vercel bot commented Jun 11, 2024

@UdaySagar-Git is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

@UdaySagar-Git UdaySagar-Git marked this pull request as draft June 11, 2024 13:41
Copy link

netlify bot commented Jun 11, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 913f898
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/66916ab30a34f000070a840e
😎 Deploy Preview https://deploy-preview-8016--care-egov-staging.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.

<>
<div className="flex flex-1 items-center justify-center rounded-lg">
<img
src={imgSrc}

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
Copy link

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 19, 2024
@UdaySagar-Git
Copy link
Contributor Author

@rithviknishad can you please remove stale label

Copy link

👋 Hi, @UdaySagar-Git,
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 added the merge conflict pull requests with merge conflict label Jun 26, 2024
const linkNode = findParentNode(range.commonAncestorContainer, ["A"]);

if (linkNode) {
linkNode.setAttribute("href", linkDialogState.url);

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.
linkNode.setAttribute("href", linkDialogState.url);
} else {
const newLink = document.createElement("a");
newLink.href = linkDialogState.url;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.
@nihal467
Copy link
Member

nihal467 commented Jul 11, 2024

@UdaySagar-Git

General Description

  • Modify the PR description properly to understand, what are covered specifically in this PR point by point so that the review will be easier, for example when we read: File Upload Option (partially) in the description, we are not sure, which is completed and which are under development.

Compared Review Based on Proposal till July 7th

image
image
image
image

Action Item till this date, based on contributors proposal


  • Implementing Markdown with full functionality
  • Adding support to embed, preview, and copy-paste images ( 1/3 only done )
  • Implement the tagging mechanism of users
  • Implement the preview mode for hyperlinked links ( Missing in the PR )
  • Introduce the file upload support in the doctor's notes (Partially only done)
  • Make necessary changes to support bookmark in various categories ( Missing in the PR )
  • Fully implementing support of file, audio, and camera capture (By July 21st)

Test Report ( In Progress )


Backend PR

  • Backend test are failing

Markdown with full functionality

image
image
image

  • the icons in the mark editor have multiple sizes, keep the icon size consistent.
  • always use care-icon, I observed that you used a custom icon for the quote

image
image
image
image

  • Before starting to type the text, we should be able to select a text preference, such as bold, italic, or any other style, and keep it selected by default so that any text typed afterward follows that preference.
  • When I select a particular part of a word and make it bold, the text becomes bold, but the bold icon does not turn green unless I move the focus away from the element.
  • When I apply bold to a particular part of a word and continue typing, the bold preference is also being applied to the text I type afterward.
  • When I type "How are you" and strike through the sentence, then remove it and start typing again from the beginning, the previously applied text style is being applied to the new text.

image
image
image

  • When I hover over the hyperlinked text, the tooltip should display the URL to which we are being redirected.
  • Currently, there is no option to edit an existing hyperlink that is already applied to the text. For example, as shown in the screenshot, the text is already hyperlinked, but when I select it again and click on the hyperlink option, it asks for a new link instead of allowing me to edit the existing one.
  • when i hyperlink to an external link, the page is been redirected properly to the external link

image

  • In the current pop-up, we only have option to add a link, so add an option to add text as well. This will allow users to type the text along with the link. Upon submitting the pop-up, the hyperlinked text should get autofilled in the chat box. This text box in the pop-up can also be used to show the selected text if the user has already selected any text to hyperlink from the chatbox.

image
image

  • When i upload a single file, they are been uploaded twice
  • when you try to upload a file, it's not being uploaded to the chat
  • when the file name is larger, it's overflowing the card

image

  • When I click on the camera, the image gets auto-attached to the chat even before I click submit in the pop-up.

image

  • enhancement to the tagging mechanism needs to be done as per the last comment

image

  • the icons are still overlapping with the text in the mobile view

image

  • When trying to view all replies to a message in the mobile view, an unwanted scrollbar appears.

image

  • once we upload a user profile photo, you are refreshing the entire platform, don't do that, only refresh the component to show the uploaded photo, i think there is a provision in react to do that

@UdaySagar-Git
Copy link
Contributor Author

@nihal467 updated the description, i will finish the mentioned tasks without any delays

Action Item of the Week

  • Implementing Markdown with full functionality
  • Adding support to embed, preview, and copy-paste images
  • Implement the tagging mechanism of users
  • Implement the preview mode for hyperlinked links
  • Introduce the file upload support in the doctor's notes
  • Make necessary changes to support bookmark in various categories
  • Fully implementing support of file, audio, and camera capture (By July 21st)

@khavinshankar
Copy link
Member

@UdaySagar-Git any progress on this (#8016 (comment)).

const linkNode = findParentNode(range.commonAncestorContainer, ["A"]);

if (linkNode) {
linkNode.setAttribute("href", linkDialogState.url);

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
linkNode.setAttribute("title", linkDialogState.url);
} else {
const newLink = document.createElement("a");
newLink.href = formatUrl(linkDialogState.url);

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for care-net failed.

Name Link
🔨 Latest commit 6a472cb
🔍 Latest deploy log https://app.netlify.com/sites/care-net/deploys/6691395d28dadb0008c3853d

@github-actions github-actions bot added the Deploy-Failed Deplyment is not showing preview label Jul 12, 2024
@UdaySagar-Git
Copy link
Contributor Author

@nihal467 The following are ready for v1

  • reply funtionality
  • Markdown editor
  • attachments
  • attachments preview
  • mentions (tagging users)
  • cameracapture , audio recording

Things that will be done in v2 (by Tueday )

makrdown editor (addons to v1)

  • preselect options before we start typing
  • after clearing a word the next words to be plain text instead of previous styles

Mentions

  • send a user a notiification that he is tagged (also for reply)
  • mention position is not correct when we click on mention button
  • filter by name

@rithviknishad rithviknishad removed the Deploy-Failed Deplyment is not showing preview label Jul 12, 2024
@nihal467
Copy link
Member

nihal467 commented Jul 12, 2024

TestReport

Bugs in functionality

image

  • when you select a text and apply a preference , then remove a preference, and then again give a preference, the selected text will go out of focus

image
image

  • when i select a text preference for example Bold, then start typing text, the text preference is not applied to the text

image

  • when i apply a text preference for a specific text and after applying, continue typing, the text preference is been applied to the new text as well

image

  • when i apply italics and go to next row of the text, now type to un-select italic, it wont allow

image

  • edit and reply buttons are not visible in mobile view

image

  • user tagging will fail if we mention more than 1 character in yours name for example @d if we type it will show the users list but we continue to type @de the list of users wont be visible at all

image

  • when we download the uploaded file , formatting is wrong for example in place of audio.mp3 they are saving as audio.mp3.mp3

Bug in Design

image

  • the tagged user text is clickable in a existing note, but when we go and click over it, it's not having any redirection or pop-up or anything relevant ( on last test there was a pop-up showing user name and details currently seem like it is removed)

image

  • the edit and reply button are only visible when we move the cursor near to the place marked as 2 in the above screenshot

image

  • the edit and reply icon is overlapping with notes in mobile view

image

  • when we upload a profile image, it is still fully reloading the entire page

Enhancement

  • try to add multiple file upload support to the platform ( in future wishlist item )

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Jul 16, 2024
Copy link

👋 Hi, @UdaySagar-Git,
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflict pull requests with merge conflict work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants