Skip to content

Commit

Permalink
Removed unused variables and withInstanceId.
Browse files Browse the repository at this point in the history
Thanks for the feedback, @paulwilde.
  • Loading branch information
jasmussen committed Aug 8, 2018
1 parent de5f8b9 commit 589eeec
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 32 deletions.
40 changes: 20 additions & 20 deletions edit-post/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,22 @@ body.gutenberg-editor-page {
.editor-block-list__block,
.components-popover {
.input-control, // Upstream name is `.regular-text`.
input[type=text],
input[type=search],
input[type=radio],
input[type=tel],
input[type=time],
input[type=url],
input[type=week],
input[type=password],
input[type=checkbox],
input[type=color],
input[type=date],
input[type=datetime],
input[type=datetime-local],
input[type=email],
input[type=month],
input[type=number],
input[type="text"],
input[type="search"],
input[type="radio"],
input[type="tel"],
input[type="time"],
input[type="url"],
input[type="week"],
input[type="password"],
input[type="checkbox"],
input[type="color"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
select,
textarea {
margin-top: 0; // These override a "margin: 1px" from core.
Expand All @@ -170,7 +170,7 @@ body.gutenberg-editor-page {
}
}

input[type=checkbox] {
input[type="checkbox"] {
border: $border-width + 1 solid $dark-gray-300;
border-radius: $radius-round-rectangle / 2;
margin-right: 12px;
Expand All @@ -182,15 +182,15 @@ body.gutenberg-editor-page {
}

&:checked {
background: theme( toggle );
border-color: theme( toggle );
background: theme(toggle);
border-color: theme(toggle);
}

&:checked:focus {
box-shadow: 0 0 0 2px $dark-gray-500;
}

&:before {
&::before {
margin: -4px 0 0 -5px;
color: $white;
}
Expand Down
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-comments/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*/
import { __ } from '@wordpress/i18n';
import { CheckboxControl } from '@wordpress/components';
import { withInstanceId, compose } from '@wordpress/compose';
import { compose } from '@wordpress/compose';
import { withSelect, withDispatch } from '@wordpress/data';

function PostComments( { commentStatus = 'open', instanceId, ...props } ) {
function PostComments( { commentStatus = 'open', ...props } ) {
const onToggleComments = () => props.editPost( { comment_status: commentStatus === 'open' ? 'closed' : 'open' } );

return (
Expand All @@ -27,5 +27,4 @@ export default compose( [
withDispatch( ( dispatch ) => ( {
editPost: dispatch( 'core/editor' ).editPost,
} ) ),
withInstanceId,
] )( PostComments );
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-pending-status/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import { __ } from '@wordpress/i18n';
import { CheckboxControl } from '@wordpress/components';
import { withSelect, withDispatch } from '@wordpress/data';
import { withInstanceId, compose } from '@wordpress/compose';
import { compose } from '@wordpress/compose';

/**
* Internal dependencies
*/
import PostPendingStatusCheck from './check';

export function PostPendingStatus( { instanceId, status, onUpdateStatus } ) {
export function PostPendingStatus( { status, onUpdateStatus } ) {
const togglePendingStatus = () => {
const updatedStatus = status === 'pending' ? 'draft' : 'pending';
onUpdateStatus( updatedStatus );
Expand All @@ -37,5 +37,4 @@ export default compose(
dispatch( 'core/editor' ).editPost( { status } );
},
} ) ),
withInstanceId
)( PostPendingStatus );
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-pingbacks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import { __ } from '@wordpress/i18n';
import { CheckboxControl } from '@wordpress/components';
import { withSelect, withDispatch } from '@wordpress/data';
import { withInstanceId, compose } from '@wordpress/compose';
import { compose } from '@wordpress/compose';

function PostPingbacks( { pingStatus = 'open', instanceId, ...props } ) {
function PostPingbacks( { pingStatus = 'open', ...props } ) {
const onTogglePingback = () => props.editPost( { ping_status: pingStatus === 'open' ? 'closed' : 'open' } );

return (
Expand All @@ -27,5 +27,4 @@ export default compose( [
withDispatch( ( dispatch ) => ( {
editPost: dispatch( 'core/editor' ).editPost,
} ) ),
withInstanceId,
] )( PostPingbacks );
5 changes: 2 additions & 3 deletions packages/editor/src/components/post-sticky/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import { __ } from '@wordpress/i18n';
import { CheckboxControl } from '@wordpress/components';
import { withSelect, withDispatch } from '@wordpress/data';
import { withInstanceId, compose } from '@wordpress/compose';
import { compose } from '@wordpress/compose';

/**
* Internal dependencies
*/
import PostStickyCheck from './check';

export function PostSticky( { onUpdateSticky, postSticky = false, instanceId } ) {
export function PostSticky( { onUpdateSticky, postSticky = false } ) {
return (
<PostStickyCheck>
<CheckboxControl
Expand All @@ -36,5 +36,4 @@ export default compose( [
},
};
} ),
withInstanceId,
] )( PostSticky );

0 comments on commit 589eeec

Please sign in to comment.