openverse-frontend icon indicating copy to clipboard operation
openverse-frontend copied to clipboard

Some images don't have "Related images" but the header for the section is still displayed

Open krysal opened this issue 3 years ago • 7 comments

Problem

One of our current featured images (the one shown on the homepage) appear to have no related images after some modifications in the API endpoint (WordPress/openverse-api#865). This is likely happening with more images, so will be better to hide the header when the section is empty.

The details page of this featured image: https://search-production.openverse.engineering/image/648b566f-0228-4819-83d5-8f1d324ec06d

Screenshot 2022-08-22 at 15-06-24 File The victorious English 400 m  women's relay swimming team at Wellcome V0048555 Openverse

Alternatives

This is open to alternatives while is reworked on the API.

Implementation

  • [ ] 🙋 I would be interested in implementing this feature.

krysal avatar Aug 22 '22 19:08 krysal

Just to confirm, there are definitely no related images returned by the API endpoint, interesting:

https://api.openverse.engineering/v1/images/648b566f-0228-4819-83d5-8f1d324ec06d/related/

zackkrida avatar Aug 22 '22 21:08 zackkrida

I wonder if it's cache related. Checking now, I can see both the frontend and the API results for this link.

obulat avatar Aug 23 '22 12:08 obulat

Ah very strange, I can now as well. I don't think it's the cache though, because I've been testing this by appending unique query strings. Something else may be going on in the API 🤔

zackkrida avatar Aug 23 '22 13:08 zackkrida

In any case, given that there is a possibility that we might have images that are unrelated to anything else, we should add the check to not show the heading unless there is content to go below it.

dhruvkb avatar Aug 24 '22 11:08 dhruvkb

Just visited the link given in the issue, but it shows Related Images to me.

image

shreyanshmalvya avatar Aug 25 '22 07:08 shreyanshmalvya

@shreyanshmalvya Yes, it was something that happened for a few moments, we need to find out why does that happen but also to hide the section when there are no related images available.

Are you interested in working on this? :)

krysal avatar Aug 25 '22 14:08 krysal

@krysal Yes, I am, I even checked out the code to find any errors.

shreyanshmalvya avatar Aug 26 '22 11:08 shreyanshmalvya

Hello @shreyanshmalvya do you still plan to work on this issue? Or may I take look at it?

0kyn avatar Oct 27 '22 16:10 0kyn

@0kyn, it's been 2 months since @shreyanshmalvya commented. Feel free to take this up.

dhruvkb avatar Oct 28 '22 06:10 dhruvkb