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

Add icon field to instance endpoint #30205

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

renchap
Copy link
Sponsor Member

@renchap renchap commented May 7, 2024

As we now allow admins to customize their app icon, it may be useful to expose it so apps can use it in the UI.

This is using the Android icons as they provide a good range of sizes.

@renchap renchap added the api REST API, Streaming API, Web Push API label May 7, 2024
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@renchap
Copy link
Sponsor Member Author

renchap commented May 19, 2024

Updated to use the presenter from #30259 so the cache is used for the icons

Gargron
Gargron previously approved these changes May 19, 2024
src = URI.join(root_url, src).to_s if src.present?

{
src: src || frontend_asset_url("icons/android-chrome-#{size}x#{size}.png"),
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to make this output consistent with the thumbnail property?

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

We can, but there would be no blurhash, and what should the keys be? The thumbnail uses @1x, @2x but I dont think it makes sense for the icons. Should we use size?

Copy link
Contributor

This pull request has resolved merge conflicts and is ready for review.

As we now allow admins to customize their app icon, it may be useful to expose it so apps can use it in the UI.

This is using the Android icons as they provide a good range of sizes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API, Streaming API, Web Push API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants