-
Notifications
You must be signed in to change notification settings - Fork 960
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
feat: Use new search endpoint in FE and add search filter operation selection #1623
feat: Use new search endpoint in FE and add search filter operation selection #1623
Conversation
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
… make the ts changes needed to show changes in FE Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
…arch api Signed-off-by: Kristen Armes <karmes@lyft.com>
Signed-off-by: Kristen Armes <karmes@lyft.com>
Signed-off-by: Kristen Armes <karmes@lyft.com>
Signed-off-by: Kristen Armes <karmes@lyft.com>
Signed-off-by: Kristen Armes <karmes@lyft.com>
frontend/amundsen_application/static/js/components/Badges/BadgeList/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
Only some minor comments
frontend/amundsen_application/static/js/components/Badges/BadgeList/index.tsx
Outdated
Show resolved
Hide resolved
frontend/amundsen_application/static/js/components/Badges/BadgeList/index.tsx
Show resolved
Hide resolved
frontend/amundsen_application/static/js/components/SearchBar/index.tsx
Outdated
Show resolved
Hide resolved
frontend/amundsen_application/static/js/pages/SearchPage/SearchFilter/CheckBoxFilter/index.tsx
Outdated
Show resolved
Hide resolved
frontend/amundsen_application/static/js/pages/SearchPage/SearchFilter/InputFilter/index.tsx
Outdated
Show resolved
Hide resolved
frontend/amundsen_application/static/js/pages/SearchPage/SearchFilter/InputFilter/index.tsx
Outdated
Show resolved
Hide resolved
frontend/amundsen_application/static/js/pages/SearchPage/SearchFilter/InputFilter/index.tsx
Outdated
Show resolved
Hide resolved
…nit tests for v1 Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
…narmes/amundsen into search-filter-operation-selection
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
frontend/amundsen_application/static/js/pages/SearchPage/SearchFilter/InputFilter/index.tsx
Show resolved
Hide resolved
…ests Signed-off-by: Kristen Armes <karmes@lyft.com>
Signed-off-by: Kristen Armes <karmes@lyft.com>
…p check Signed-off-by: Kristen Armes <karmes@lyft.com>
…ations to be more clear on what it does Signed-off-by: Kristen Armes <karmes@lyft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for going the extra mile!
…e instead of keeping it stored as an undefined value Signed-off-by: Kristen Armes <karmes@lyft.com>
Signed-off-by: Kristen Armes <karmes@lyft.com>
@Golodhros I did it this way at first actually, but found I was getting a linting error because the |
I see, try using '_' instead of rest, does that remove the warning? |
Signed-off-by: Kristen Armes <karmes@lyft.com>
…election (amundsen-io#1623) * almost there Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * almost done Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * FE search API correctly requests search service and responds, need to make the ts changes needed to show changes in FE Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * correct mappings for resource results Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * SEARCH IS FUNCTIONAL WITH NEW API Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * cleanup Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Majority of the work done for filter operation selection using new search api Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing resource specific search with filters and clear filters behavior Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing js tests and betterer issues Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing python test and lint/betterer Signed-off-by: Kristen Armes <karmes@lyft.com> * Betterer improvements/test fixes Signed-off-by: Kristen Armes <karmes@lyft.com> * removed v0 because it is not needed or accesible anymore, and added unit tests for v1 Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * a bit of cleanup from utils, not done yet Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint fixes Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * test _transform_filters Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Adding description and timestamp to dashboard mapping and adding js tests Signed-off-by: Kristen Armes <karmes@lyft.com> * Addressing PR comments Signed-off-by: Kristen Armes <karmes@lyft.com> * lint Signed-off-by: Kristen Armes <karmes@lyft.com> * Verified that badge is primitive string type during search, cleaned up check Signed-off-by: Kristen Armes <karmes@lyft.com> * Changing the name of the config that optionally restricts filter operations to be more clear on what it does Signed-off-by: Kristen Armes <karmes@lyft.com> * If a filter term is deleted, remove the category from the filter state instead of keeping it stored as an undefined value Signed-off-by: Kristen Armes <karmes@lyft.com> * Bumping major FE version Signed-off-by: Kristen Armes <karmes@lyft.com> * Using destructuring instead of delete for removing empty filter Signed-off-by: Kristen Armes <karmes@lyft.com> Co-authored-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> Signed-off-by: Amom Mendes <amommendes@hotmail.com>
…election (amundsen-io#1623) * almost there Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * almost done Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * FE search API correctly requests search service and responds, need to make the ts changes needed to show changes in FE Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * correct mappings for resource results Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * SEARCH IS FUNCTIONAL WITH NEW API Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * cleanup Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Majority of the work done for filter operation selection using new search api Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing resource specific search with filters and clear filters behavior Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing js tests and betterer issues Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing python test and lint/betterer Signed-off-by: Kristen Armes <karmes@lyft.com> * Betterer improvements/test fixes Signed-off-by: Kristen Armes <karmes@lyft.com> * removed v0 because it is not needed or accesible anymore, and added unit tests for v1 Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * a bit of cleanup from utils, not done yet Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint fixes Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * test _transform_filters Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Adding description and timestamp to dashboard mapping and adding js tests Signed-off-by: Kristen Armes <karmes@lyft.com> * Addressing PR comments Signed-off-by: Kristen Armes <karmes@lyft.com> * lint Signed-off-by: Kristen Armes <karmes@lyft.com> * Verified that badge is primitive string type during search, cleaned up check Signed-off-by: Kristen Armes <karmes@lyft.com> * Changing the name of the config that optionally restricts filter operations to be more clear on what it does Signed-off-by: Kristen Armes <karmes@lyft.com> * If a filter term is deleted, remove the category from the filter state instead of keeping it stored as an undefined value Signed-off-by: Kristen Armes <karmes@lyft.com> * Bumping major FE version Signed-off-by: Kristen Armes <karmes@lyft.com> * Using destructuring instead of delete for removing empty filter Signed-off-by: Kristen Armes <karmes@lyft.com> Co-authored-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> Signed-off-by: Ozan Dogrultan <ozan.dogrultan@deliveryhero.com>
…election (amundsen-io#1623) * almost there Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * almost done Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * FE search API correctly requests search service and responds, need to make the ts changes needed to show changes in FE Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * correct mappings for resource results Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * SEARCH IS FUNCTIONAL WITH NEW API Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * cleanup Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Majority of the work done for filter operation selection using new search api Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing resource specific search with filters and clear filters behavior Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing js tests and betterer issues Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing python test and lint/betterer Signed-off-by: Kristen Armes <karmes@lyft.com> * Betterer improvements/test fixes Signed-off-by: Kristen Armes <karmes@lyft.com> * removed v0 because it is not needed or accesible anymore, and added unit tests for v1 Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * a bit of cleanup from utils, not done yet Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint fixes Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * test _transform_filters Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Adding description and timestamp to dashboard mapping and adding js tests Signed-off-by: Kristen Armes <karmes@lyft.com> * Addressing PR comments Signed-off-by: Kristen Armes <karmes@lyft.com> * lint Signed-off-by: Kristen Armes <karmes@lyft.com> * Verified that badge is primitive string type during search, cleaned up check Signed-off-by: Kristen Armes <karmes@lyft.com> * Changing the name of the config that optionally restricts filter operations to be more clear on what it does Signed-off-by: Kristen Armes <karmes@lyft.com> * If a filter term is deleted, remove the category from the filter state instead of keeping it stored as an undefined value Signed-off-by: Kristen Armes <karmes@lyft.com> * Bumping major FE version Signed-off-by: Kristen Armes <karmes@lyft.com> * Using destructuring instead of delete for removing empty filter Signed-off-by: Kristen Armes <karmes@lyft.com> Co-authored-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
…election (amundsen-io#1623) * almost there Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * almost done Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * FE search API correctly requests search service and responds, need to make the ts changes needed to show changes in FE Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * correct mappings for resource results Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * SEARCH IS FUNCTIONAL WITH NEW API Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * cleanup Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Majority of the work done for filter operation selection using new search api Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing resource specific search with filters and clear filters behavior Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing js tests and betterer issues Signed-off-by: Kristen Armes <karmes@lyft.com> * Fixing python test and lint/betterer Signed-off-by: Kristen Armes <karmes@lyft.com> * Betterer improvements/test fixes Signed-off-by: Kristen Armes <karmes@lyft.com> * removed v0 because it is not needed or accesible anymore, and added unit tests for v1 Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * a bit of cleanup from utils, not done yet Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint fixes Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * test _transform_filters Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * lint Signed-off-by: Allison Suarez Miranda <asuarezmiranda@lyft.com> * Adding description and timestamp to dashboard mapping and adding js tests Signed-off-by: Kristen Armes <karmes@lyft.com> * Addressing PR comments Signed-off-by: Kristen Armes <karmes@lyft.com> * lint Signed-off-by: Kristen Armes <karmes@lyft.com> * Verified that badge is primitive string type during search, cleaned up check Signed-off-by: Kristen Armes <karmes@lyft.com> * Changing the name of the config that optionally restricts filter operations to be more clear on what it does Signed-off-by: Kristen Armes <karmes@lyft.com> * If a filter term is deleted, remove the category from the filter state instead of keeping it stored as an undefined value Signed-off-by: Kristen Armes <karmes@lyft.com> * Bumping major FE version Signed-off-by: Kristen Armes <karmes@lyft.com> * Using destructuring instead of delete for removing empty filter Signed-off-by: Kristen Armes <karmes@lyft.com> Co-authored-by: Allison Suarez Miranda <asuarezmiranda@lyft.com>
Summary of Changes
This change has three major sections that are all included together for compatibility:
AND/OR
toggle will appear, allowing the user to specify whether they are filtering by all of the entered filter terms in the same results, or just looking for at least one of the terms in the results.Some design decisions to note:
BaseFilterCategory
calledallowableOperation
. If it is not set, the default behavior will allow bothAND
andOR
operations for filtering. If it is set toFilterOperationType.OR
, only theOR
filter operation will be enabled for that category, which can be used when each search result would only ever include one of the filter terms in the category - e.g. a given table would only have one source database. If it is set toFilterOperationType.AND
, only theAND
filter operation will be enabled for that category.FilterOptions
was used to keep track of which checkbox filters were checked or unchecked where atrue
value meant it should be checked and afalse
value unchecked. Since now the input filters accept multiple values, this type was removed and the checkboxes are handled the same way as the input filters, where the name of the checkbox being included in the filter means it should be checked and any not included are unchecked.Tests
Various changes were made to JS tests to account for changes to the way the frontend data is handled with filtering, such as checkboxes using a list of values rather than a special type to make it more consistent with the input filters. New tests were added for the
AND/OR
toggle behavior.Documentation
frontend/docs/application_config.md
was updated to account for the renamed filter category types, along with fixing outdated links.CheckList
Make sure you have checked all steps below to ensure a timely review.