* Change models and related files
* Update controllers and specs
* More renaming
* Seek and destroy, I mean search and replace
* Round up the stragglers
* Ground control to Major Travis...
* More fixes
* PR feedback
* Various fixes
* Rename view
* Fix list query builder
* Unify request specs
* Fix some API spec errors
* Fix remaining API specs
* Make spec conform to API
* Fix leftover problems
* Fix JS tests
* Fix column name in select
* Fix API specs
* Fix search specs
* Paging Mr. Travis
* Changed shecoded preview template
* Added a test for social preview template with multiple campaign tags
* feat: update some css properties to make it closer to the design (i think)
* Update to relative units
* Update spec
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* Custom social preview template for tags
* Added index on tags social_preview_template + small refactoring
* Add checks if index exists to tags migration
* Prepare factories and associations for Users::DeleteActivity specs
* Altered user associations, delete the needed associations in Users::DeleteActivity
* Moved and refined user deletion spec
* Removed useless commented user associations
* Refactored BackupData factory
* Refactored ProfilePin factory
* Refactored Reaction factory
* Fixed specs: Keep default _type in factories or specify it in tests
* Ok, notes shouldn't be deleted on user deletion
* Fixed creating reactable for specs
* Specify commentable/commentable_type explicitly when creating data for tests
* Fixed typo in the comments spec
* Removed unnneeded space
* Added aggregate_failures for testing user associations deletion
* Keep feedback_messages while deleting user activities
* update test so it fails from badge randomness
* Better caching
This removes the randomness from the views. Which means the cache keys
won't get regenerated every request.
The badges will still be in random positions, but it will change per
user/article rather than every render.
* Add route for comment social preview
* Add method comment to social_previews_controller
* Add view for comment social preview
* Fix spacing in meta keywords
* Update comments page keywords
* Create helper for comment social media image
* Use comment social image, add published condition for article social image
* Add tests for comment social preview
* Remove not_found fallback for social previews controller
* Remove cached_tag_list
* Update typos of word 'image' in spec
* Add failing tests for social previews controller. HTML changes between
requests, which breaks caching.
Since we use the HTML to generate the cache key. When the views have any
randomness in them, it breaks the cache, which means we regenerate
images on each request, rather than using what's in memcached.
Adding test to protect from regressions
* Fix randomness in social card templates
The aria tags are randomly generated. Since this is for rendering
images, they aren't needed.
* Make the linter happy by using the sanitize helper
* Add HtmlCssToImage for generating images
This will be used by social_previews to convert the templates into images.
Setup a fallback image primarily for local dev, so that this won't cause
errors if authentication is missing.
Caching is setup to use contents of the html/css. So it with
autobust/generate a new image whenever the markup changes.
* Update Article social preview template to not be random
+ Being random breaks caching (since we generate cachekey by a SHA of html content)
+ Use Roboto for when generating via HTML/CSS to Image
* Update Tag social preview template to not be random
+ Make rand deterministic so it doesn't break caching
* Update user social preview template for html/csstoimage
* Update shecoded template to work with both url2png and htmlcsstoimage
* Add ability to respond to .png for social previews controller
When adding .png to the url, these routes will now generate an image and
redirect to it.
This leaves the existing pages as they were, so we're backwards
compatible with all the existing links out in the world.
* Fix merge conflicts
* Remove some duplication
* Improve spec descriptions/read better
* clean up setting template with a ternary
* Initial automatic cleanup with rubocop
* Fix syntax error introduced by rubocop
* Cleanup seeds file
* Cleanup lib folder
* Exclude bin folder because it contains auto generated files
* Make Rubocop a little bit more chatty
* Block length should not include comments in the count
* Cleanup config folder
* Cleanup specs
* Updated Rubocop version and generated a todo file
* Fix broken ArticlesApi spec
* Fix tests
* Restored rubocop pre-commit hook