eclipse-tractusx / portal-frontend

Portal Frontend
Apache License 2.0
4 stars 25 forks source link

App Access Management UI Bug with carousel element #814

Closed jjeroch closed 1 month ago

jjeroch commented 1 month ago

Found on INT Version 2.0.0 RC-8

UI broken Instead of displaying the cards in a row they are displayed vertical. Check needed. This must have been introduced lately.

image

NOTE: API response used to display the app cards GET https://portal-backend.int.demo.catena-x.net/api/Apps/subscribed/activesubscriptions only responses with one element

image: "933aa403-bebb-4bcf-b99f-fc457f5e11c8"
name: "Managed SDE"
offerId: "70f38085-cde0-42c9-a779-881143e029b9"
provider: "T-systems"
subscriptionId: "8e5fd4c4-6669-4a63-82ea-9605b89d136f"

it seems that the FE displays the one element three times.

oyo commented 1 month ago

It seems to be caused by react-slick library that we are using for the Carousel. My suggestion for a quick fix: render it as static Cards when the available width is large enough for all items and only use a Carousel if there are more items than screen space.

Simplified Pseudocode items.length * itemWidth < screenWidth ? <Cards items{...} /> : <Carousel>{items}</Carousel>