UIEH-1507: Package Search Results list display - #1849
Conversation
…isplay name and details for when the package is hidden
| })), | ||
| }; | ||
|
|
||
| export default PackageHiddenLabel; |
There was a problem hiding this comment.
Please use named exports instead of default to enforce consistent naming of components where they are imported
| import { FormattedMessage } from 'react-intl'; | ||
|
|
||
| import { Icon, Tooltip } from '@folio/stripes/components'; | ||
| import PropTypes from 'prop-types'; |
There was a problem hiding this comment.
Please group imports together in this order:
- Third party imports
empty line - Imports from stripes modules
empty line - Imports from current module
| import PropTypes from 'prop-types'; | ||
|
|
||
| const tooltipMessageIds = [null, 'ui-eholdings.hiddenSingleCategory', 'ui-eholdings.hiddenDualCategories', 'ui-eholdings.hiddenTripleCategories']; | ||
| const categoryLabelMessageId = (category) => { |
There was a problem hiding this comment.
This function seems redundant as this string interpolation can be passed directly to <FormattedMessage>
| const allHidden = [pfHidden, ftfHidden, marcHidden]; | ||
|
|
||
| describe('basic rendering', () => { | ||
| it('does not render when an empty argument is passed in', () => { |
There was a problem hiding this comment.
Please update the test structure to follow this pattern:
describe('when condition`, () => {
it('should ...', ...)
});
We can group up several checks in one group, and with even one check per condition such strucure makes it easier to understand what conditions are broken when reviewing failed tests
| > | ||
| {packageName || item.name} | ||
| {item.customDisplayName && | ||
| <em> ({item.customDisplayName})</em> |
There was a problem hiding this comment.
One heading space here
|



Purpose
Update package search results display to include package display name if set and more details about when the package is hidden / excluded.
Approach
customDisplayNameandvisibilityarray instead ofvisibilityData, includecustomDisplayNameis result titlePackageHiddenLabelcomponent to handle different combinations of visibility categories while leaving the originalHiddenLabelfor use with Title search result displayRefs
https://folio-org.atlassian.net/browse/UIEH-1507
Screenshots