From 02f7f3619a2af35ec29aface76bd6b5ba0f1a725 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 26 Oct 2017 06:46:50 -0700 Subject: [PATCH 1/3] Remove translateZ(0) on modal overlay (#5478) --- app/javascript/styles/mastodon/components.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index ead1c8866..d7216cd1d 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -3067,7 +3067,6 @@ button.icon-button.active i.fa-retweet { right: 0; bottom: 0; background: rgba($base-overlay-background, 0.7); - transform: translateZ(0); } .modal-root__container { From 4f337c020a7ca7a77086af5021c9c152fa1f07fc Mon Sep 17 00:00:00 2001 From: unarist Date: Thu, 26 Oct 2017 22:48:35 +0900 Subject: [PATCH 2/3] Fix Cocaine::ExitStatusError when upload small non-animated GIF (#5489) Looks like copied tempfile need to be flushed before further processing. This issue won't happen if the uploaded file has enough file size. --- lib/paperclip/gif_transcoder.rb | 1 + spec/fixtures/files/mini-static.gif | Bin 0 -> 1188 bytes spec/models/media_attachment_spec.rb | 31 +++++++++++++++++---------- 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 spec/fixtures/files/mini-static.gif diff --git a/lib/paperclip/gif_transcoder.rb b/lib/paperclip/gif_transcoder.rb index cbe53b27b..629e37581 100644 --- a/lib/paperclip/gif_transcoder.rb +++ b/lib/paperclip/gif_transcoder.rb @@ -10,6 +10,7 @@ module Paperclip unless options[:style] == :original && num_frames > 1 tmp_file = Paperclip::TempfileFactory.new.generate(attachment.instance.file_file_name) tmp_file << file.read + tmp_file.flush return tmp_file end diff --git a/spec/fixtures/files/mini-static.gif b/spec/fixtures/files/mini-static.gif new file mode 100644 index 0000000000000000000000000000000000000000..fe597b215551713cc487b98e6dd1e820f632787b GIT binary patch literal 1188 zcmX9-ZDHmY2RGzewceuYnQBUUf0@m``YHk#f38}a!&1;N>t^uzMNlf zy0?4*0SpMB83P>P2#(q5@C48B0REkCkl!y{j5=u(R$UsJ9OeSPXmT}~T>XZFHg z*&7FNAP&qyI4B3>2#&;&ISNPRXq>=_I58*Tq@0WmY{bTF!lrDQg3LGxSRew;jEI9c z63601oQgB?5KrP+yoguvCIJ#i0!t7HD#0W|B1vS4B2gupBuFAjEJ-A(Bol)eiLsc7 zsaR$|i%kkvh(fa%>Y$F)u{u$w>P$VQ%jIfCkdQ8bpI?Fpbbi8d;-gRE?$y znn)9C5>2Yf)SyOctR`xz=WSkABU6%b#ZEUBe(vuw1icBVYfec_Ltw|#lL*zn)1Ygg`nU_PX( z?*57Gh3x*Sx`&P~{PwN>*%geeQaAtd9yyc49E^RpUITr1`e&*$8m)F02 zeD~1$=jOb8PhngdXN~Qv`01BVUp>2)<5j(dMKhM~Jg~I;(UYtCj}7jcbHn`WYWAGi zSXKS~;om-MY3khf&%5_)HQ8b`^?1a9kHYhAI|%trLU*@lY?8|-?*o%bD!UN z^ykTU_SgRV%Bda2;Z-j!XgYn@(1OD{w6Jq@{O;E3Yh_ z{BHf4H_zQSRBS)K>(>JxZ#(qSS3}FbUi{+KN9xAcd^z)*-eTjyP469~39MC~dg)kG|6lcRxA1=G>{rUi;hgjwScL(f9Ndn_BCuZ|quzTmA=5n<3o* literal 0 HcmV?d00001 diff --git a/spec/models/media_attachment_spec.rb b/spec/models/media_attachment_spec.rb index 9fce5bc4f..435b4f326 100644 --- a/spec/models/media_attachment_spec.rb +++ b/spec/models/media_attachment_spec.rb @@ -20,20 +20,29 @@ RSpec.describe MediaAttachment, type: :model do end describe 'non-animated gif non-conversion' do - let(:media) { MediaAttachment.create(account: Fabricate(:account), file: attachment_fixture('attachment.gif')) } + fixtures = [ + { filename: 'attachment.gif', width: 600, height: 400, aspect: 1.5 }, + { filename: 'mini-static.gif', width: 32, height: 32, aspect: 1.0 }, + ] - it 'sets type to image' do - expect(media.type).to eq 'image' - end + fixtures.each do |fixture| + context fixture[:filename] do + let(:media) { MediaAttachment.create(account: Fabricate(:account), file: attachment_fixture(fixture[:filename])) } - it 'leaves original file as-is' do - expect(media.file_content_type).to eq 'image/gif' - end + it 'sets type to image' do + expect(media.type).to eq 'image' + end - it 'sets meta' do - expect(media.file.meta["original"]["width"]).to eq 600 - expect(media.file.meta["original"]["height"]).to eq 400 - expect(media.file.meta["original"]["aspect"]).to eq 1.5 + it 'leaves original file as-is' do + expect(media.file_content_type).to eq 'image/gif' + end + + it 'sets meta' do + expect(media.file.meta["original"]["width"]).to eq fixture[:width] + expect(media.file.meta["original"]["height"]).to eq fixture[:height] + expect(media.file.meta["original"]["aspect"]).to eq fixture[:aspect] + end + end end end From d556be2968641c265360297fd268a24119c68670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8A=E3=82=93=E3=81=99=E3=81=8D?= <6533808+rinsuki@users.noreply.github.com> Date: Thu, 26 Oct 2017 22:52:48 +0900 Subject: [PATCH 3/3] Fix column design broken with very long title (#5493) * Fix #5314 * fix not beautiful code * fix broken design with mobile view * remove no longer needed code --- .../mastodon/components/column_header.js | 4 +++- app/javascript/styles/mastodon/components.scss | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js index e4fa8fa7a..80a8fbdb3 100644 --- a/app/javascript/mastodon/components/column_header.js +++ b/app/javascript/mastodon/components/column_header.js @@ -137,7 +137,9 @@ export default class ColumnHeader extends React.PureComponent {

- {title} + + {title} +
{backButton} diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index d7216cd1d..516f8de7d 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -2280,6 +2280,7 @@ button.icon-button.active i.fa-retweet { } .column-header { + display: flex; padding: 15px; font-size: 16px; background: lighten($ui-base-color, 4%); @@ -2305,12 +2306,10 @@ button.icon-button.active i.fa-retweet { } .column-header__buttons { - position: absolute; - right: 0; - top: 0; - height: 100%; - display: flex; height: 48px; + display: flex; + margin: -15px; + margin-left: 0; } .column-header__button { @@ -2378,6 +2377,14 @@ button.icon-button.active i.fa-retweet { } } +.column-header__title { + display: inline-block; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + flex: 1; +} + .text-btn { display: inline-block; padding: 0;