From 465a718a3ec7c035384b9b7b2311403a9ccdad2f Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Nov 2017 13:51:16 +0100 Subject: [PATCH] Components: Extract the WritingFlow component as a reusable Editor component --- editor/components/index.js | 1 + editor/{ => components}/writing-flow/index.js | 7 +++---- editor/modes/visual-editor/index.js | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) rename editor/{ => components}/writing-flow/index.js (98%) diff --git a/editor/components/index.js b/editor/components/index.js index 2a351d975c3be..5da4486c89dde 100644 --- a/editor/components/index.js +++ b/editor/components/index.js @@ -40,6 +40,7 @@ export { default as BlockToolbar } from './block-toolbar'; export { default as ErrorBoundary } from './error-boundary'; export { default as Inserter } from './inserter'; export { default as Warning } from './warning'; +export { default as WritingFlow } from './writing-flow'; // State Related Components export { default as EditorProvider } from './provider'; diff --git a/editor/writing-flow/index.js b/editor/components/writing-flow/index.js similarity index 98% rename from editor/writing-flow/index.js rename to editor/components/writing-flow/index.js index 869ab9d0bdc15..12a870c2e4cc4 100644 --- a/editor/writing-flow/index.js +++ b/editor/components/writing-flow/index.js @@ -19,16 +19,15 @@ import { isVerticalEdge, placeCaretAtHorizontalEdge, placeCaretAtVerticalEdge, -} from '../utils/dom'; +} from '../../utils/dom'; import { getBlockUids, getMultiSelectedBlocksStartUid, getMultiSelectedBlocksEndUid, getMultiSelectedBlocks, getSelectedBlock, -} from '../selectors'; - -import { multiSelect } from '../actions'; +} from '../../selectors'; +import { multiSelect } from '../../actions'; /** * Module Constants diff --git a/editor/modes/visual-editor/index.js b/editor/modes/visual-editor/index.js index d5051bf6f53b6..e6280fcf9671f 100644 --- a/editor/modes/visual-editor/index.js +++ b/editor/modes/visual-editor/index.js @@ -16,8 +16,7 @@ import { KeyboardShortcuts } from '@wordpress/components'; import './style.scss'; import VisualEditorBlockList from './block-list'; import VisualEditorInserter from './inserter'; -import WritingFlow from '../../writing-flow'; -import { PostTitle } from '../../components'; +import { PostTitle, WritingFlow } from '../../components'; import { getBlockUids, getMultiSelectedBlockUids } from '../../selectors'; import { clearSelectedBlock, multiSelect, redo, undo, removeBlocks } from '../../actions';