Skip to content
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

🐛 Provide unique keys for components in MultiselectFilterControl #1949

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

rszwajko
Copy link
Collaborator

@rszwajko rszwajko commented Jun 8, 2024

Addresses issue #1944 introduced by #1903 (follow-up to #1946)

The MultiselectFilterControl component discovers groups from provided data. Each group results in a new ToolbarFilter/ChipGroup pair. Before this fix, the keys were based only on group names. In case of Language filter it created a collision with Language group derived from Tags.
After this fix, the keys are built by concatenating category title and group name. The category title is known at compile time and is expected to be unique among all filters on the screen.

Reference-Url: #1944
Reference-Url: #1903
Reference-Url: #1946

The component creates ToolbarFilter and ChipGroup components from
provided data which may be dynamic. It may happen that the created
components have the same keys as other filters created manually.

Provided unique keys are built by concatenating category title and
group name. The category title is known at compile time and is expected
to be unique. Group name is calculated from the provided data. Each
group results in new ToolbarFilter/ChipGroup

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@rszwajko
Copy link
Collaborator Author

rszwajko commented Jun 8, 2024

Screenshot from 2024-06-08 16-52-15

Copy link

codecov bot commented Jun 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 42.16%. Comparing base (b654645) to head (fedd078).
Report is 156 commits behind head on main.

Current head fedd078 differs from pull request most recent head ab0ca70

Please upload reports for the commit ab0ca70 to get more accurate results.

Files Patch % Lines
...ponents/FilterToolbar/MultiselectFilterControl.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1949      +/-   ##
==========================================
+ Coverage   39.20%   42.16%   +2.96%     
==========================================
  Files         146      166      +20     
  Lines        4857     5320     +463     
  Branches     1164     1330     +166     
==========================================
+ Hits         1904     2243     +339     
- Misses       2939     3061     +122     
- Partials       14       16       +2     
Flag Coverage Δ
client 42.16% <0.00%> (+2.96%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sjd78 sjd78 linked an issue Jun 9, 2024 that may be closed by this pull request
1 task
@rszwajko rszwajko marked this pull request as ready for review June 10, 2024 16:28
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Dependency filtering by language makes UI to crash
3 participants