DEV: updates to onebox 2.2.14 (#12713)

DEV: updates to onebox 2.2.14 (#12713)

This commit also updates github’s body onebox styles in Discourse core:

  • full width
  • prevents show-more btn to trigger vertical scrolling
  • makes text standout less and slightly bigger
diff --git a/Gemfile.lock b/Gemfile.lock
index a30f200..654c401 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -268,7 +268,7 @@ GEM
     omniauth-twitter (1.4.0)
       omniauth-oauth (~> 1.1)
       rack
-    onebox (2.2.13)
+    onebox (2.2.14)
       addressable (~> 2.7.0)
       htmlentities (~> 4.3)
       multi_json (~> 1.11)
diff --git a/app/assets/javascripts/discourse/app/initializers/onebox-decorators.js b/app/assets/javascripts/discourse/app/initializers/onebox-decorators.js
index f80fc6c..5b157b2 100644
--- a/app/assets/javascripts/discourse/app/initializers/onebox-decorators.js
+++ b/app/assets/javascripts/discourse/app/initializers/onebox-decorators.js
@@ -4,7 +4,7 @@ let _showMoreClickPostsElements = [];
 
 function decorateGithubOneboxBody(element) {
   const containers = element.querySelectorAll(
-    ".onebox.githubpullrequest .show-more-container, .onebox.githubissue .show-more-container"
+    ".onebox.githubcommit .show-more-container, .onebox.githubpullrequest .show-more-container, .onebox.githubissue .show-more-container"
   );
 
   if (containers.length) {
diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss
index e88206f..ddbc7e6 100644
--- a/app/assets/stylesheets/common/base/onebox.scss
+++ b/app/assets/stylesheets/common/base/onebox.scss
@@ -161,26 +161,21 @@ aside.onebox {
       }
     }
 
-    .github-info + .github-body-container {
-      margin-top: 1em;
-    }
-
     .github-body-container {
-      margin: 0 0 0.5em 0;
-      padding: 0.5em;
+      margin: 1em 0 0 0;
       color: var(--primary-very-high);
-      background: var(--hljs-bg);
       max-height: 400px;
       white-space: pre-wrap;
       overflow-y: auto;
       word-break: break-word;
       font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono",
         "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
-      font-size: $font-down-1;
+      flex: 1 0 100%;
+      box-sizing: border-box;
 
       .show-more {
         // padding on right for larger hitzone
-        padding: 0.5em 1.5em 0.5em 0.25em;
+        padding: 0.5em 1.5em 0em 0.25em;
       }
     }
 

GitHub sha: 81498bd1

This commit appears in #12713 which was approved by ZogStriP. It was merged by jjaffeux.