dpc-sdp / ripple

Ripple is the frontend framework for Single Digital Presence, delivered using Nuxt and Vue.js
Apache License 2.0
61 stars 37 forks source link

Feature/content collection total fix #1126

Closed alan-cole closed 2 years ago

alan-cole commented 2 years ago

Motivation and Context

JIRA issue: https://digital-engagement.atlassian.net/browse/SDPA-

Changed

  1. Fix issue with Content Collection when reading ES total value. It used to be an integer, but is now an object with a "value" property. This should fix issues with pagination not displaying and the total result description not displaying.

ES Response before: Screen Shot 2022-01-24 at 4 24 25 pm

ES Response after: Screen Shot 2022-01-24 at 4 24 53 pm

  1. Display component to properly default to card. This will fix issue where if no value set, cards would not appear in a grid.

Before: Screen Shot 2022-01-24 at 4 29 49 pm

After: Screen Shot 2022-01-24 at 4 29 30 pm

Screenshots

How Has This Been Tested?

Types of changes

Checklist

anthony-malkoun commented 2 years ago

@dylankelly this looks very non contentious to me but could you run a quick eye over it if you get a chance. This PR is just going against another test PR so can merge this safely and review later if you prefer.

dylankelly commented 2 years ago

Yep LGTM - happy for it to be merged into integration branch https://github.com/dpc-sdp/ripple/tree/feature/tide_content_collection_widget_ui

@alan-cole here is the relevant changelog item from Elasticsearch 7 breaking change https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#hits-total-now-object-search-response