From 82d99f5834bf1e0341b11a80aba7ca3aa253e3c7 Mon Sep 17 00:00:00 2001 From: ludwiczakpawel Date: Thu, 2 Jul 2020 14:58:07 +0200 Subject: [PATCH] [deploy] Add collapsible panel to markdown help in editor (#9050) --- app/assets/stylesheets/components/tables.scss | 15 ++ app/assets/stylesheets/config/_generator.scss | 2 +- .../article-form/components/Help.jsx | 134 +++++++++++++++--- 3 files changed, 130 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/components/tables.scss b/app/assets/stylesheets/components/tables.scss index 1cc9d8f12..5f23e49ad 100644 --- a/app/assets/stylesheets/components/tables.scss +++ b/app/assets/stylesheets/components/tables.scss @@ -26,6 +26,21 @@ } } + &--compact { + td, + th { + padding: var(--su-2); + + @media (min-width: $breakpoint-m) { + padding: var(--su-2); + } + + @media (min-width: $breakpoint-l) { + padding: var(--su-2); + } + } + } + td { transition: background var(--transition-props); border-bottom: 1px solid var(--body-bg); diff --git a/app/assets/stylesheets/config/_generator.scss b/app/assets/stylesheets/config/_generator.scss index cd40b0ffd..f6f252f37 100644 --- a/app/assets/stylesheets/config/_generator.scss +++ b/app/assets/stylesheets/config/_generator.scss @@ -626,7 +626,7 @@ ( 'text', 'text-decoration', - ('underline': underline, 'none': none), + ('underline': underline, 'none': none, 'strike': line-through), (), false ), diff --git a/app/javascript/article-form/components/Help.jsx b/app/javascript/article-form/components/Help.jsx index 59dfb5a64..0f1167e87 100644 --- a/app/javascript/article-form/components/Help.jsx +++ b/app/javascript/article-form/components/Help.jsx @@ -41,7 +41,10 @@ export class Help extends Component { renderArticleFormTitleHelp = () => { return ( -
+

Writing a Great Post Title

  • @@ -60,7 +63,10 @@ export class Help extends Component { renderTagInputHelp = () => { return ( -
    +

    Tagging Guidelines

    • Tags help people find your post.
    • @@ -84,18 +90,15 @@ export class Help extends Component { renderBasicEditorHelp = () => { return ( -
      - You are currently using the basic markdown editor that uses - {' '} +
      + You are currently using the basic markdown editor that uses{' '} Jekyll front matter - . You can also use the - {' '} - rich+markdown - {' '} - editor you can find in - {' '} + . You can also use the rich+markdown editor you can find in{' '} UX settings { return ( -
      +

      Editor Basics

      • - Use - {' '} + Use{' '} Markdown - - {' '} + {' '} to write and format posts. +
        + Commonly used syntax + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + # Header +
        + ... +
        + ###### Header +
        + H1 Header +
        + ... +
        + H6 Header +
        *italics* or _italics_ + italics +
        **bold** + bold +
        [Link][https://...] + Link +
        + * item 1
        * item 2 +
        +
          +
        • item 1
        • +
        • item 2
        • +
        +
        + 1. item 1
        + 2. item 2 +
        +
          +
        • item 1
        • +
        • item 2
        • +
        +
        > quoted text + + quoted text + +
        `inline code` + inline code +
        + ``` +
        + code block +
        + ``` +
        +
        + code block +
        +
        +
      • - You can use - {' '} + You can use{' '} Liquid tags - - {' '} + {' '} to add rich content such as Tweets, YouTube videos, etc.