A platform for community discussion. Free, open, simple.
FEATURE: bump onebox version, add styling for new reddit image onebox
Maja Komelb0053f3a1c5e
diff --git a/Gemfile b/Gemfileindex 0ab63546485..c73bd3f4cc5 100644--- a/Gemfile+++ b/Gemfile@@ -44,7 +44,7 @@ gem 'redis-namespace'gem 'active_model_serializers', '~> 0.8.3'-gem 'onebox', '1.8.82'+gem 'onebox', '1.8.83'gem 'http_accept_language', '~>2.0.5', require: falsediff --git a/Gemfile.lock b/Gemfile.lockindex 322daf1f2c6..df5b35e532e 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -214,7 +214,7 @@ GEMmocha (1.5.0)metaclass (~> 0.0.1)mock_redis (0.18.0)- moneta (1.0.0)+ moneta (1.1.0)msgpack (1.2.6)multi_json (1.13.1)multi_xml (0.6.0)@@ -263,7 +263,7 @@ GEMomniauth-twitter (1.4.0)omniauth-oauth (~> 1.1)rack- onebox (1.8.82)+ onebox (1.8.83)htmlentities (~> 4.3)moneta (~> 1.0)multi_json (~> 1.11)@@ -524,7 +524,7 @@ DEPENDENCIESomniauth-oauth2omniauth-openidomniauth-twitter- onebox (= 1.8.82)+ onebox (= 1.8.83)openid-redis-storeparallel_testspgdiff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scssindex 2a9eaa8c15e..f0f833a0a79 100644--- a/app/assets/stylesheets/common/base/onebox.scss+++ b/app/assets/stylesheets/common/base/onebox.scss@@ -244,8 +244,9 @@ aside.onebox {}}- // instagram fixes- .instagram-images {+ // instagram + reddit fixes+ .instagram-images,+ .scale-images {clear: both;position: relative;@@ -262,7 +263,8 @@ aside.onebox {position: absolute;}- .instagram-image {+ .instagram-image,+ .scale-image {padding: 5px 5px 5px 5px;max-width: 100%;max-height: 100%;diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rbindex 68a3055011f..17ae7387df9 100644--- a/lib/cooked_post_processor.rb+++ b/lib/cooked_post_processor.rb@@ -568,7 +568,7 @@ class CookedPostProcessornew_parent = img.add_next_sibling("<div class='aspect-image' style='--aspect-ratio:#{width}/#{height};'/>")new_parent.first.add_child(img)end- elsif (parent_class&.include?("instagram-images") || parent_class&.include?("tweet-images")) && width > 0 && height > 0+ elsif (parent_class&.include?("instagram-images") || parent_class&.include?("tweet-images") || parent_class&.include?("scale-images")) && width > 0 && height > 0img.remove_attribute("width")img.remove_attribute("height")img.parent["class"] = "aspect-image-full-size"