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

Timeline style view for Daily Rounds #6808

Merged
merged 20 commits into from
Dec 28, 2023

Conversation

Pranshu1902
Copy link
Contributor

@Pranshu1902 Pranshu1902 commented Dec 7, 2023

WHAT

🤖[deprecated] Generated by Copilot at f0ee615

Refactored the UI and code of the daily rounds feature for patients in a facility. Used the Timeline and TimelineNode components to display the daily rounds as a chronological sequence of events. Simplified the DefaultLogUpdateCard and VirtualNursingAssistantLogUpdateCard components to show only the relevant information and actions for each round. Removed unused code and components.

Proposed Changes

Now:
image

@coronasafe/care-fe-code-reviewers @coronasafe/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

HOW

🤖[deprecated] Generated by Copilot at f0ee615

  • Remove unused components and variables from DefaultLogUpdateCard and VirtualNursingAssistantLogUpdateCard components (link, link, link, link, link, link)
  • Replace PaginatedList with Timeline and TimelineNode components to render daily rounds list as a chronological sequence of events in DailyRoundsList component (link, link)
  • Move buttons to view details and update log from DailyRoundsList to DefaultLogUpdateCard component (link, link)

@Pranshu1902 Pranshu1902 requested a review from a team as a code owner December 7, 2023 15:41
Copy link

vercel bot commented Dec 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 25, 2023 8:57am

Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit ada6efd
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/658943daa1be010008e4c8c1
😎 Deploy Preview https://deploy-preview-6808--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.

@Pranshu1902
Copy link
Contributor Author

@rithviknishad @khavinshankar @nihal467 @gigincg any recommendations on the designs?

@Pranshu1902
Copy link
Contributor Author

@rithviknishad should we add some padding?
image

@rithviknishad
Copy link
Member

Yes, also the user icon itself would be good here ig. What do you think?

@Pranshu1902
Copy link
Contributor Author

How do I add the user icon? The Timeline component is automatically taking the firstname and lastname to display

@rithviknishad
Copy link
Member

Have a gray border maybe for the details part like the green border is there for the details part of automated rounds

@Pranshu1902
Copy link
Contributor Author

Pranshu1902 commented Dec 7, 2023

Updated view:
image

Copy link

👋 Hi, @Pranshu1902,
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 Dec 20, 2023
@nihal467
Copy link
Member

@Pranshu1902 clear the merge conflict for testing

@Pranshu1902 Pranshu1902 added needs testing and removed changes required merge conflict pull requests with merge conflict labels Dec 24, 2023
@Pranshu1902
Copy link
Contributor Author

Pranshu1902 commented Dec 24, 2023

@nihal467 done
Updated view:
image

Loader:
image

@nihal467
Copy link
Member

LGTM

@Pranshu1902
Copy link
Contributor Author

Also Fixes #6886

@khavinshankar khavinshankar merged commit 95353a4 into ohcnetwork:develop Dec 28, 2023
24 of 26 checks passed
Copy link

@Pranshu1902 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

Ashesh3 pushed a commit that referenced this pull request Jan 2, 2024
* make template timeline design

* Update src/Components/Facility/Consultations/DailyRoundsList.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* Update src/Components/Facility/Consultations/DailyRoundsList.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* Update src/Components/Facility/Consultations/DailyRoundsList.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* Update src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* Update src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* Update src/Components/Facility/Consultations/DailyRoundsList.tsx

Co-authored-by: Rithvik Nishad <[email protected]>

* add border and user icon

* refactor

* always display time on right

* use measured at time instead of created at

* enhance UI spacing

* show user type and fix tooltip

* enhance the loader

* refactor

* complete merge

* remove empty card in loader

---------

Co-authored-by: Rithvik Nishad <[email protected]>
Co-authored-by: Aakash Singh <[email protected]>
Comment on lines +138 to +152
<Timeline className="rounded-lg bg-white p-2 shadow" name="log update">
<ul className={props.className}>
{loading && props.shimmer
? Array.from({ length: props.shimmerCount ?? 8 }).map((_, i) => (
<li key={i} className="w-full">
{props.shimmer}
</li>
))
: items.map((item, index, items) => (
<li key={index} className="w-full">
{props.children(item, items)}
</li>
))}
</ul>
</Timeline>
Copy link
Member

Choose a reason for hiding this comment

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

PagiantedList is a generic reusable component. Wrapping timeline here is not appropriate. Because not all Paginated List Items are Timelines, although all Timelines may be Paginated List Items.

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.

Timeline style view for Daily Rounds
5 participants