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

Support custom thumbnails in posts #1495

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Jul 12, 2024

Pull Request Description

This PR adds support for the Thumbnail URL field in the post creator. Note that, per the web UI, this option is not available when the main URL points to an image.

Notes

  • The web UI shows the custom thumbnail field for posts with no URL (text-only), but it does not actually show the thumbnail. For now I've made Thunder match this behavior, but in the future we may wish to hide the custom thumbnail field when there is no URL (unless Lemmy decides to show the thumbnail for text posts).
  • Thunder supports adding a custom thumbnail when initially posting, as well as adding one when editing.
  • This requires a database change (for drafts) and I know there are two other PRs with database changes, so the schema and migration version numbers I have here will most likely have to change (depending on who goes first).

Issue Being Fixed

Issue Number: #1447

Screenshots / Recordings

qemu-system-x86_64_KebBW1AFzE.mp4

Checklist

  • If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
  • Did you use localized strings (and added appropriate descriptions) where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo micahmo mentioned this pull request Jul 16, 2024
3 tasks
Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

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

LGTM!

@hjiangsu
Copy link
Member

One other cool suggestion (that we can implement later) would be the ability to upload a custom thumbnail and use that rather than finding an existing link!

@hjiangsu hjiangsu merged commit 762f130 into thunder-app:develop Jul 16, 2024
1 check passed
@micahmo
Copy link
Member Author

micahmo commented Jul 16, 2024

One other cool suggestion (that we can implement later) would be the ability to upload a custom thumbnail and use that rather than finding an existing link!

Agreed! It should be pretty easy to add as well. The only reason I didn't was because the web UI doesn't (for whatever reason).

@micahmo micahmo deleted the feature/custom-thumbnail branch July 16, 2024 18:11
@micahmo
Copy link
Member Author

micahmo commented Jul 16, 2024

@hjiangsu Just FYI, since you may have been testing other changes with the same database migration number as this one, you may have problems starting Thunder after taking these changes. You might just need to execute some of the statements manually (regardless of the migration number) to get everything working. I know I did. 😊

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

Successfully merging this pull request may close these issues.

2 participants