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 large link embeds #1560

Closed
wants to merge 6 commits into from
Closed

Conversation

WebFreak001
Copy link
Contributor

this PR depends on #1555 and also gets visual improvements from #1554 and #1556, which are already rebased here - but if you don't want to merge those into master I can remove the commits from this PR again as well.

Set as draft while the other PRs are still open, since this PR has the commits from the other PRs included as well (only last commit is relevant to this PR), but some people I chat with wanted to have this early so I already publish it here

This makes images that are sent as links embed as if they were uploaded as images, using the URL preview function. Good for when people are using their own image uploaders or linking to content on the web. Although currently the implementation does not fully mirror how regularly uploaded images look like. Small images are centered inside a static 400px width gray embed box, transparent images also show the gray embed box background.

Clicking on the images to view them fullscreen using the image viewer works well though.

Sample: big previews

@WebFreak001 WebFreak001 changed the title make small attachments not scale in timeline add large link embeds Nov 26, 2023
Copy link

github-actions bot commented Nov 27, 2023

Preview: https://1560--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

ultra wide / ultra tall but otherwise small images are cropped if too
small in one dimension (minimum size changed to 32x32 in timeline)
center is more likely to have relevant content than top left
@cyrneko
Copy link

cyrneko commented May 2, 2024

image
Currently with this PR, images will sometimes appear like this.

@WebFreak001
Copy link
Contributor Author

WebFreak001 commented May 2, 2024

the dependency PRs need to be merged first before this PR can be used or edited further

Can you check out my wfr.moe branch, which has all my local fixes applied, to check if it happens there? (there is also a deployed version on https://cinny.wfr.moe)

@cyrneko
Copy link

cyrneko commented May 2, 2024

the dependency PRs need to be merged first before this PR can be used or edited further

Ah, makes sense, I didn't take into account that the preview might not have those.

Works just fine on said branch :)
image

@ajbura
Copy link
Member

ajbura commented Jan 10, 2025

Closing as not plained

@ajbura ajbura closed this Jan 10, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants