amundsen-io / amundsen

Amundsen is a metadata driven application for improving the productivity of data analysts, data scientists and engineers when interacting with data.

Home Page:https://www.amundsen.io/amundsen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI crashes on "search page" if we add multiple filters with the same category

mikaalanwar opened this issue · comments

UI crashes on Search Page if we add multiple filters to the same category.

Expected Behaviour

There can be scenarios where having multiple search filters for the same category can be useful, e.g. maybe we could have a checkbox to include or exclude items that have a certain badge (e.g. PII). Having such a checkbox can be more user friendly if we're trying to build a complex search query as many analysts might not be able to follow proper search syntax, as is expected in the search filter field.

Current Behaviour

If we add multiple search filters having the same "categoryId", the search page breaks upon switching back and forth between resource types.

Possible Solution

Perhaps, this is happening because "category Ids" get passed further as "html ids" which are supposed to be unique. Maybe a better support to specify html id in the config or handling of this edge case in code to accommodate duplicate category ids is needed.

Steps to Reproduce

  1. Add two filters having the same categoryId in the config-default.ts or config-custom.ts file.

  2. After building and running, navigate to the "Search" page and upon switching back and forth between different resource types (e.g. Tables and Dashboards etc.), you will notice that the search filter with the duplicate "categoryId" keeps on getting duplicated in FilterSection (sidebar) e.g. if we switch 3 times, there will be 3 extra filters displayed (one added per transition).

Screenshots (if appropriate)

image

Context

This affects a very useful and highly requested feature of ours. Would be great if it can be fixed.

Your Environment

Thanks for opening your first issue here!

@Golodhros @kristenarmes @allisonsuarez can you please take a look and help with this issue if possible?

Closing this, as it has been fixed by this PR.