Skip to content

Conversation

@amosmachora
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

In this PR I have added a feature that adds pagination to the ward beds. I chose a pageSize of 6 to begin with but this could be a configurable option. I also refactored this file a little bit to show better loading and error states and also avoid code duplication. (This was to facilitate adding the pagination functionality without breaking the existing functionality) .

Screenshots

Page 1

image

Page 2

image

Video

ward-app-pagination-demo.mp4

Related Issue

https://openmrs.atlassian.net/browse/O3-3709

Other

After I had already picked up and worked on this issue , it was made aware to me on Jira by @mogoodrich that the technical design might have not been ready at the time I started working on this issue. I was however adviced to open the PR regardless.

Also I was looking for EmptyState component in the @openmrs/esm-patient-common-lib library but couldn`t find it. I upgraded openmrs and it worked but I have heard in O3 community calls that submitting the package.json file in a PR is probably a bad idea. Please guide appropriately.

All feedback is highly appreciated.

@ojwanganto
Copy link
Contributor

Thanks, @amosmachora. Please rebase with main to have the branch in sync. Also, the CI build is failing.

@mogoodrich
Copy link
Member

So sorry @amosmachora , but if you read the ticket, it wasn't about display pagination, but rather handling "paginated" REST requests from the end point.

Also it does look like this PR contains more changes than just your changes, not sure if your branch was up-to- date?

@mogoodrich
Copy link
Member

So I talked this through with some of the product owners to see if there was any interest in having pagination on Ward app (even though that wasn't the intent of this ticket) and unfortunately the consensus seems to be that we don't want pagination on this view, scrolling will be better. So I'm going to close this PR out, sorry and thanks... let me know if you have any questions!

@mogoodrich mogoodrich closed this Aug 7, 2024
@amosmachora
Copy link
Contributor Author

Oh thanks for the feedback @mogoodrich it seems like I might have misunderstood the pagination term . I thought you needed a pagination view for the ward app which I assumed meant the beds. I don't know why that made so much sense to me : )

Thanks.

@mogoodrich
Copy link
Member

No worries, @amosmachora !

@amosmachora amosmachora deleted the feat/ward-app-pagination branch October 15, 2024 09:03
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.

3 participants