From 615039f228adf261bbaa0cfa9682739da29ccc2f Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 7 Oct 2019 19:26:10 +0100 Subject: [PATCH] FEATURE: Improve GitHub commit, PR and issue onebox rendering Bump onebox version to include new github rendering, and add relevant CSS Avatars are reduced in size significantly, and icons are added to easily differentiate PRs and commits. The 'Issue:' prefix is removed from issue oneboxes, to make them consistent with commits and PRs. --- Gemfile | 2 +- Gemfile.lock | 6 +++--- app/assets/stylesheets/common/base/onebox.scss | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index e9c9af13af0..7bafe7b9f1f 100644 --- a/Gemfile +++ b/Gemfile @@ -50,7 +50,7 @@ gem 'redis-namespace' gem 'active_model_serializers', '~> 0.8.3' -gem 'onebox', '1.9.13' +gem 'onebox', '1.9.14' gem 'http_accept_language', '~>2.0.5', require: false diff --git a/Gemfile.lock b/Gemfile.lock index ac2a8ca0c8f..7aab14d5cf7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -245,7 +245,7 @@ GEM omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) rack - onebox (1.9.13) + onebox (1.9.14) htmlentities (~> 4.3) moneta (~> 1.0) multi_json (~> 1.11) @@ -360,7 +360,7 @@ GEM ruby_dep (1.5.0) rubyzip (2.0.0) safe_yaml (1.0.5) - sanitize (5.0.0) + sanitize (5.1.0) crass (~> 1.0.2) nokogiri (>= 1.8.0) nokogumbo (~> 2.0) @@ -501,7 +501,7 @@ DEPENDENCIES omniauth-oauth2 omniauth-openid omniauth-twitter - onebox (= 1.9.13) + onebox (= 1.9.14) openid-redis-store parallel_tests pg diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss index b00f53fb834..37f7245000e 100644 --- a/app/assets/stylesheets/common/base/onebox.scss +++ b/app/assets/stylesheets/common/base/onebox.scss @@ -378,6 +378,23 @@ pre.onebox code { white-space: normal; } +// Onebox - Github - PR, Commit & Issue +.onebox.githubpullrequest, +.onebox.githubcommit, +.onebox.githubissue { + .github-icon { + float: left; + margin-right: 10px; + fill: $primary-high; + } + + .onebox-avatar-inline { + height: 1em; + width: 1em; + margin-right: 6px; + } +} + //Onebox - Github - Pull request .onebox-body .github-commit-status { background: #f5f5f5;