-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
When avatar/header are GIF, generate static versions #1428
Conversation
validates_attachment_content_type :avatar, content_type: IMAGE_MIME_TYPES | ||
validates_attachment_size :avatar, less_than: 2.megabytes | ||
|
||
# Header upload | ||
has_attached_file :header, styles: { original: '700x335#' }, convert_options: { all: '-quality 80 -strip' } | ||
has_attached_file :header, styles: ->(f) { header_styles(f) }, convert_options: { all: '-quality 80 -strip' } |
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.
You can change this to
has_attached_file :header, styles: method(:header_styles), convert_options: { all: '-quality 80 -strip' }
if you want.
What's up with these test failures? |
Oh, apparently we have some JS tests someone wrote a long time ago that are now failing because I changed the |
}, | ||
|
||
getDefaultProps () { | ||
return { | ||
animated: true | ||
animate: false |
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.
I'm unfamiliar with React - is there an easy way for a user script to change this kind of thing?
Someone (not me) may want animated avatars even in non-hover. Would be nice to fetch that kind of thing from localStorage (or even the database, I guess.)
If this PR broke notifications (#1491), how in the world did the checks passed? Just curious. |
@Fastidious We don't have automated tests for the React.js front-end - only for the API and server in general. So front-end testing is done manually, and things can slip by. |
* When avatar/header are GIF, generate static versions. Account API returns "avatar"/"avatar_static", "header"/"header_static" Static version is the same as original for other cases Web UI de-animates avatars in toots, lists of users Fix #441, fix #596, prerequisite for #1064 * Fix JS test * Add rake task to generate static avatars/headers from GIF ones, add test
Fix #441, fix #596, prerequisite for #1064