- Issue created by @chrisfromredfin
- 🇮🇳India libbna New Delhi, India
Hi @chrisfromredfin I have queries on which I need your input.
I am planning to work on this issue and I have gone through the figma design also but how are we going to get the images?
In the module's drupal org page I can see the image field, are we going to fetch them using an API?Also is there any approach to create a slideshow that we need to take care while working?
Let me know details so that I can work on this issue. Thanks!
- 🇺🇸United States chrisfromredfin Portland, Maine
That IS the trick of it, yes. The backend for Drupalorg JSON:API _should_ be providing us with images as "images" on the project object here: https://git.drupalcode.org/project/project_browser/-/blame/2.0.x/src/Plu...
The issue might actually just be that we're referencing at project_images here instead of maybe just "images" I'm not sure. https://git.drupalcode.org/project/project_browser/-/blob/2.0.x/sveltejs...
We'll need to dig!
- 🇮🇳India libbna New Delhi, India
Okay, thanks! I will look into it but unassigning myself from the issue if someone else wants to try it.
- First commit to issue fork.
- 🇪🇸Spain fjgarlin
There seems to be an issue with the search index where the images are not being mapped correctly. The data is in the server (aka, the images are migrated), but it's just the index not serving them.
I suspect that it's something opensearch-specific. When I did the initial integration with solr locally, it worked, but we needed to change it to elasticsearch first, and then opensearch (that's what we have now and it's there to stay).
I'll assign the issue to myself now until it is unblocked.
WIP.
- 🇪🇸Spain fjgarlin
Permissions!! (sort of). We introduced "json_extras" and the "files" were not allow-listed.
Changed that and we can now see data in the "field_project_images" field here https://www.drupal.org/jsonapi/index/project_modules?filter%5Bmachine_na... → , which the JsonApi plugin should be able to read.
Though @chrisfromredfin is right on #4, the property used in Svelte seems to be the wrong one. Unassigning as the blocker from the endpoint is now fixed and the work can continue.
Thanks @fjgarlin for the fix, I tested this feature after the fix and there seems to be some unusual behaviour as some of the modules such as (Metatag, field_group) which has more than one image but still the slider is not appearing where as in some cases such as (drupal-views_bulk_operations,module_filter) have images sliders on them.
Though @chrisfromredfin is right on #4, the property used in Svelte seems to be the wrong one. Unassigning as the blocker from the endpoint is now fixed and the work can continue.
Completely agree with this but i still wonder why does some modules get this and the others not.I'll try to dig more into this, but it is a strange behaviour.
- 🇪🇸Spain fjgarlin
No problem. First place to look at is the json output. If the date is not there, shout my way (it could be permissions, cache, migrations...).
If the data is there, then it's something on project_browser :-) I have recorded a video which shows that the image carousel is now appearing for the modules which have more than one image.I think this was not something related to Project browser but it was something related to the JSON endpoint which @fjgarlin resolved in #8 📌 Add slideshow to project detail page Active .
I still think that #4 is valid as we are setting the images inimages
property but we are getting the data insideproject_images
.Maybe we need to look into where are we mutating that property , but as far as the scope of this issue is concerned i think the problem no longer exists so we can close this issue.- 🇺🇸United States chrisfromredfin Portland, Maine
OK, we do need to fix the logic so that even if there's one image it should show that one image. The "skip first image" logic was from when we were doing the logo as the first image and therefore wanted to skip it. I will update the IS and title.
I'm sure that since images are showing, we must be translating them somewhere in either the source plugin or the Svelte, so I'm less worried about Sherlock Holmes-ing that. :)
- Merge request !613#3477238:Show all images for a project, even if only one → (Merged) created by utkarsh_33
- 🇮🇳India narendraR Jaipur, India
Added ✨ Consider making 'detail page' a modal window instead of a separate "page" in app Active as related, as if this issue goes in first, this change also needs to be done in that issue.
- 🇮🇳India narendraR Jaipur, India
I am not seeing images for field_group, token, metatag.
- Status changed to Needs review
25 days ago 6:40am 27 November 2024 The issue reported is fixed and now we can see the images.Marking it NR.
-
chrisfromredfin →
committed a5b07d4f on 2.0.x authored by
utkarsh_33 →
Issue #3477238: Show all images for a project, even if only one
-
chrisfromredfin →
committed a5b07d4f on 2.0.x authored by
utkarsh_33 →
Automatically closed - issue fixed for 2 weeks with no activity.