Skip to content

Commit

Permalink
Remove stats tracking code (#2278)
Browse files Browse the repository at this point in the history
  • Loading branch information
nylen authored Aug 10, 2017
1 parent 0dbc2c1 commit a6d1761
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 454 deletions.
6 changes: 0 additions & 6 deletions blocks/api/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
import { parse as hpqParse } from 'hpq';
import { mapValues, reduce, pickBy } from 'lodash';

/**
* WordPress dependencies
*/
import { bumpStat } from '@wordpress/utils';

/**
* Internal dependencies
*/
Expand Down Expand Up @@ -168,7 +163,6 @@ export function createBlockWithFallback( name, rawContent, attributes ) {
// Convert 'core/text' blocks in existing content to the new
// 'core/paragraph'.
if ( name === 'core/text' ) {
bumpStat( 'block_auto_convert', 'core-text-to-paragraph' );
name = 'core/paragraph';
}

Expand Down
6 changes: 3 additions & 3 deletions components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export { default as Button } from './button';
export { default as ClipboardButton } from './clipboard-button';
export { default as Dashicon } from './dashicon';
export { default as DropZone } from './drop-zone';
export { default as DropdownMenu } from './dropdown-menu';
export { default as ExternalLink } from './external-link';
export { default as FormFileUpload } from './form-file-upload';
export { default as FormToggle } from './form-toggle';
Expand All @@ -12,16 +13,15 @@ export { default as KeyboardShortcuts } from './keyboard-shortcuts';
export { default as Notice } from './notice';
export { default as NoticeList } from './notice/list';
export { default as Panel } from './panel';
export { default as PanelHeader } from './panel/header';
export { default as PanelBody } from './panel/body';
export { default as PanelHeader } from './panel/header';
export { default as PanelRow } from './panel/row';
export { default as Placeholder } from './placeholder';
export { default as Popover } from './popover';
export { default as ResponsiveWrapper } from './responsive-wrapper';
export { default as SandBox } from './sandbox';
export { default as Spinner } from './spinner';
export { default as Toolbar } from './toolbar';
export { default as DropdownMenu } from './dropdown-menu';
export { default as Popover } from './popover';

// Higher-Order Components
export { default as withFocusReturn } from './higher-order/with-focus-return';
Expand Down
110 changes: 0 additions & 110 deletions editor/enable-tracking-prompt/index.js

This file was deleted.

40 changes: 0 additions & 40 deletions editor/enable-tracking-prompt/style.scss

This file was deleted.

119 changes: 0 additions & 119 deletions editor/enable-tracking-prompt/test/index.js

This file was deleted.

10 changes: 1 addition & 9 deletions editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import { settings } from '@wordpress/date';
import './assets/stylesheets/main.scss';
import Layout from './layout';
import { createReduxStore } from './state';
import { undo, createInfoNotice } from './actions';
import EnableTrackingPrompt, { TRACKING_PROMPT_NOTICE_ID } from './enable-tracking-prompt';
import { undo } from './actions';
import EditorSettingsProvider from './settings/provider';

/**
Expand Down Expand Up @@ -96,13 +95,6 @@ export function createEditorInstance( id, post, userSettings ) {
settings: editorSettings,
} );

if ( window.getUserSetting( 'gutenberg_tracking' ) === '' ) {
store.dispatch( createInfoNotice( <EnableTrackingPrompt />, {
id: TRACKING_PROMPT_NOTICE_ID,
isDismissible: false, // This notice has its own dismiss logic.
} ) );
}

preparePostState( store, post );

render(
Expand Down
8 changes: 4 additions & 4 deletions editor/inserter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { IconButton } from '@wordpress/components';
import { createBlock } from '@wordpress/blocks';
import { bumpStat } from '@wordpress/utils';

/**
* Internal dependencies
Expand Down Expand Up @@ -58,13 +57,14 @@ class Inserter extends Component {

insertBlock( name ) {
if ( name ) {
const { insertionPoint, onInsertBlock } = this.props;
const {
insertionPoint,
onInsertBlock,
} = this.props;
onInsertBlock(
name,
insertionPoint
);
bumpStat( 'add_block_inserter', name.replace( /\//g, '__' ) );
bumpStat( 'add_block_total', name.replace( /\//g, '__' ) );
}

this.close();
Expand Down
4 changes: 1 addition & 3 deletions editor/modes/visual-editor/block-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { serialize, getDefaultBlock, createBlock } from '@wordpress/blocks';
import { IconButton } from '@wordpress/components';
import { keycodes, bumpStat } from '@wordpress/utils';
import { keycodes } from '@wordpress/utils';

/**
* Internal dependencies
Expand Down Expand Up @@ -201,8 +201,6 @@ class VisualEditorBlockList extends Component {
insertBlock( name ) {
const newBlock = createBlock( name );
this.props.onInsertBlock( newBlock );
bumpStat( 'add_block_quick', name.replace( /\//g, '__' ) );
bumpStat( 'add_block_total', name.replace( /\//g, '__' ) );
}

toggleContinueWritingControls( showContinueWritingControls ) {
Expand Down
Loading

0 comments on commit a6d1761

Please sign in to comment.