Skip to content

Spike: supermind twitter cards #2452

Olivia Madrid requested to merge chore/text-to-image-2425 into master

Ticket(s) / Related Merge Requests

#2452 (closed)

Summary of Changes

Added capabilities for using imagick to auto-generate an image file with text superimposed over a supermind gradient background.

Corresponding cli tool is available at Cli/Supermind/Annotate

Findings after initial research:

  • a lot of the status post groundwork is more or less complete
  • it should be fairly straightforward to add images over the gradient background but we should think more about designs first
  • the function I planned to use for handling multi-line text is actually in ImageMagick, not Imagick. So the unexpected speedbump here is that we will need to manually insert line breaks and set font size (or use ImageMagick?). I've seen a few examples from forums that we can use for this purpose, but will need to be tested very well

I would recommend splitting the remaining task into 3 tasks:

  1. annotate multi-line text over gradient #2456 (closed)
  2. add media (and text, when text exists) over gradient background #2457
  3. generate images and post to twitter when needed #2458 (closed)

Testing Considerations

This isn't being used anywhere, as it is still only for investigation purposes.

But it can be tested with the cli:

php cli.php Supermind Annotate annotate --width=1000 --text='supermind request text' --username='myusername' --output='/var/www/Minds/engine/annotatedImage.png'

Deployment Considerations

None

Regression Scope

None

Platform Affected (web, mobile, etc)

Web

Developer Testing Completed

Made 2:1 card with gradient background, text and username. Still needs tweaking+ to match designs.

Screenshots / Screen Recording

image

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Olivia Madrid

Merge request reports