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

(feat) Left hand navigation to queue by status table component #984

Merged
merged 8 commits into from
Mar 12, 2024

Conversation

mseaton
Copy link
Member

@mseaton mseaton commented Feb 15, 2024

This does not work correctly, it is just intended to show something quick for review. Do not merge.

image

Copy link
Contributor

github-actions bot commented Feb 15, 2024

Size Change: -55.8 kB (-2%)

Total Size: 2.97 MB

Filename Size Change
packages/esm-service-queues-app/dist/351.js 0 B -56.1 kB (removed) 🏆
packages/esm-service-queues-app/dist/694.js 158 kB +155 kB (+5864%) 🆘
packages/esm-service-queues-app/dist/865.js 0 B -156 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size Change
packages/esm-active-visits-app/dist/130.js 123 kB 0 B
packages/esm-active-visits-app/dist/255.js 2.21 kB 0 B
packages/esm-active-visits-app/dist/271.js 762 B 0 B
packages/esm-active-visits-app/dist/277.js 13.4 kB 0 B
packages/esm-active-visits-app/dist/316.js 42.9 kB 0 B
packages/esm-active-visits-app/dist/319.js 683 B 0 B
packages/esm-active-visits-app/dist/382.js 1.15 kB 0 B
packages/esm-active-visits-app/dist/448.js 47.1 kB 0 B
packages/esm-active-visits-app/dist/460.js 784 B 0 B
packages/esm-active-visits-app/dist/574.js 588 B 0 B
packages/esm-active-visits-app/dist/588.js 6.66 kB 0 B
packages/esm-active-visits-app/dist/635.js 1.15 kB 0 B
packages/esm-active-visits-app/dist/644.js 762 B 0 B
packages/esm-active-visits-app/dist/729.js 3.1 kB 0 B
packages/esm-active-visits-app/dist/757.js 695 B 0 B
packages/esm-active-visits-app/dist/784.js 2.63 kB 0 B
packages/esm-active-visits-app/dist/788.js 586 B 0 B
packages/esm-active-visits-app/dist/807.js 918 B 0 B
packages/esm-active-visits-app/dist/833.js 732 B 0 B
packages/esm-active-visits-app/dist/879.js 2.94 kB 0 B
packages/esm-active-visits-app/dist/main.js 65 kB 0 B
packages/esm-active-visits-app/dist/openmrs-esm-active-visits-app.js 3.33 kB 0 B
packages/esm-appointments-app/dist/130.js 123 kB 0 B
packages/esm-appointments-app/dist/152.js 257 B 0 B
packages/esm-appointments-app/dist/255.js 2.21 kB 0 B
packages/esm-appointments-app/dist/271.js 2.21 kB 0 B
packages/esm-appointments-app/dist/303.js 258 B 0 B
packages/esm-appointments-app/dist/319.js 2.12 kB 0 B
packages/esm-appointments-app/dist/368.js 44.3 kB +13 B (0%)
packages/esm-appointments-app/dist/426.js 271 kB 0 B
packages/esm-appointments-app/dist/460.js 2.31 kB 0 B
packages/esm-appointments-app/dist/500.js 2.5 kB 0 B
packages/esm-appointments-app/dist/574.js 1.81 kB 0 B
packages/esm-appointments-app/dist/588.js 6.65 kB 0 B
packages/esm-appointments-app/dist/591.js 16.9 kB 0 B
packages/esm-appointments-app/dist/644.js 2.21 kB 0 B
packages/esm-appointments-app/dist/729.js 3.1 kB 0 B
packages/esm-appointments-app/dist/757.js 1.87 kB 0 B
packages/esm-appointments-app/dist/784.js 2.63 kB 0 B
packages/esm-appointments-app/dist/788.js 1.87 kB 0 B
packages/esm-appointments-app/dist/807.js 2.55 kB 0 B
packages/esm-appointments-app/dist/833.js 2.18 kB 0 B
packages/esm-appointments-app/dist/main.js 317 kB +14 B (0%)
packages/esm-appointments-app/dist/openmrs-esm-appointments-app.js 3.33 kB 0 B
packages/esm-patient-list-management-app/dist/130.js 123 kB 0 B
packages/esm-patient-list-management-app/dist/255.js 2.21 kB 0 B
packages/esm-patient-list-management-app/dist/271.js 1.56 kB 0 B
packages/esm-patient-list-management-app/dist/295.js 99.3 kB 0 B
packages/esm-patient-list-management-app/dist/319.js 1.52 kB 0 B
packages/esm-patient-list-management-app/dist/382.js 1.15 kB 0 B
packages/esm-patient-list-management-app/dist/435.js 22.7 kB 0 B
packages/esm-patient-list-management-app/dist/460.js 1.7 kB 0 B
packages/esm-patient-list-management-app/dist/574.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/588.js 6.66 kB 0 B
packages/esm-patient-list-management-app/dist/591.js 16.9 kB 0 B
packages/esm-patient-list-management-app/dist/635.js 1.15 kB 0 B
packages/esm-patient-list-management-app/dist/644.js 1.56 kB 0 B
packages/esm-patient-list-management-app/dist/716.js 4.66 kB 0 B
packages/esm-patient-list-management-app/dist/729.js 3.1 kB 0 B
packages/esm-patient-list-management-app/dist/757.js 1.5 kB 0 B
packages/esm-patient-list-management-app/dist/784.js 2.64 kB 0 B
packages/esm-patient-list-management-app/dist/788.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/807.js 1.84 kB 0 B
packages/esm-patient-list-management-app/dist/833.js 1.58 kB 0 B
packages/esm-patient-list-management-app/dist/main.js 126 kB 0 B
packages/esm-patient-list-management-app/dist/openmrs-esm-patient-list-management-app.js 3.3 kB 0 B
packages/esm-patient-registration-app/dist/130.js 123 kB 0 B
packages/esm-patient-registration-app/dist/152.js 262 B 0 B
packages/esm-patient-registration-app/dist/209.js 36.4 kB 0 B
packages/esm-patient-registration-app/dist/255.js 2.21 kB 0 B
packages/esm-patient-registration-app/dist/271.js 2.01 kB 0 B
packages/esm-patient-registration-app/dist/303.js 260 B 0 B
packages/esm-patient-registration-app/dist/319.js 1.99 kB 0 B
packages/esm-patient-registration-app/dist/460.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/537.js 2.34 kB 0 B
packages/esm-patient-registration-app/dist/574.js 1.7 kB 0 B
packages/esm-patient-registration-app/dist/591.js 16.9 kB 0 B
packages/esm-patient-registration-app/dist/62.js 6.86 kB 0 B
packages/esm-patient-registration-app/dist/644.js 2.01 kB 0 B
packages/esm-patient-registration-app/dist/729.js 3.1 kB 0 B
packages/esm-patient-registration-app/dist/730.js 115 kB 0 B
packages/esm-patient-registration-app/dist/735.js 464 B 0 B
packages/esm-patient-registration-app/dist/757.js 2.07 kB 0 B
packages/esm-patient-registration-app/dist/784.js 2.64 kB 0 B
packages/esm-patient-registration-app/dist/788.js 1.71 kB 0 B
packages/esm-patient-registration-app/dist/807.js 2.43 kB 0 B
packages/esm-patient-registration-app/dist/833.js 1.97 kB 0 B
packages/esm-patient-registration-app/dist/879.js 2.94 kB 0 B
packages/esm-patient-registration-app/dist/884.js 6.1 kB 0 B
packages/esm-patient-registration-app/dist/main.js 153 kB 0 B
packages/esm-patient-registration-app/dist/openmrs-esm-patient-registration-app.js 3.34 kB 0 B
packages/esm-patient-search-app/dist/130.js 123 kB 0 B
packages/esm-patient-search-app/dist/152.js 261 B 0 B
packages/esm-patient-search-app/dist/255.js 2.21 kB 0 B
packages/esm-patient-search-app/dist/271.js 1.12 kB 0 B
packages/esm-patient-search-app/dist/303.js 260 B 0 B
packages/esm-patient-search-app/dist/319.js 1.06 kB 0 B
packages/esm-patient-search-app/dist/382.js 1.15 kB 0 B
packages/esm-patient-search-app/dist/460.js 1.16 kB 0 B
packages/esm-patient-search-app/dist/48.js 26.4 kB 0 B
packages/esm-patient-search-app/dist/574.js 910 B 0 B
packages/esm-patient-search-app/dist/588.js 6.66 kB 0 B
packages/esm-patient-search-app/dist/591.js 16.9 kB 0 B
packages/esm-patient-search-app/dist/635.js 1.15 kB 0 B
packages/esm-patient-search-app/dist/644.js 1.12 kB 0 B
packages/esm-patient-search-app/dist/710.js 22.8 kB 0 B
packages/esm-patient-search-app/dist/729.js 3.1 kB 0 B
packages/esm-patient-search-app/dist/757.js 1.06 kB 0 B
packages/esm-patient-search-app/dist/784.js 2.63 kB 0 B
packages/esm-patient-search-app/dist/788.js 905 B 0 B
packages/esm-patient-search-app/dist/807.js 1.3 kB 0 B
packages/esm-patient-search-app/dist/833.js 1.08 kB 0 B
packages/esm-patient-search-app/dist/main.js 52.3 kB 0 B
packages/esm-patient-search-app/dist/openmrs-esm-patient-search-app.js 3.34 kB 0 B
packages/esm-service-queues-app/dist/130.js 123 kB 0 B
packages/esm-service-queues-app/dist/152.js 262 B 0 B
packages/esm-service-queues-app/dist/203.js 2.64 kB 0 B
packages/esm-service-queues-app/dist/255.js 2.22 kB 0 B
packages/esm-service-queues-app/dist/271.js 3.86 kB 0 B
packages/esm-service-queues-app/dist/303.js 261 B 0 B
packages/esm-service-queues-app/dist/319.js 3.31 kB 0 B
packages/esm-service-queues-app/dist/328.js 3.07 kB -1 B (0%)
packages/esm-service-queues-app/dist/389.js 2.43 kB +2 B (0%)
packages/esm-service-queues-app/dist/425.js 2.07 kB +1 B (0%)
packages/esm-service-queues-app/dist/460.js 4.11 kB 0 B
packages/esm-service-queues-app/dist/564.js 56.4 kB 0 B
packages/esm-service-queues-app/dist/574.js 3.39 kB 0 B
packages/esm-service-queues-app/dist/588.js 6.66 kB 0 B
packages/esm-service-queues-app/dist/591.js 16.9 kB 0 B
packages/esm-service-queues-app/dist/616.js 2.71 kB 0 B
packages/esm-service-queues-app/dist/644.js 3.86 kB 0 B
packages/esm-service-queues-app/dist/696.js 3.69 kB -1 B (0%)
packages/esm-service-queues-app/dist/729.js 3.1 kB 0 B
packages/esm-service-queues-app/dist/738.js 3.69 kB +1 B (0%)
packages/esm-service-queues-app/dist/757.js 3.31 kB 0 B
packages/esm-service-queues-app/dist/784.js 2.63 kB 0 B
packages/esm-service-queues-app/dist/788.js 3.3 kB 0 B
packages/esm-service-queues-app/dist/807.js 4.58 kB 0 B
packages/esm-service-queues-app/dist/833.js 3.81 kB 0 B
packages/esm-service-queues-app/dist/981.js 2.93 kB +2 B (0%)
packages/esm-service-queues-app/dist/main.js 217 kB +1.57 kB (+1%)
packages/esm-service-queues-app/dist/openmrs-esm-service-queues-app.js 3.3 kB +1 B (0%)

compressed-size-action

@ojwanganto
Copy link
Contributor

Thanks for this Mike. From the user interface, I see we'll render tabs for the different queue statuses. What is the exact use case for this, and how will it work with what already exists in the queuing module? Thanks

@mseaton
Copy link
Member Author

mseaton commented Feb 16, 2024

Thanks for this Mike. From the user interface, I see we'll render tabs for the different queue statuses. What is the exact use case for this, and how will it work with what already exists in the queuing module? Thanks

The tabbed interface is already committed (see this commit), and available as an alternative view. It's just another view, it doesn't change what is already there.

This DRAFT PR is just showing a possible approach to navigation using the left nav bar, where the links are dynamic and not hard-coded. For example, if we want to have a link for all queues in the system, we want to iterate over all of the queues and then render a link that will render a component, passing that queue in as a prop. I don't know if we have any existing examples of how this might be accomplished (the code in this PR doesn't really work as I'd want it to. it "works", but it refreshes the entire for each item that is clicked, and is more of a POC to get the idea across.) @ibacher / @denniskigen FYI - I hadn't really intended for this to be broadly discussed, but as long as we are, looping you in.

@ibacher
Copy link
Member

ibacher commented Feb 16, 2024

I do want to re-emphasize that it was never the intention to have a "service-queues" app like this and that the designs that we're supposed to be working towards for queues is this, where the queue selected or visible priorities are changed via drop-down.

@mseaton
Copy link
Member Author

mseaton commented Feb 16, 2024

where the queue selected or visible priorities are changed via drop-down

Well, one place where queues are currently designed for use is in the "outpatient app", yes. And those designs have the dropdown as shown. But there may be lots of apps or places where we want to show queues in different ways, and not all of those have been designed out yet.

The approach we are trying to take is to build configurable components that can be easily composed together into different UIs as needed. The "tabbed" view we just committed adds a new "queue table" component that allows one to easily display a table of queue entries with a configurable set of columns that can be extended by implementations. Then, it uses that queue table in one possible view in which a queue's active entries are displayed in tabs based on status. But this same table could/should easily be used in the "outpatient app" view that you describe @ibacher , and this could certainly change the queue entries that are displayed in the table based on what is selected in one or more dropdowns/filters. Our intention would be that we continue work on the existing components in the service-queues app and refactor them in this direction.

I think we can also all agree that the Left Nav is has not been particularly well utilized in the Home App, and that we could do more here to provide easy access to the tools that people need. And that this is intended to be fully configurable via extension points. My goal here is to determine whether we could have a lightweight component that could iterate over a set of dynamic data to provide links in the LHN, and then a particular implementation could choose (or not) to add this in as an extension.

@mseaton mseaton changed the title DO NOT MERGE: POC queue navigation (feat) Left hand navigation to queue by status table component Mar 5, 2024
@mseaton mseaton marked this pull request as ready for review March 5, 2024 19:51
@mseaton mseaton requested a review from ibacher March 5, 2024 19:51
@chibongho
Copy link
Contributor

@mseaton , @mogoodrich , @ibacher ok, this CSS is a bit more cleaned up now and ready for review.

Again, non-standard UI here. But is only slotted into the side nav via extensions / configurations.

OpenMRS.7.-.-.Microsoft.Edge.2024-03-11.09-17-06.mp4

Copy link
Member Author

@mseaton mseaton left a comment

Choose a reason for hiding this comment

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

This looks great @chibongho - thanks! Unfortunately I can't approve being an author.

Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @mseaton @chibongho

So then to get this to appear, in the PIH we disable the "service-queues-dashboard" extension and enable this one? Or am I already forgetting how extensions work? :)

"component": "queueTableByStatusMenu",
"meta": {
"name": "service-queues",
"slot": "service-queues-dashboard-slot",
Copy link
Member

Choose a reason for hiding this comment

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

I'm forgetting, why do we need to have the slot listed in the meta here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just the way the home page app extensions work. I think it basically serves to connect the link component with the dashboard component that it renders.

Copy link
Member

Choose a reason for hiding this comment

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

That's right, @mseaton

@mseaton
Copy link
Member Author

mseaton commented Mar 11, 2024

forgetting how extensions work

Yes, see here @mogoodrich : https://github.com/PIH/openmrs-config-pihemr/pull/494/files

@chibongho chibongho merged commit 41c9113 into main Mar 12, 2024
6 checks passed
@chibongho chibongho deleted the queue-nav-menu branch March 12, 2024 13:11
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.

6 participants