From 19ab89449c5accfe0d936ac66832ca029d4a8409 Mon Sep 17 00:00:00 2001 From: Daniel Rey Date: Wed, 20 Apr 2016 23:46:45 +0200 Subject: [PATCH] Make the publish button always blue (primary), even in mobile --- client/post-editor/editor-ground-control/style.scss | 2 -- client/post-editor/editor-publish-button/index.jsx | 10 ++++++---- client/post-editor/test/post-editor.jsx | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/client/post-editor/editor-ground-control/style.scss b/client/post-editor/editor-ground-control/style.scss index e5ab2a7eb534..d98b4500bf19 100644 --- a/client/post-editor/editor-ground-control/style.scss +++ b/client/post-editor/editor-ground-control/style.scss @@ -39,8 +39,6 @@ } .editor-ground-control .editor-publish-button { - @extend .is-primary; - border-radius: 4px 0 0 4px; flex-grow: 1; diff --git a/client/post-editor/editor-publish-button/index.jsx b/client/post-editor/editor-publish-button/index.jsx index c6176157e617..f6d0aac10431 100644 --- a/client/post-editor/editor-publish-button/index.jsx +++ b/client/post-editor/editor-publish-button/index.jsx @@ -10,6 +10,7 @@ import localize from 'lib/mixins/i18n/localize'; import stats from 'lib/posts/stats'; import postUtils from 'lib/posts/utils'; import siteUtils from 'lib/site/utils'; +import Button from 'components/button'; export const EditorPublishButton = React.createClass( { propTypes: { @@ -40,7 +41,7 @@ export const EditorPublishButton = React.createClass( { const buttonState = this.getButtonState(); const eventString = postUtils.isPage( this.props.post ) ? pageEvents[ buttonState ] : postEvents[ buttonState ]; stats.recordEvent( eventString ); - stats.recordEvent( 'Clicked Primary Button' ) + stats.recordEvent( 'Clicked Primary Button' ); }, getButtonState: function() { @@ -108,14 +109,15 @@ export const EditorPublishButton = React.createClass( { render: function() { return ( - + ); } } ); diff --git a/client/post-editor/test/post-editor.jsx b/client/post-editor/test/post-editor.jsx index 006cce818341..681b79c52484 100644 --- a/client/post-editor/test/post-editor.jsx +++ b/client/post-editor/test/post-editor.jsx @@ -48,6 +48,7 @@ describe( 'PostEditor', function() { mockery.registerMock( 'post-editor/editor-title/container', MOCK_COMPONENT ); mockery.registerMock( 'post-editor/editor-page-slug', MOCK_COMPONENT ); mockery.registerMock( 'post-editor/editor-media-advanced', MOCK_COMPONENT ); + mockery.registerMock( 'post-editor/editor-mobile-navigation', MOCK_COMPONENT ); mockery.registerMock( 'post-editor/editor-author', MOCK_COMPONENT ); mockery.registerMock( 'post-editor/editor-visibility', MOCK_COMPONENT ); mockery.registerMock( 'post-editor/editor-word-count', MOCK_COMPONENT );