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

Refactor: Relationships UI improvements #278

Merged
merged 9 commits into from
Jul 26, 2024

Conversation

amosmachora
Copy link
Collaborator

@amosmachora amosmachora commented Jul 19, 2024

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • I checked for feature overlap with existing widgets.

Summary

In thi PR I have updated the UI for the relationships page on the patient chart. Previously when adding a new relationship the user was being redirect to a new page. In this PR I have replaced that functionality with a workspace which allows the user to remain in a single page improving the ux drastically.

Also I made some small changes on the labels to more accurately describing what action the button will be persorming e.g Add PNS Contact.

There is a small UI bug when searching for a patient that makes the results appear terrible. I will address that in a different PR. All feedback will be highly appreciated.

Screenshots

Screenshot A

image

Screenshot B

image

Other Relationships Tab Screenshot

image

Video

Untitled.video.-.Made.with.Clipchamp.mp4

Related Issue

None.

Other

None.

Copy link
Collaborator

@makombe makombe left a comment

Choose a reason for hiding this comment

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

Thanks @amosmachora LGTM. There are some suggestions that you can address

Comment on lines +35 to +51

.buttonSet {
margin-top: auto;
display: flex;
}

.button {
height: spacing.$spacing-10;
display: flex;
align-content: flex-start;
align-items: center;
max-width: 50%;
min-width: 50%;
width: 50%;
}

.grid {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Try to localize the naming to avoid style overrides.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okay got it

@amosmachora
Copy link
Collaborator Author

@makombe thanks for the feedback. I will work on them and update the PR accordingly.

@amosmachora
Copy link
Collaborator Author

@ojwanganto I have added the other relationships tab. I have also added a workspace to facilitate adding the same. @makombe there is a small issue that I have. I want to filter out the Relationship Types during the API call. Currently I fetch everything the filter out client side. It works but it is not optimal.

@@ -120,39 +120,39 @@ export const configSchema = {
_default: [
{
uuid: '8d91a01c-c2cc-11de-8d13-0010c6dffd0f',
displayAIsToB: 'Sibling',
display: 'Sibling/Sibling',
Copy link
Contributor

Choose a reason for hiding this comment

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

+1. The config looks good

@ojwanganto
Copy link
Contributor

Thanks, @amosmachora. It's looking good. Tagging @makombe and @donaldkibet for in-depth reviews.

@amosmachora amosmachora requested a review from makombe July 23, 2024 15:02
makombe
makombe previously approved these changes Jul 23, 2024
Copy link
Collaborator

@makombe makombe 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 @amosmachora

return (
<DataTableSkeleton
headers={headers}
aria-label="patient bills table"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this miss placed label?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah this is misplaced let me fix this.

@amosmachora
Copy link
Collaborator Author

@makombe i fixed the misplaced aria label and that by proxy markd your approval as stale. Mind approving again ?

@ojwanganto
Copy link
Contributor

Thanks, @amosmachora.
CC @makombe @donaldkibet

@makombe
Copy link
Collaborator

makombe commented Jul 25, 2024

@amosmachora Please resolve the conflicts then we can merge it in. I think it LGMT

@amosmachora amosmachora requested a review from makombe July 26, 2024 11:44
@makombe makombe merged commit 33583c7 into palladiumkenya:main Jul 26, 2024
6 of 7 checks passed
@amosmachora amosmachora deleted the relationships-improvements branch August 13, 2024 09:30
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