Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown block: move support link away from description #28416

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion client/gutenberg/extensions/markdown/edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
/**
* External dependencies
*/
import { BlockControls, PlainText } from '@wordpress/editor';
import { BlockControls, InspectorControls, PlainText } from '@wordpress/editor';
import { Component } from '@wordpress/element';
import { ExternalLink, PanelBody } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -82,6 +83,14 @@ class MarkdownEdit extends Component {

return (
<div className={ className }>
<InspectorControls>
<PanelBody className="jetpack-markdown__support">
<ExternalLink href="https://en.support.wordpress.com/markdown-quick-reference/">
{ __( 'Support reference' ) }
</ExternalLink>
</PanelBody>
</InspectorControls>

<BlockControls>
<div className="components-toolbar">
{ this.renderToolbarButton( PANEL_EDITOR, __( 'Markdown' ) ) }
Expand Down
15 changes: 1 addition & 14 deletions client/gutenberg/extensions/markdown/editor.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
/** @format */

/**
* External dependencies
*/
import { ExternalLink } from '@wordpress/components';
import { Fragment } from '@wordpress/element';

/**
* Internal dependencies
*/
Expand All @@ -18,14 +12,7 @@ import JetpackBlockType from 'gutenberg/extensions/presets/jetpack/utils/jetpack
const MarkdownBlock = new JetpackBlockType( 'markdown', {
title: __( 'Markdown' ),

description: (
<Fragment>
<p>{ __( 'Use regular characters and punctuation to style text, links, and lists.' ) }</p>
<ExternalLink href="https://en.support.wordpress.com/markdown-quick-reference/">
{ __( 'Support reference' ) }
</ExternalLink>
</Fragment>
),
description: __( 'Use regular characters and punctuation to style text, links, and lists.' ),

icon: (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 208 128">
Expand Down
7 changes: 7 additions & 0 deletions client/gutenberg/extensions/markdown/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,10 @@ $text-editor-font-size: inherit;
}
}
}

// Sidebar
.components-panel .jetpack-markdown__support {
border-top: 0;
padding-left: 54px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now there is where it feels off 😕

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehehe agreed with this too. :-) Non-ideal solutions all around!

padding-top: 0;
}