Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why these changes are being introduced: When a search returns no results, the filter sidebar should be omitted and the 'no results' text should be larger. This change was requested as part of the GDT project, but it should apply to all TIMDEX UI apps. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/GDT-133 * https://mitlibraries.atlassian.net/browse/GDT-161 How this addresses that need: Updates the 'no results' text and implements the requested styling changes. The filter logic changes a bit to hide the sidebar: * In the search controller, empty aggregations are no longer extracted from the response. * In the results view, a few conditionals have been added to hide the filter sidebar, omit the `layout1q3q` class from the results wrapper, and render the 'no results' message as a header rather than a list element. * If a search returns no results, the pagination partial is hidden. Side effects of this change: * The results view is somewhat less elegant as a result of these changes. * A guard clause has been added to `SearchController#extract_filters` to protect against calling `select` on `nil`. (This can occur if the API returns errors, in which case it will return no aggregations.) * The `result_empty` partial has been removed. It is only one line of HTML that feels more readable inline. * Development and review of this work revealed accessibility concerns about the results summary (including the 'no results' message) being too deep in the tab order. This information should be foregrounded for screen reader users. I've opened GDT-161 to address this.
- Loading branch information