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

[SDPAP-7863]added fix to have one publication author #1317

Closed yeniatencio closed 1 year ago

yeniatencio commented 1 year ago

Motivation and Context

We are updating publication author field to be restricted to one value (organisation taxonomy)across all projects then we need to update it in the FE.

Currently there is also an issue for publication author not being displayed on SSP project and this is happening because this field is contemplating one value in the BE.

JIRA issue: https://digital-vic.atlassian.net/browse/SDPAP-7863 BE ticket : https://digital-vic.atlassian.net/browse/SDPAP-7925 Ripple pr link: https://app.pr-1317.ripple.sdp4.sdp.vic.gov.au/ BE testing link: https://nginx-php.pr-323.content-reference-sdp-vic-gov-au.sdp4.sdp.vic.gov.au/

Changed

  1. Updated the type string for author prop.
  2. Changed to get the string value of author name from the field.
  3. Added same change for the print page.

    Tide_publication pr needs to be merged before to have this pr merged.

Screenshots

Screenshot 2023-08-31 at 6 57 42 pm Screenshot 2023-08-31 at 6 58 52 pm

How Has This Been Tested?

Types of changes

Checklist

yeniatencio commented 1 year ago

Hey @yeniatencio,

One super minor thing, can you update this publication storybook story as well.

Screenshot 2023-09-05 at 2 25 56 pm

Is there a chance some sites will return an array of authors and others will return the single value while the backends are being updated? Just wondering if we would need to support both.

Cheers

Hey @lambry , I have created a pr in core to have the publication author field a single value in all BEs. So no chance to have more than 1 single value for Publication author. PS, I have updated the storybook, Thanks

yeniatencio commented 1 year ago

Hey @dylankelly , can you please re-review, i have now changed the code to handle the case of older tide with an array, and newer tide with a single value which was David's feedback.

yeniatencio commented 1 year ago

Thanks @yeniatencio - appreciate you adding this to prevent any surprises.

Thank to you @dylankelly . Good thing to anticipate that scenario.