From 7d289a4f3e9531a0c7e458a52af85d0ae5affab9 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 17 Jun 2020 12:38:00 +0200 Subject: [PATCH] UX: Style video elements, show descriptions (#10040) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a stop gap – ideally we would generate a thumbnail for uploaded videos. For now, a bit of intentionality in the style and a pinch of context should do. --- .../pretty-text/addon/engines/discourse-markdown-it.js | 4 +++- app/assets/javascripts/pretty-text/addon/white-lister.js | 1 + app/assets/stylesheets/common/base/onebox.scss | 9 +++++++++ test/javascripts/lib/pretty-text-test.js | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js index 213aef39d9a..358595d2485 100644 --- a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js +++ b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js @@ -147,6 +147,7 @@ function videoHTML(token, opts) { const preloadType = opts.secureMedia ? "none" : "metadata"; const dataOrigSrcAttr = origSrc !== null ? `data-orig-src="${origSrc}"` : ""; return `
+

${opts.alt}