Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awards - missing picture element in page. #36

Open
imbabamba opened this issue Mar 1, 2024 · 8 comments
Open

Awards - missing picture element in page. #36

imbabamba opened this issue Mar 1, 2024 · 8 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@imbabamba
Copy link

imbabamba commented Mar 1, 2024

How do I fix this missing picture element?

image
@imbabamba imbabamba changed the title Awards - Error 3:1 aspect ratio and missing picture element in page. Awards - missing picture element in page. Mar 1, 2024
@imbabamba
Copy link
Author

also:

image

@imbabamba imbabamba reopened this Mar 4, 2024
@imbabamba
Copy link
Author

still issues with upload and missing image element

@zhammer
Copy link
Contributor

zhammer commented Mar 4, 2024

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:

This plugin relies on [Backstage authentication](https://backstage.io/docs/auth/)
in order to enforce ownership of awards. Please follow the documentation to
enable authentication before attempting to use this plugin!
.

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
Copy link
Author

@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
Copy link
Contributor

zhammer commented Mar 4, 2024

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
Copy link
Author

imbabamba commented Mar 4, 2024

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
Copy link
Contributor

zhammer commented Mar 4, 2024

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.

<Grid item>
<img alt="" src={awardImage} height="200" width="600" />
</Grid>

@imbabamba
Copy link
Author

I can wait til you have changed this. :)

@zhammer zhammer added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants