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) lab order actions - Add order-actions-slot and switches icons for overflow menu #25

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

gitcliff
Copy link
Contributor

@gitcliff gitcliff commented Jan 3, 2024

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

This PR is addressing the issue of adding adding an extension slot under lab order actions to make this more configurable so that implementations can add in whatever custom order actions that suit their needs

Screenshots

Screenshot 2024-01-03 at 4 56 20 PM

Related Issue

Other

Comment on lines +44 to +64
<button
className={classNames(
"cds--btn",
"cds--btn--ghost",
"cds--overflow-menu__trigger",
{ "cds--overflow-menu--open": showMenu },
styles.overflowMenuButton
)}
aria-haspopup="true"
aria-expanded={showMenu}
id="custom-actions-overflow-menu-trigger"
aria-controls="custom-actions-overflow-menu"
onClick={toggleShowMenu}
>
{menuTitle}
</button>
<div
className={classNames(
"cds--overflow-menu-options",
"cds--overflow-menu--flip",
styles.menu,
Copy link
Member

Choose a reason for hiding this comment

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

Can we switch this to move away from specifying carbon classnames manually? Am sure we can get an equivalent from what comes out of the box.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@pirupius i agree

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @pirupius @jabahum ...
I initially did that and wrapped the OverflowMenuItem items with OverflowMenu out of the box from carbon , which would be the out of the box equivalent but it does not display the extensionSlot which it houses and its children hence on clicking the icon it displays nothing .
So i used the custom overflow flow menu approach that was used in the patient banner actions . Had discussions with Samuel about this, we tested the 2 options and resolved to keep the custom overflow

Copy link
Member

Choose a reason for hiding this comment

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

@gitcliff i left a comment that you haven't addressed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gitcliff i left a comment that you haven't addressed

@pirupius do you mean the one in regards to specifying carbon classnames manually?

src/ui-components/overflow-menu.component.tsx Show resolved Hide resolved
@pirupius pirupius changed the title Icons (fix) Switch the buttons with overflow menu to show actions Jan 5, 2024
@pirupius pirupius changed the title (fix) Switch the buttons with overflow menu to show actions (feat) Add order-actions-slot for lab order actions Jan 5, 2024
@pirupius pirupius changed the title (feat) Add order-actions-slot for lab order actions (feat) lab order actions - Add order-actions-slot and switches icons for overflow menu Jan 5, 2024
Copy link
Collaborator

@jabahum jabahum left a comment

Choose a reason for hiding this comment

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

@gitcliff r u still pushing updates to this ??

@gitcliff
Copy link
Contributor Author

@gitcliff r u still pushing updates to this ??

@jabahum not really ,,, waiting for review

@ojwanganto
Copy link
Contributor

What's pending on this? @gitcliff is there anything else you are working on to complete this work? Thanks

@pirupius
Copy link
Member

pirupius commented Jan 15, 2024

@gitcliff there comments that were previously added but have not been addressed.

@gitcliff
Copy link
Contributor Author

@gitcliff there comments that were previously added but have not been addressed.

hello @pirupius i have tried to respond to the comments made , may be you site out particular ones that i haven't responded to

Copy link
Member

@pirupius pirupius left a comment

Choose a reason for hiding this comment

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

We've discussed this and we'll make some UI fixes in follow up PRs

@pirupius pirupius merged commit 48e7126 into openmrs:main Jan 16, 2024
3 checks passed
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.

5 participants