-
Notifications
You must be signed in to change notification settings - Fork 210
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) Refactor reusable patient banner components #1209
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size Change: -329 kB (-5.09%) ✅ Total Size: 6.14 MB
ℹ️ View Unchanged
|
This PR refactors the reusable patient banner components as follows: - Renames the component export from `PatientBannerPatientIdentifier` to `PatientBannerPatientInfoIdentifiers` to better describe its purpose. The pluralized name is more representative of the fact that it renders a list of identifiers. - Renames the `identifiers` array prop from `identifier` to `identifiers` to better describe its purpose. - Fixes incorrect usage of the `showIdentifierLabel` prop. Per its description, it should toggle the display of the identifier label, not the entire identifier. - Removes the `title` prop from the Carbon `Tag` component which has since been deprecated. - Adds a test for the `PatientBannerPatientInfoIdentifiers` component. - Adds a default export for the `PatientBannerPatientInfo` component. - Adds a test for the `PatientBannerPatientInfo` component.
denniskigen
force-pushed
the
refactor/reusable-patient-banner-components
branch
from
November 19, 2024 18:33
bb3435d
to
033ae2b
Compare
denniskigen
requested review from
chibongho,
ibacher,
samuelmale and
vasharma05
November 19, 2024 19:14
chibongho
approved these changes
Nov 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requirements
feat
,fix
, orchore
, among others). See existing PR titles for inspiration.For changes to apps
If applicable
Summary
This PR refactors the reusable patient banner components as follows:
PatientBannerPatientIdentifier
PatientBannerPatientIdentifier
toPatientBannerPatientInfoIdentifiers
to better describe its purpose. The pluralized name is more representative of the fact that it renders a list of identifiers.identifiers
array prop fromidentifier
toidentifiers
to better describe its purpose.showIdentifierLabel
prop. Per its description, it should toggle the display of the identifier label, not the entire identifier.title
prop from the CarbonTag
component which has since been deprecated.PatientBannerPatientInfo
Misc
usePrimaryIdentifierCode
to theesm-react-utils
mock. I'm not sure why we have a stub for the resource file, instead of just one for the function it exports. I'll look into this more closely.Screenshots
No UI changes
Related Issue
https://openmrs.atlassian.net/browse/O3-4160
Other
This would require an update to the framework and tooling versions of Core in the places where we're using these components.