Update filters options for Instances with the facet data.
Description
Environment
Potential Workaround
Attachments
- 03 Mar 2021, 07:37 PM
defines
has to be done before
Checklist
hideTestRail: Results
Activity
Igor Godlevskyi March 4, 2021 at 8:30 PM
Today it was also discussed that initially all the open facets loaded with the limit 5.
Clicking the more button or focussing the the facet filter we load all the data-options.
Applying the facet/filter or performing the search will trigger the get request to fetch the facets.
Facets that has selected data-options will be fetched fully and those without selected with limit 5.
Magda Zacharska March 3, 2021 at 11:35 PM
@Igor Godlevskyi - we are not going to show filters/facets with zero count
Igor Godlevskyi March 3, 2021 at 8:07 PM
As discussed today with @Mikhail Fokanov the following:
1) Initially the current filters loaded and used to map to the facets count to the existing filters.
The question to clarify with @Magda Zacharska: Do we show the filter/facets with zero count?
If we need to show them then we load all the vocabulary data as we do now and combine it with the facets data.
If we do not need to then we do not load vocabulary data and rely just on the facets data. In this case we can remove >10 server calls during the initial load.
2) When the accordion with facet is opened the facet is loaded with `limit` query parameter
As discussed initially loaded 5 facet data-options.
3) Today It was proposed to load all the set of facet data-options when the facet filter is focussed or typed.
In my opinion we have the `more` button and with the more button we can load the whole set of facet data-options.
In this case we would not show facet filter if the more button is not clicked.
Having all data-options loaded we can show the facet filter to filter facet data-options
@Mikhail Fokanov One scenario we did not disused.
If we have all facets loaded all the data-options e.g. with the more button. If we apply any filter/facet we need to fetch all the facets.
Do we fetch them with the limit? Or if once all the data-options were already loaded we fetch the filters without limit?
If we do load with the limit than how can we show the count for selected data-options that does not fit into the limit?
If we load without the limit then we would need the way to specify for each facet whether it is loaded with or without limit.
@Oleksii Petrenko, I believe we would need an additional small meeting to clarify those questions.
Update filters options for Instances with the facet data.
Filters/facets options should be updated in case if search query or filter is stated and only for the open facets/filters