Skip to content

Commit

Permalink
Components: Move all the Post Editor's layout components under a "pos…
Browse files Browse the repository at this point in the history
…t-edit" folder
  • Loading branch information
youknowriad committed Nov 23, 2017
1 parent 5af0065 commit ca925d8
Show file tree
Hide file tree
Showing 54 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion editor/components/block-list/block-contextual-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import NavigableToolbar from '../../navigable-toolbar';
import NavigableToolbar from '../navigable-toolbar';
import { BlockToolbar } from '../';

function BlockContextualToolbar() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Component } from 'react';
/**
* Internal dependencies
*/
import { getDocumentTitle } from '../selectors';
import { getDocumentTitle } from '../../selectors';

class DocumentTitle extends Component {
constructor( props ) {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { MenuItemsGroup, MenuItemsToggle, withInstanceId } from '@wordpress/comp
/**
* Internal Dependencies
*/
import { isFeatureActive } from '../../selectors';
import { toggleFeature } from '../../actions';
import { isFeatureActive } from '../../../selectors';
import { toggleFeature } from '../../../actions';

function FeatureToggle( { onToggle, active } ) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import { IconButton } from '@wordpress/components';
* Internal dependencies
*/
import './style.scss';
import { Inserter, BlockToolbar } from '../../components';
import BlockSwitcher from '../../components/block-switcher';
import NavigableToolbar from '../../navigable-toolbar';
import { Inserter, BlockToolbar } from '../../../components';
import BlockSwitcher from '../../../components/block-switcher';
import NavigableToolbar from '../../../components/navigable-toolbar';
import TableOfContents from '../../table-of-contents';
import { getMultiSelectedBlockUids, hasEditorUndo, hasEditorRedo, isFeatureActive } from '../../selectors';
import { getMultiSelectedBlockUids, hasEditorUndo, hasEditorRedo, isFeatureActive } from '../../../selectors';

function HeaderToolbar( { hasUndo, hasRedo, hasFixedToolbar, undo, redo, isMultiBlockSelection, selectedBlockUids } ) {
return (
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions editor/header/index.js → editor/edit-post/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { IconButton } from '@wordpress/components';
*/
import './style.scss';
import PublishWithDropdown from './publish-with-dropdown';
import { PostPreviewButton, PostSavedState } from '../components';
import { PostPreviewButton, PostSavedState } from '../../components';
import EllipsisMenu from './ellipsis-menu';
import HeaderToolbar from './header-toolbar';
import { isEditorSidebarOpened } from '../selectors';
import { toggleSidebar } from '../actions';
import { isEditorSidebarOpened } from '../../selectors';
import { toggleSidebar } from '../../actions';

function Header( { onToggleSidebar, isSidebarOpened } ) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { MenuItemsGroup } from '@wordpress/components';
/**
* Internal dependencies
*/
import { getEditorMode } from '../../selectors';
import { getEditorMode } from '../../../selectors';

/**
* Set of available mode options.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
PostScheduleLabel,
PostSchedule,
PostPublishButton,
} from '../../components';
} from '../../../components';

function PublishDropdown( { user, onSubmit } ) {
const canPublish = user.data && user.data.capabilities.publish_posts;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import { Dropdown, Button, Dashicon } from '@wordpress/components';
* Internal Dependencies
*/
import './style.scss';
import { PostPublishButtonLabel } from '../../components';
import { PostPublishButtonLabel } from '../../../components';
import PublishDropdown from '../publish-dropdown';
import {
isSavingPost,
isEditedPostSaveable,
isEditedPostPublishable,
} from '../../selectors';
} from '../../../selectors';

function PublishWithDropdown( { isSaving, isPublishable, isSaveable } ) {
const isButtonEnabled = ! isSaving && isPublishable && isSaveable;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions editor/layout/index.js → editor/edit-post/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import Sidebar from '../sidebar';
import TextEditor from '../modes/text-editor';
import VisualEditor from '../modes/visual-editor';
import DocumentTitle from '../document-title';
import { removeNotice } from '../actions';
import { MetaBoxes, AutosaveMonitor, UnsavedChangesWarning } from '../components';
import { removeNotice } from '../../actions';
import { MetaBoxes, AutosaveMonitor, UnsavedChangesWarning } from '../../components';
import {
getEditorMode,
isEditorSidebarOpened,
getNotices,
} from '../selectors';
} from '../../selectors';

function Layout( { mode, isSidebarOpened, notices, ...props } ) {
const className = classnames( 'editor-layout', {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Internal dependencies
*/
import './style.scss';
import { PostTextEditor, PostTextEditorToolbar, PostTitle } from '../../components';
import { PostTextEditor, PostTextEditorToolbar, PostTitle } from '../../../components';

function TextEditor() {
return (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { KeyboardShortcuts } from '@wordpress/components';
*/
import './style.scss';
import VisualEditorInserter from './inserter';
import { BlockList, PostTitle, WritingFlow } from '../../components';
import { getBlockUids, getMultiSelectedBlockUids, isFeatureActive } from '../../selectors';
import { clearSelectedBlock, multiSelect, redo, undo, removeBlocks } from '../../actions';
import { BlockList, PostTitle, WritingFlow } from '../../../components';
import { getBlockUids, getMultiSelectedBlockUids, isFeatureActive } from '../../../selectors';
import { clearSelectedBlock, multiSelect, redo, undo, removeBlocks } from '../../../actions';

class VisualEditor extends Component {
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { createBlock, BlockIcon } from '@wordpress/blocks';
/**
* Internal dependencies
*/
import { Inserter } from '../../components';
import { insertBlock } from '../../actions';
import { getMostFrequentlyUsedBlocks, getBlockCount } from '../../selectors';
import { Inserter } from '../../../components';
import { insertBlock } from '../../../actions';
import { getMostFrequentlyUsedBlocks, getBlockCount } from '../../../selectors';

export class VisualEditorInserter extends Component {
constructor() {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Panel, PanelBody } from '@wordpress/components';
* Internal Dependencies
*/
import './style.scss';
import { BlockInspector } from '../../components';
import { BlockInspector } from '../../../components';

function BlockInspectorPanel() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { PanelBody, PanelRow } from '@wordpress/components';
/**
* Internal Dependencies
*/
import { PostComments, PostPingbacks } from '../../components';
import { isEditorSidebarPanelOpened } from '../../selectors';
import { toggleSidebarPanel } from '../../actions';
import { PostComments, PostPingbacks } from '../../../components';
import { isEditorSidebarPanelOpened } from '../../../selectors';
import { toggleSidebarPanel } from '../../../actions';

/**
* Module Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { PanelBody } from '@wordpress/components';
/**
* Internal dependencies
*/
import { DocumentOutline } from '../../components';
import { getBlocks, isEditorSidebarPanelOpened } from '../../selectors';
import { toggleSidebarPanel } from '../../actions';
import { DocumentOutline } from '../../../components';
import { getBlocks, isEditorSidebarPanelOpened } from '../../../selectors';
import { toggleSidebarPanel } from '../../../actions';

/**
* Module constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { PanelBody } from '@wordpress/components';
/**
* Internal dependencies
*/
import { PostFeaturedImage } from '../../components';
import { isEditorSidebarPanelOpened } from '../../selectors';
import { toggleSidebarPanel } from '../../actions';
import { PostFeaturedImage } from '../../../components';
import { isEditorSidebarPanelOpened } from '../../../selectors';
import { toggleSidebarPanel } from '../../../actions';

/**
* Module Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { IconButton } from '@wordpress/components';
/**
* Internal Dependencies
*/
import { getActivePanel, getSelectedBlockCount } from '../selectors';
import { toggleSidebar, setActivePanel } from '../actions';
import { getActivePanel, getSelectedBlockCount } from '../../selectors';
import { toggleSidebar, setActivePanel } from '../../actions';

const SidebarHeader = ( { panel, onSetPanel, onToggleSidebar, count } ) => {
// Do not display "0 Blocks".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import PostSettings from './post-settings';
import BlockInspectorPanel from './block-inspector-panel';
import Header from './header';

import { getActivePanel } from '../selectors';
import { getActivePanel } from '../../selectors';

const Sidebar = ( { panel } ) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PanelBody } from '@wordpress/components';
/**
* Internal dependencies
*/
import { PostLastRevision, PostLastRevisionCheck } from '../../components';
import { PostLastRevision, PostLastRevisionCheck } from '../../../components';

function LastRevision() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { PanelBody, PanelRow } from '@wordpress/components';
/**
* Internal dependencies
*/
import { PageAttributes as PageAttributesForm, PageAttributesCheck } from '../../components';
import { toggleSidebarPanel } from '../../actions';
import { isEditorSidebarPanelOpened } from '../../selectors';
import { PageAttributes as PageAttributesForm, PageAttributesCheck } from '../../../components';
import { toggleSidebarPanel } from '../../../actions';
import { isEditorSidebarPanelOpened } from '../../../selectors';

/**
* Module Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PanelRow } from '@wordpress/components';
* Internal dependencies
*/
import './style.scss';
import { PostAuthor as PostAuthorForm, PostAuthorCheck } from '../../components';
import { PostAuthor as PostAuthorForm, PostAuthorCheck } from '../../../components';

export function PostAuthor() {
return (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { PanelBody } from '@wordpress/components';
/**
* Internal Dependencies
*/
import { PostExcerpt as PostExcerptForm } from '../../components';
import { isEditorSidebarPanelOpened } from '../../selectors';
import { toggleSidebarPanel } from '../../actions';
import { PostExcerpt as PostExcerptForm } from '../../../components';
import { isEditorSidebarPanelOpened } from '../../../selectors';
import { toggleSidebarPanel } from '../../../actions';

/**
* Module Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PanelRow } from '@wordpress/components';
/**
* Internal dependencies
*/
import { PostFormat as PostFormatForm, PostFormatCheck } from '../../components';
import { PostFormat as PostFormatForm, PostFormatCheck } from '../../../components';

export function PostFormat() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PanelRow } from '@wordpress/components';
/**
* Internal dependencies
*/
import { PostPendingStatus as PostPendingStatusForm, PostPendingStatusCheck } from '../../components';
import { PostPendingStatus as PostPendingStatusForm, PostPendingStatusCheck } from '../../../components';

export function PostPendingStatus() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { PanelRow, Dropdown, withAPIData } from '@wordpress/components';
* Internal dependencies
*/
import './style.scss';
import { PostSchedule as PostScheduleForm, PostScheduleLabel } from '../../components';
import { PostSchedule as PostScheduleForm, PostScheduleLabel } from '../../../components';

export function PostSchedule( { user } ) {
if ( ! user.data || ! user.data.capabilities.publish_posts ) {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import DiscussionPanel from '../discussion-panel';
import LastRevision from '../last-revision';
import PageAttributes from '../page-attributes';
import DocumentOutlinePanel from '../document-outline-panel';
import { MetaBoxes } from '../../components';
import { MetaBoxes } from '../../../components';

const panel = (
<Panel>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import PostFormat from '../post-format';
import PostPendingStatus from '../post-pending-status';
import {
isEditorSidebarPanelOpened,
} from '../../selectors';
import { toggleSidebarPanel } from '../../actions';
} from '../../../selectors';
import { toggleSidebarPanel } from '../../../actions';

/**
* Module Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PanelRow } from '@wordpress/components';
/**
* Internal dependencies
*/
import { PostSticky as PostStickyForm, PostStickyCheck } from '../../components';
import { PostSticky as PostStickyForm, PostStickyCheck } from '../../../components';

export function PostSticky() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { PanelBody } from '@wordpress/components';
/**
* Internal dependencies
*/
import { PostTaxonomies as PostTaxonomiesForm } from '../../components';
import { isEditorSidebarPanelOpened } from '../../selectors';
import { toggleSidebarPanel } from '../../actions';
import { PostTaxonomies as PostTaxonomiesForm } from '../../../components';
import { isEditorSidebarPanelOpened } from '../../../selectors';
import { toggleSidebarPanel } from '../../../actions';

/**
* Module Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { PanelRow } from '@wordpress/components';
* Internal dependencies
*/
import './style.scss';
import { PostTrash as PostTrashLink } from '../../components';
import { isEditedPostNew, getCurrentPostId } from '../../selectors';
import { PostTrash as PostTrashLink } from '../../../components';
import { isEditedPostNew, getCurrentPostId } from '../../../selectors';

function PostTrash( { isNew, postId } ) {
if ( isNew || ! postId ) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { PanelRow, Dropdown, withAPIData } from '@wordpress/components';
* Internal Dependencies
*/
import './style.scss';
import { PostVisibility as PostVisibilityForm, PostVisibilityLabel } from '../../components';
import { PostVisibility as PostVisibilityForm, PostVisibilityLabel } from '../../../components';

export function PostVisibility( { user } ) {
const canEdit = user.data && user.data.capabilities.publish_posts;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import { Dropdown, IconButton } from '@wordpress/components';
* Internal dependencies
*/
import './style.scss';
import { WordCount, DocumentOutline } from '../components';
import { getBlocks } from '../selectors';
import { selectBlock } from '../actions';
import { WordCount, DocumentOutline } from '../../components';
import { getBlocks } from '../../selectors';
import { selectBlock } from '../../actions';

function TableOfContents( { blocks } ) {
const headings = filter( blocks, ( block ) => block.name === 'core/heading' );
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { settings as dateSettings } from '@wordpress/date';
* Internal dependencies
*/
import './assets/stylesheets/main.scss';
import Layout from './layout';
import Layout from './edit-post/layout';
import { EditorProvider, ErrorBoundary } from './components';
import { initializeMetaBoxState } from './actions';

Expand Down

0 comments on commit ca925d8

Please sign in to comment.