hubmapconsortium / portal-ui

HuBMAP Data Portal front end
https://portal.hubmapconsortium.org
MIT License
12 stars 2 forks source link

Austenem/CAT-816 identify contacts #3498

Closed austenem closed 2 months ago

austenem commented 2 months ago

Summary

Updates the Contributors table in Dataset, Collection, and Publication detail pages to include contact information from contacts array present in v1 of the Contributors schema. (v2 added an is_contact boolean to objects in the contributors/creators array). This update accounts for both versions.

Design Documentation/Original Tickets

CAT-815 Jira ticket CAT-816 Jira ticket (resolved in this update)

Testing

Manually tested by checking that impacted detail pages list any contacts that exist in their JSON format in the Contributors table. v1 does not include the is_contact field, v2 does.

Example of v1 dataset page: http://localhost:5001/browse/dataset/9f37a9b1f6073e6e588ff7e0dd9493b5#contributors Example of v2 dataset page: http://localhost:5001/browse/dataset/77c4620cac87b7b943402744899270b8#contributors

Example of v1 collection page: http://localhost:5001/browse/collection/3ae4ddfc175d768af5526a010bfe95aa Example of v2 collection page: http://localhost:5001/browse/collection/4b87c7596e1f4b4443612862fc562ff1

Example of v1 publication page: not found Example of v2 publication page: https://portal.hubmapconsortium.org/browse/publication/72cbeb8ff605fd5017cb2666cd19dfb7

Checklist

Additional Notes

Some minor modifications to the Dataset and Collection interfaces were made to account for the creators field.

austenem commented 2 months ago

I've added the new V0 schema interface and ContactAPIResponse as discussed in standup - I'm not 100% sure about the logic for the new Contacts interface, as I believe it varies very little from the Contributors, so if this could be reviewed that would be helpful!