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
-
Add two filters having the same categoryId in the config-default.ts or config-custom.ts file.
-
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)
Context
This affects a very useful and highly requested feature of ours. Would be great if it can be fixed.
Your Environment
- Amundsen version used: common-0.30.0 (e0373e1)
- Data warehouse stores: BigQuery
- Deployment (k8s or native): k8s
- Link to your fork or repository:https://github.com/deliveryhero/amundsen
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.