Skip to content

A platform for community discussion. Free, open, simple.

FIX: github onebox styles for commits (#25098)

Krise8509ddf5058
diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss
index 7010b3082fe..5501a927c84 100644
--- a/app/assets/stylesheets/common/base/onebox.scss
+++ b/app/assets/stylesheets/common/base/onebox.scss
@@ -480,6 +480,11 @@ pre.onebox code {
.github-info-container {
width: 100%;
overflow-x: hidden;
+ > span {
+ // TODO: remove in a few months
+ // replaced by .github-info in new commit oneboxes
+ grid-area: info;
+ }
}
.github-info {
diff --git a/lib/onebox/templates/githubpullrequest.mustache b/lib/onebox/templates/githubpullrequest.mustache
index 5868ba2e823..520c02d4429 100644
--- a/lib/onebox/templates/githubpullrequest.mustache
+++ b/lib/onebox/templates/githubpullrequest.mustache
@@ -29,15 +29,17 @@
<a href="{{link}}" target="_blank" rel="noopener">{{commit.message.lines.first}}</a>
</h4>
- <span>
- Commit by
- <a href="{{author.html_url}}" target="_blank" rel="noopener">
- <img alt="{{author.login}}" src="{{author.avatar_url}}" class="onebox-avatar-inline" width="20" height="20">
- {{author.login}}
- </a>
- in
- <a href="{{link}}" target="_blank" rel="noopener">{{title}}</a>
- </span>
+ <div class="github-info">
+ <span>
+ Commit by
+ <a href="{{author.html_url}}" target="_blank" rel="noopener">
+ <img alt="{{author.login}}" src="{{author.avatar_url}}" class="onebox-avatar-inline" width="20" height="20">
+ {{author.login}}
+ </a>
+ in
+ <a href="{{link}}" target="_blank" rel="noopener">{{title}}</a>
+ </span>
+ </div>
{{/commit}}
{{#comment}}