[UIREQ-1313] Display Anonymized Requesters#1330
Closed
brycekbargar wants to merge 28 commits intofolio-org:masterfrom
Closed
[UIREQ-1313] Display Anonymized Requesters#1330brycekbargar wants to merge 28 commits intofolio-org:masterfrom
brycekbargar wants to merge 28 commits intofolio-org:masterfrom
Conversation
0bee243 to
2f3a8bb
Compare
src/UserDetail.js
Outdated
| <div> | ||
| {userHighlightBox(<FormattedMessage id="ui-requests.requester.requester" />, name, id, barcode)} | ||
| <UserHighlightBox | ||
| title=<FormattedMessage id="ui-requests.requester.requester" /> |
Contributor
There was a problem hiding this comment.
Suggested change
| title=<FormattedMessage id="ui-requests.requester.requester" /> | |
| title={<FormattedMessage id="ui-requests.requester.requester" />} |
src/UserDetail.js
Outdated
| {proxySection} | ||
| {isProxyFunctionalityAvailable(isEcsTlrSettingEnabled) && proxy?.id && | ||
| <UserHighlightBox | ||
| title=<FormattedMessage id="ui-requests.requester.proxy" /> |
Contributor
There was a problem hiding this comment.
Suggested change
| title=<FormattedMessage id="ui-requests.requester.proxy" /> | |
| title={<FormattedMessage id="ui-requests.requester.proxy" />} |
src/UserDetail.test.js
Outdated
| screen, | ||
| cleanup, | ||
| } from '@folio/jest-config-stripes/testing-library/react'; | ||
| import { MemoryRouter } from 'react-router-dom'; |
Contributor
There was a problem hiding this comment.
please put react related imports above folio imports
src/UserForm.js
Outdated
| <div> | ||
| {userSection} | ||
| <UserHighlightBox | ||
| title=<FormattedMessage id="ui-requests.requester.requester" /> |
Contributor
There was a problem hiding this comment.
Suggested change
| title=<FormattedMessage id="ui-requests.requester.requester" /> | |
| title={<FormattedMessage id="ui-requests.requester.requester" />} |
| BarcodeLink.propTypes = propTypes; | ||
| FullNameLink.propTypes = propTypes; | ||
|
|
||
| export { BarcodeLink, FullNameLink }; |
Contributor
There was a problem hiding this comment.
I don't know what rules are in ui-requests, but I would suggest splitting components into different files to have one component per file. It will make testing easier
a66e6a9 to
c149758
Compare
Contributor
Author
11 tasks
5c292ff to
88fc2dd
Compare
11 tasks
Contributor
|
We was not able run Sonar for fork and we created pull #1336. |
11 tasks
This file contains hidden or 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
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.


Purpose
We're in the process of anonymizing requests, like how loans have been. Previously if user data was not returned for a request it was caused by something weird but now it indicates the request has been anonymized (probably).
Approach
There were many disparate places that were handling the display and logic around requesters. I consolidated all the ways to create a link to a user/barcode into a component as well as all the ways to display the requester/proxy. Once these were all consistent I changed the text/link behavior for when a user does not exist to Anonymized. I'm going to be updating the request list in another PR to better display anonymized requests which will now be a easier because of the consistency.
I'm not super happy with the amount of duplication with the React PropTypes but I'm not a React developer and don't know how this is usually deduplicated.
Refs
https://folio-org.atlassian.net/browse/UIREQ-1313
Corresponding Backend PR: folio-org/mod-circulation#1623
Screenshots
To test this I nulled out the requester in the database.
Pre-Merge Checklist
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.