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

Document how to set an extension image #30459

Merged
merged 2 commits into from
Jan 30, 2023

Conversation

holly-cummins
Copy link
Contributor

Now that quarkusio/extensions#23 is implemented, we should document it. @maxandersen and @gastaldi , what do you think of the key I've chosen in the yaml? I can change it (and the implementation) if we want something else.

The image display logic is

  • No release since we started adding metadata: we show a faded quarkiverse logo (because we don't have the richer information)
  • No image information: we show the logo of the github org, usually quarkiverse or quarkus
  • Github social media preview set: we crop and use that
  • Image override in extension.yaml: we use that

I didn't want to burden the docs with all that information, but can if we think it adds something.

Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maxandersen
Copy link
Member

The priority is reversed if that list I assume? Ie. If metadata is set that is used over the feedback above?

"Logo" I would refrain from using as not every image/icon used will be an actual logo.

I would suggest "icon" or "image" ?

Copy link
Member

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Member

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@maxandersen
Copy link
Member

Also, it's expected to be an external url not a reference inside the extension itself, correct?

@gastaldi
Copy link
Contributor

Ah good catch, probably should be icon-url for clarity

@holly-cummins
Copy link
Contributor Author

Ah good catch, probably should be icon-url for clarity

I didn't do icon-url since the guide was a url, and didn't have 'url' tacked on the end. However, I guess there's more ambiguity with the logo, since someone could shove an image into their source control system and assume it would be used. I'll change it to icon-url.

@holly-cummins
Copy link
Contributor Author

And yes, @maxandersen, the logic list was in ascending order of importance, so reverse priority. No, I don't know why I thought that was a helpful order to write it in. :)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@gsmet
Copy link
Member

gsmet commented Jan 19, 2023

Oh, looking forward to add the nice icon created by @insectengine for Quarkus GitHub App :).

Copy link
Member

@maxandersen maxandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall good but I would suggest we give bit of more requirements for the image.

especially type and if png/jpeg allowed then some size recommendations.

@holly-cummins
Copy link
Contributor Author

We don't really have any size requirements, since the framework resizes and crops for us, but I'll make that clear. Cropping also behaves differently for GitHub social media previews and images specified in the yaml, so I'll explain that. This is probably too much to squish into a one-liner annotation, so I'll add a section.

@gsmet
Copy link
Member

gsmet commented Jan 23, 2023

@holly-cummins is SVG allowed?

Also, while it does some cropping, how does it handle high DPI (i.e. how to not end up with a blurred image on macOS)?

@holly-cummins
Copy link
Contributor Author

I had to test SVG support, since I’m relying on the framework for image processing. By default, SVG doesn’t work, so I’ve added some extra implementation to support it. This only covers the case where the image is set in the extension yaml. If we’re getting the image from GitHub, they have their own rules, which exclude SVG.

image

@gsmet, do you have a link explaining the high DPI issue? I'm included to assume the sharp plugin does the right thing, but I couldn't search properly without understanding the issue better.

@holly-cummins
Copy link
Contributor Author

@gsmet @maxandersen do you have thoughts on adding a new section vs making the bullet point description of the field a whole paragraph? I feel like if I add more detail I'm getting to where it needs its own section, but looking at https://quarkus.io/guides/extension-metadata, the structure doesn't really have a place to put extra information. So I could just add more specifics to the bullet point. There's not much people can do wrong, especially now that svg is supported too, but I can see they might like some reassurance that they can't get it wrong. :)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge it now but I'll let @maxandersen approve.

@gsmet gsmet merged commit f060bb8 into quarkusio:main Jan 30, 2023
@quarkus-bot quarkus-bot bot added this to the 2.17 - main milestone Jan 30, 2023
@gsmet
Copy link
Member

gsmet commented Jan 30, 2023

Let's get this in. Thanks.

@github-actions
Copy link

🙈 The PR is closed and the preview is expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants