-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 dynamic list preview image for using when sharing in Twitter, OpenGraph #6608
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool! Placing images to create a larger representation is tricky but it can really get users excited. I provided a few bits of feedback. overlay_covers_over_background()
is about 80 lines long which will make it difficult to test and maintain. So, once you are satisfied with the resulting social card, you should think about how to break this into two smaller functions. The first function could get the images and the second could build the social card from those images. This is really great work and I know our users will be excited to see it.
https://testing.openlibrary.org/people/mekBot/lists/OL104041L/Popular_Books is currently not passing validation https://cards-dev.twitter.com/validator because it times out so we may have to brainstorm better solutions for generating or caching list previews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mek's changes currently on testing
Are we still using all these files? Let's cleanup / |
After this PR lands, we should try to move the rending logic / endpoints to coverstore so our webheads are not doing the work. Right now if we move the location of coverstore python file, then the list/preview endpoint can break. In the future, the og:twitter url or w/e should link directly to covers.openlibrary.org. This is not a blocker for this PR and can be done in a followup. |
… class in order to test on web the image that we create. Make some little chanches on overlay_covers_over_background
…ge with only the covers in the correct possition
Co-authored-by: Christian Clauss <cclauss@me.com>
180e482
to
e356329
Compare
Co-authored-by: Mek <michael.karpeles@gmail.com>
Co-authored-by: Michael E. Karpeles (mek) <michael.karpeles@gmail.com>
Co-authored-by: Drini Cami <cdrini@gmail.com>
for more information, see https://pre-commit.ci
1f6c7f0
to
fd5b54f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright! I removed those no longer used images and fixed some other small things I noticed. Tested working: https://testing.openlibrary.org/people/mekBot/lists/OL195979L/Dr._Michael_Levin's_Unofficial_Library/preview.png .
I also did a full rebase and squashed some commits to make the history a little tidier :)
Great work @constantinazouni and @Vassilis-Boubis ! @mekarpeles and I decided to implement these last small fixes to make sure you all can focus on your upcoming exams :) Happy studying!
Awesome innovation! I bet that this is going to be a popular feature. |
Closes #6054
Technical
Testing
Screenshot
Stakeholders
This is a draft with what we have done so far. We have created successfully the image for the social-card and now we need to create the api endpoint