guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.43k stars 119 forks source link

T1628 usage rights summary #4259

Closed AndyKilmory closed 1 month ago

AndyKilmory commented 3 months ago

What does this change?

The aim of this chage is to provide a framework for adapting the information presented in the 'Rights and restrictions' section of the metadata panel when an image (or multupe images) are selected. The actual text and icon displayed is controlled by a separate component - gr-usagerights-bbc.tsx - this controls the range of usage rights subject to the additional information - the logic dictating each set of rights and the icon and text to be displayed.

For example;

Screenshot 2024-04-09 at 09 51 18

In the case of multiple images selected it would look like;

Screenshot 2024-04-09 at 10 11 32

For usage rights not included in the list of options the display is effectively unchanged;

Screenshot 2024-04-09 at 09 52 31

How should a reviewer test this change?

Ensure that when an image matches one fo the criteria in collection in the usage rights tsx file that the usage rights section displays the correct additional text and icon and that when the usage rights of the image is not in that collection that the display remains unchanged.

Ensure that when multiple images are selected the 'info panel' displays usage rights correctly and consistently with current behaviour.

Access to this functionality is controlled by a config variable in the Kahuna config - set usageRightsSummary = true to gain access to functionality (setting to false turns it off) and if the parameeter is not present it defaults to false.

Tested? Documented?

AndyKilmory commented 1 month ago

Many thanks

prout-bot commented 1 month ago

Seen on auth, image-loader, thrall, cropper, collections, media-api, kahuna (created by @AndyKilmory and merged by @paperboyo 9 minutes and 35 seconds ago) Please check your changes!

prout-bot commented 1 month ago

Seen on metadata-editor, leases (created by @AndyKilmory and merged by @paperboyo 9 minutes and 40 seconds ago) Please check your changes!

prout-bot commented 1 month ago

Seen on usage (created by @AndyKilmory and merged by @paperboyo 9 minutes and 43 seconds ago) Please check your changes!