Skip to content

UIEH-1507: Package Search Results list display - #1849

Merged
zepheiryan merged 6 commits into
masterfrom
UIEH-1507
Sep 21, 2026
Merged

zepheiryan merged 6 commits into
masterfrom
UIEH-1507

Conversation

@zepheiryan

Copy link
Copy Markdown
Contributor

Purpose

Update package search results display to include package display name if set and more details about when the package is hidden / excluded.

Approach

  • Update shape of item to include customDisplayName and visibility array instead of visibilityData, include customDisplayName is result title
  • Add a dedicated PackageHiddenLabel component to handle different combinations of visibility categories while leaving the original HiddenLabel for use with Title search result display
  • LLM used for unit tests and reviewing

Refs

https://folio-org.atlassian.net/browse/UIEH-1507

Screenshots

Screenshot 2026-09-15 at 14 59 20

@zepheiryan zepheiryan added the AI label Sep 15, 2026
@zepheiryan
zepheiryan requested a review from a team as a code owner September 15, 2026 22:09
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Jest Unit Test Results

    1 files  ±0    204 suites  +1   5m 15s ⏱️ + 1m 40s
1 170 tests +8  1 167 ✅ +8  3 💤 ±0  0 ❌ ±0 
1 177 runs  +8  1 174 ✅ +8  3 💤 ±0  0 ❌ ±0 

Results for commit 143d461. ± Comparison against base commit ed0a696.

♻️ This comment has been updated with latest results.

@OleksandrHladchenko1
OleksandrHladchenko1 requested a review from a team September 16, 2026 14:29
})),
};

export default PackageHiddenLabel;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please group imports together in this order:

  1. Third party imports
    empty line
  2. Imports from stripes modules
    empty line
  3. Imports from current module

import PropTypes from 'prop-types';

const tooltipMessageIds = [null, 'ui-eholdings.hiddenSingleCategory', 'ui-eholdings.hiddenDualCategories', 'ui-eholdings.hiddenTripleCategories'];
const categoryLabelMessageId = (category) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This function seems redundant as this string interpolation can be passed directly to <FormattedMessage>

Comment thread src/components/package-hidden-label/package-hidden-label.js
const allHidden = [pfHidden, ftfHidden, marcHidden];

describe('basic rendering', () => {
it('does not render when an empty argument is passed in', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One heading space here

@sonarqubecloud

Copy link
Copy Markdown

@zepheiryan
zepheiryan merged commit 745ec77 into master Sep 21, 2026
17 checks passed
@zepheiryan
zepheiryan deleted the UIEH-1507 branch September 21, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants