seatgeek / backstage-plugins

SeatGeek Backstage Plugins Collection
Apache License 2.0
34 stars 6 forks source link

Awards - missing picture element in page. #36

Open imbabamba opened 8 months ago

imbabamba commented 8 months ago

How do I fix this missing picture element?

image
imbabamba commented 8 months ago

also:

image

imbabamba commented 8 months ago

still issues with upload and missing image element

zhammer commented 8 months ago

hi @imbabamba. thanks for raising this with us.

do you have user authentication set up on your backstage instance? the awards backend requires user authentication to run: https://github.com/seatgeek/backstage-plugins/blob/086782d4fa01c71681d8a8942c61713e9c5a3a56/plugins/awards-backend/README.md?plain=1#L7-L9.

this looks like it may be an issue where a user token isn't set up and so the auth layer is sending an "Access Denied".

if you do have auth set up on your production instance but not on your local instance, you can try adding something like we did to your local config to get a "dummy" auth system running: https://github.com/seatgeek/backstage-plugins/blob/main/packages/backend/src/plugins/auth.ts.

imbabamba commented 8 months ago

@zhammer hi.

First of all, awesome plugin! and thanks for replying!

I will look into the backend 2 backend auth again. But what about the emtpy 'preview' element issue? Also would be great if "Aspect ration 3:1" text could be changed to like 150x50 px and warn about a more reasonable image size since most users wont understand which size is actually needed to get it to work.

zhammer commented 8 months ago

for the image preview issue, can you reload your page with network inspector on and check what the response on that image is? i'm not sure what's going on there.

agreed that the aspect ratio instruction is a little confusing. there's also rules on image size (max and min) on the backend that aren't clearly expressed there. i can take a look on how this is expressed on other UIs.

imbabamba commented 8 months ago

It appears when no image is selected.

image

if I remove this element, all looks good. Feels like it being invoked wrongly or maybe an "example" picture should be here instead. (looked like there were one on the demo you guys had.

zhammer commented 8 months ago

ah, this may just be some poor UI carried over from a change when this used to be autopopulated, it's not anymore. if you want to push up a change where that image element isn't rendered at all when there's no image uploaded yet, i'm happy to approve.

https://github.com/seatgeek/backstage-plugins/blob/086782d4fa01c71681d8a8942c61713e9c5a3a56/plugins/awards/src/components/AwardEditComponent/AwardEditComponent.tsx#L225-L227

imbabamba commented 8 months ago

I can wait til you have changed this. :)