Skip to content

Commit

Permalink
Fix bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed Dec 22, 2020
1 parent ff8fa4c commit 7be44e2
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 67 deletions.
45 changes: 1 addition & 44 deletions client/gutenberg/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,10 @@ import page from 'page';
/**
* Internal dependencies
*/
<<<<<<< HEAD
import { siteSelection, sites } from 'calypso/my-sites/controller';
import {
authenticate,
post,
redirect,
siteEditor,
gutenbergWithoutIframe,
exitPost,
} from './controller';
import { authenticate, post, redirect, siteEditor, exitPost } from './controller';
import config from 'calypso/config';
import { makeLayout, render as clientRender } from 'calypso/controller';
import { performanceTrackerStart } from 'calypso/lib/performance-tracking/performance-tracker-start';
=======
import { siteSelection, sites } from 'my-sites/controller';
import { authenticate, post, redirect, siteEditor } from './controller';
import config from 'config';
import { makeLayout, render as clientRender } from 'controller';
>>>>>>> Split GB in calypso into separate section

export default function () {
page(
Expand All @@ -51,23 +36,9 @@ export default function () {
page.exit( '/post/:site?/:post?', exitPost );
page( '/post/:site?', siteSelection, redirect, makeLayout, clientRender );

<<<<<<< HEAD
page( '/page', siteSelection, sites, makeLayout, clientRender );
page( '/page/new', '/page' ); // redirect from beep-beep-boop
page(
'/without-iframe/post/:site/:post?',
siteSelection,
redirect,
authenticate,
performanceTrackerStart( 'without-iframe' ),
gutenbergWithoutIframe,
makeLayout,
clientRender
);

=======
page( '/block-editor/page', siteSelection, sites, makeLayout, clientRender );
>>>>>>> Split GB in calypso into separate section
page(
'/page/:site/:post?',
siteSelection,
Expand All @@ -78,23 +49,9 @@ export default function () {
clientRender
);

<<<<<<< HEAD
page.exit( '/page/:site?/:post?', exitPost );
page( '/page/:site?', siteSelection, redirect, makeLayout, clientRender );

page(
'/without-iframe/page/:site/:post?',
siteSelection,
redirect,
authenticate,
gutenbergWithoutIframe,
makeLayout,
clientRender
);
=======
page( '/block-editor/page/:site?', siteSelection, redirect, makeLayout, clientRender );
>>>>>>> Split GB in calypso into separate section

if ( config.isEnabled( 'manage/custom-post-types' ) ) {
page( '/edit/:customPostType', siteSelection, sites, makeLayout, clientRender );
page(
Expand Down
4 changes: 1 addition & 3 deletions client/gutenberg/editor/media-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export const mediaCalypsoToGutenberg = ( media ) => {
url: get( media, 'URL' ),
alt: get( media, 'alt' ),
// TODO: replace with `{ source: 'rich-text' }` after updating Gutenberg
caption: !! media.caption
? parseWithAttributeSchema( media.caption, { source: 'children' } )
: '',
caption: media.caption ? parseWithAttributeSchema( media.caption, { source: 'children' } ) : '',
description: get( media, 'description' ),
filename: get( media, 'file' ),
height: get( media, 'height' ),
Expand Down
14 changes: 7 additions & 7 deletions client/gutenberg/without-iframe/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import React from 'react';
/**
* Internal dependencies
*/
import { EDITOR_START, POST_EDIT } from 'state/action-types';
import { getSelectedSiteId } from 'state/ui/selectors';
import { EDITOR_START, POST_EDIT } from 'calypso/state/action-types';
import { getSelectedSiteId } from 'calypso/state/ui/selectors';
import WithoutIframe from './without-iframe';
import { getSiteFragment, sectionify } from 'lib/route';
import { getSiteOption } from 'state/sites/selectors';
import NavigationComponent from 'my-sites/navigation';
import { getSiteFragment, sectionify } from 'calypso/lib/route';
import { getSiteOption } from 'calypso/state/sites/selectors';
import NavigationComponent from 'calypso/my-sites/navigation';

function determinePostType( context ) {
if ( context.path.startsWith( '/without-iframe/block-editor/post/' ) ) {
if ( context.path.startsWith( '/without-iframe/post/' ) ) {
return 'post';
}
if ( context.path.startsWith( '/without-iframe/block-editor/page/' ) ) {
if ( context.path.startsWith( '/without-iframe/page/' ) ) {
return 'page';
}

Expand Down
10 changes: 5 additions & 5 deletions client/gutenberg/without-iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import page from 'page';
/**
* Internal dependencies
*/
import { siteSelection } from 'my-sites/controller';
import { siteSelection } from 'calypso/my-sites/controller';
import { authenticate, redirect } from '../editor/controller';
import { gutenbergWithoutIframe } from './controller';
import { makeLayout, render as clientRender } from 'controller';
import { performanceTrackerStart } from 'lib/performance-tracking/performance-tracker-start';
import { makeLayout, render as clientRender } from 'calypso/controller';
import { performanceTrackerStart } from 'calypso/lib/performance-tracking/performance-tracker-start';

export default function () {
page(
'/without-iframe/block-editor/post/:site/:post?',
'/without-iframe/post/:site/:post?',
siteSelection,
redirect,
authenticate,
Expand All @@ -25,7 +25,7 @@ export default function () {
);

page(
'/without-iframe/block-editor/page/:site/:post?',
'/without-iframe/page/:site/:post?',
siteSelection,
redirect,
authenticate,
Expand Down
10 changes: 4 additions & 6 deletions client/gutenberg/without-iframe/without-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,17 @@ import '@wordpress/format-library/build-style/style.css';
/**
* Internal dependencies
*/
import PageViewTracker from 'lib/analytics/page-view-tracker';
import EditorDocumentHead from 'post-editor/editor-document-head';
import PageViewTracker from 'calypso/lib/analytics/page-view-tracker';
import EditorDocumentHead from 'calypso/post-editor/editor-document-head';
import './without-iframe.scss';
import PerformanceTrackerStop from 'lib/performance-tracking/performance-tracker-stop';
import PerformanceTrackerStop from 'calypso/lib/performance-tracking/performance-tracker-stop';
import Editor from '@wordpress/edit-post/src/editor';
import { setCurrentSiteId } from './fix-api-fetch';

registerCoreBlocks();

const getStatsPath = ( { postId } ) =>
postId
? '/block-editor/without-iframe/:post_type/:site/:post_id'
: '/block-editor/without-iframe/:post_type/:site';
postId ? '/without-iframe/:post_type/:site/:post_id' : '/without-iframe/:post_type/:site';

const getStatsTitle = ( { postId, postType } ) => {
let postTypeText;
Expand Down
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@wordpress/format-library": "^1.22.6",
"@wordpress/i18n": "^3.14.0",
"@wordpress/icons": "^2.4.0",
"@wordpress/interface": "^0.7.5",
"@wordpress/is-shallow-equal": "^2.1.0",
"@wordpress/keycodes": "^2.14.0",
"@wordpress/notices": "^2.8.3",
Expand Down
4 changes: 2 additions & 2 deletions client/sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ const sections = [
},
{
name: 'gutenberg-in-calypso',
paths: [ '/without-iframe/block-editor' ],
module: 'wp-calypso-client/gutenberg/without-iframe',
paths: [ '/without-iframe' ],
module: 'calypso/gutenberg/without-iframe',
group: 'gutenberg',
},
{
Expand Down

0 comments on commit 7be44e2

Please sign in to comment.