MultiSelectionFilter's accordion IDs incorrectly use labels

Description

Checkbox filter-sections in MultiSelectionFilter appear to use a label prop to derive the id attribute of their section accordions. The label is a FormattedMessage, however, not a string, and this results in element IDs such as [object Object]-1.

For example, see the "Patron group" accordion of the main ui-users page.

Per
This bug appears because filterConfig, passed to SearchAndFilter component, provides <FormattedMessage /> as a label. As a solution we can replace FormattedMessage with translation keys and translate label before passing to SearchAndFilter component. This should be done in all UI modules that use filterConfig. Link to PR for ui-requests https://github.com/folio-org/ui-requests/pull/326

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

1
  • 20 Jul 2020, 09:05 AM

Checklist

hide

TestRail: Results

Activity

Show:

Denys Bohdan July 20, 2020 at 9:05 AM

Hi , seems like this is no longer an issue in Search app

Zak Burke April 11, 2019 at 3:48 PM

It's low/zero impact on the end user, but it is technically a syntax error (ID elements may not contain whitespace, and must be unique) though most browsers swallow the error without issue. It is a potential testing issue as it will prevent a test from having programmatic access to that element.

Additionally, this is probably a prop-types failure spewing warnings across our console, but the console is so polluted by redux-form at present that it's impossible to see. We have defined, but not assigned, the work to address that in https://folio-org.atlassian.net/browse/STCOR-353#icft=STCOR-353. The eventual goal is a warning-free console. We used to have that stated somewhere; I spent my first summer on folio working toward it.

Marc Johnson April 11, 2019 at 11:26 AM

What is the impact of this bug?

Done

Details

Assignee

Reporter

Priority

Development Team

Spitfire

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created April 10, 2019 at 1:53 PM
Updated November 20, 2020 at 8:53 PM
Resolved November 20, 2020 at 8:53 PM
TestRail: Cases
TestRail: Runs

Flag notifications