Todos for Automattic/wp-calypso

These are TODOs that are seen in the code

_stats-fade-text.scss
          
             mixin
//
// TODO: rename or bundle with stats
          
      
_utilities.scss
          
            // Text meant only for screen readers
.screen-reader-text { // TODO add _accessibility.scss
	clip
          
      
wp.js
          
            
 * TODO create error state stubs 500 / timeouts
 **/

successRequestStub = function(){
	var args
          
      
index.jsx
          
            ':
				// TODO these are character-based languages - count characters instead
				return null;

			case
          
          
             'ko':
				// TODO Korean is not supported by our current word count regex
				return null
          
      
_breakpoints.scss
          
             + " " + $breakpoint;
				}
				// TODO - change this to use @error, when it is supported by node-sass
          
          
             $breakpoints {
				$sizes: $sizes + " " + $breakpoint;
			}
			// TODO - change this to use @error, when it
          
      
index.jsx
          
             invalid
 * TODO: when available use chai-enzyme delete this helper
 */
const getAttribute
          
          
            >;

	it( 'should render', () => {
		// TODO: when chai-enzyme is available use `shallow` instead
          
      
index.js
          
             );
		applyMiddlewares( req.context, ...middlewares, () => {
			next();
		} );
	};
}

// TODO: Maybe
          
      
README.md
          
             its `mixins`:

```
import dirtyLinkedState from ("lib/mixins/dirty-linked-state");
app.Todo
          
      
style.scss
          
            ,
		.purchase-item__purchase-type {
			opacity: 0.6;
		}
	}

	&.is-included-with-plan {
		// TODO
          
      
README.md
          
             its `mixins`:
```js
var renderVisualizer = require("lib/mixins/render-visualizer");

app.Todo
          
      
actions.js
          
             = false ) {
		return ( dispatch ) => {
			// TODO: Componentes should not fetch if already fetching
          
      
index.js
          
            ;
}

export function setToken( token ) {
	// TODO: Support secure cookies if this is ever used outside
          
      
index.js
          
             );

	if ( showVerifiedNotice ) {
		user.signalVerification();
		setTimeout( () => {
			// TODO: unify
          
      
index.jsx
          
             ) {
		this.setState( {
			locating: false
		} );

		// TODO: REDUX - remove flux actions when whole
          
          
            ( 'location_geolocate' );
		stats.recordEvent( 'Location Geolocated' );
	},

	clear: function() {
		// TODO: REDUX
          
      
publicize-connection.jsx
          
             ( event.target.checked ) {
			// TODO: REDUX - remove flux actions when whole post-editor is reduxified
          
          
            ', connection.service, 'enabled' );
		} else {
			// TODO: REDUX - remove flux actions when whole
          
      
wp.js
          
             dependency on the browser
 * Also stubbing undocumented endpoints and returning test data
 * TODO create
          
      
index.js
          
            ( nextProps );
		}
	},

	refresh( props ) {
		// todo (seear): Don't fetch if site matches existing
          
      
actions.js
          
            ( markup => dispatch( gotMarkup( site, markup ) ) );
		// TODO: handle errors
	};
}

export function
          
      
index.jsx
          
            ( 'Changed page menu order' );

			// TODO: REDUX - remove flux actions when whole post-editor is
          
      
index.jsx
          
            .props.post.page_template;
	},

	_selectTemplate( template ) {
		// TODO: REDUX - remove flux actions
          
      
index.jsx
          
             Setting', stickyEventLabel );

		// TODO: REDUX - remove flux actions when whole post-editor is
          
      
actions.js
          
            : 'THEME_PURCHASE_WITH_CUSTOMIZER',
				id: id,
				site: site
			} );
		} );
	},

	// TODO: Once
          
      
actions.js
          
            : PUSH_NOTIFICATIONS_API_NOT_READY,
			} );
		} );
	} );

	// @TODO other "action object" tests like ^^

	describe
          
      
utils.js
          
             analytics from 'lib/analytics';
import paths from './paths';

// TODO: Remove these property-masking
          
      
actions.js
          
             ).meta.version,
		tour,
	} );

	return withAnalytics( trackEvent, nextAction );
}

// TODO(mcsf): come
          
      
index.js
          
            ' );
	},

	clearNotificationBar: function() {
		// TODO: find a better way. seems to be react component state based
		const
          
          
            .click();
		}
	},

	onToggleNotifications: function() {
		// TODO: find a better way of doing this
          
      
controller.jsx
          
            ', // TODO: Use lib/screen-title's buildTitle. Cf. https://github.com/Automattic/wp-calypso/issues
          
          
            .com/theme/${ slug }`, // TODO: use getDetailsUrl() When it becomes availavle
		image: themeDetails
          
      
theme-options.js
          
            `,
// respectively. TODO: Replace with a real action once we're able to use `DesignPreview`.
export
          
          
            ',
	getUrl: ( theme, site ) => getDetailsUrl( theme, site ), // TODO: Make this a selector
};

export
          
      
reducer.js
          
             SERIALIZE:
			//TODO: we have full instances of moment.js on sites.plans[siteID].data
			return {};

		case DESERIALIZE:
			return {};
	}

	return state;
}

          
      
reducer.js
          
             { isValidStateWithSchema } from 'state/utils';

/**
 * Constants
 */
// [TODO]: This validation is
          
          
             { isValidStateWithSchema } from 'state/utils';

/**
 * Constants
 */
// [TODO]: This validation is
          
      
preview-container.jsx
          
            ( () => {
			if ( image && image.ID !== this.props.itemId ) {
				// TODO: REDUX - remove flux actions when whole
          
      
index.jsx
          
             && item.ID ? item.ID : null;
		// TODO: REDUX - remove flux actions when whole post-editor is reduxified
          
      
publicize-message.jsx
          
            ,
		};
	},

	onChange: function( event ) {
		// TODO: REDUX - remove flux actions when whole post-editor is
          
      
index.jsx
          
            .length ? selectedTags : null;
		// TODO: REDUX - remove flux actions when whole post-editor is
          
      
index.jsx
          
             ( utils.userCan( 'delete_post', this.props.post ) ) {
			// TODO: REDUX - remove flux actions when whole
          
      
index.js
          
            
			 */
			const recordErrorHandler = err => {
				// @TODO improve error handling here
				warn( err
          
          
             networkErrorHandler = err => {
				if ( err ) {
					// @TODO improve error handling here
					warn( err );
					warn
          
      
index.jsx
          
            .props.setTitle( nextProps.title );
		}

		// [TEMPORARY][TODO]: We should only check site ID so long as
          
      
actions.js
          
            
		} );
	},

	// @todo Some weirdness with the data received here...seems to be attached to siteId not data
          
      
README.md
          
            : [ 'public', 'private' ] },
    { editor: [ 'primary' ] }
]
```

TODO:
* Search treats item data nodes as
          
      
overview.jsx
          
             );

		// TODO: a separate StatsSectionTitle component should be created
		items.push( <h3 className
          
      
index.jsx
          
             }
							beforeNavigate={ this.updateScrollPosition } />;
		}

		// TODO: should be refactored into
          
      
reducer.js
          
             === 3 ) {
				state.pop();
			}
			return state;
	}

	return state;
}

//TODO: do we really want to mix strings and
          
      
view.jsx
          
            .
		//
		// TODO: Investigate and evaluate whether we need to avoid rendering
		//       the iframe on
          
      
index.jsx
          
             );
		// TODO: REDUX - remove flux actions when whole post-editor is reduxified
		postActions.edit
          
      
index.jsx
          
             } );
	},

	handleLocaleSuggestionClick: function( locale, event ) {
		// TODO: record analytics event here
		this
          
      
webpack.config.node.js
          
             will try and resolve this in production builds,
	// and error.
	// TODO: use WebpackDefinePlugin for
          
      
index.jsx
          
            .recordEvent( gaEvent, newStatus );

		// TODO: REDUX - remove flux actions when whole post-editor is
          
      
sharing-like-options.jsx
          
            : 'Post Editor' } ) }</span>
				</label>
		);
	},

	onChange: function( event ) {
		// TODO: REDUX
          
      
index.jsx
          
             ) {
		// TODO: REDUX - remove flux actions when whole post-editor is reduxified
		actions.edit( { slug: event
          
      
reducer.js
          
             handleRequestSuccess( state, action ) {
	const site = adaptSite( action.payload );
	// TODO do we need to
          
      
controller.js
          
             = makeLoggedOutLayout( context );
	} // TODO: else { makeLoggedInLayout( context ); }
	next();
}

/**
 * @param
          
      
index.jsx
          
            .slug ] ? icons[ postFormat.slug ] : 'posts';
	},

	onChange: function( event ) {
		// TODO: REDUX
          
      
index.js
          
            ' ) === 'development' ) {
			throw ex;
		}
	}
	//todo: render an error?
}

export function serverRender( req
          
      
index.jsx
          
             );
			input.focus();
		}
	},

	onChange( event ) {
		if ( ! this.props.post ) {
			return;
		}

		// TODO
          
      
actions.js
          
             later or contact support.'
			)
		} );
	} );
};

export const clearPurchases = () => {
	// TODO: we
          
      
index.jsx
          
             );
	},

	onDone() {
		//TODO: this exists to handle cross-origin error - at the moment
		//the error prevents
          
          
            ,
			fileContents: blob,
			mimeType: mimeType
		} );
	},

	//TODO: the drop zone currently exists
          
      
index.jsx
          
             }
					summary={ true } />;
				break;

			case 'authors':
				title = this.translate( 'Authors' );
				// TODO
          
          
            .post ) {
					title = this.props.summaryList.response.post.post_title;
				}

				// TODO
          
      
_main.scss
          
             releated posts settings.
@todo get rid of it
*/
.disabled-block {
	opacity: 0.5;
}

/*
@todo this needs to
          
      
index.jsx
          
            ( stickyStat );
		stats.recordEvent( 'Changed Sticky Setting', stickyEventLabel );

		// TODO: REDUX - remove
          
          
             ? 'Marked Draft' : 'Marked Pending' );

		// TODO: REDUX - remove flux actions when whole post-editor is
          
      
controller.js
          
             spent waiting for it to load
			// in the view components
			if ( postID ) {
				// TODO: REDUX
          
          
            ,
						content: pressThisContent
					} );
				}

				// TODO: REDUX - remove flux actions when whole
          
      
post-editor.jsx
          
             leaving editor
		this.props.resetPostEdits( this.props.siteId, this.props.postId );

		// TODO: REDUX
          
          
            
		};

		// TODO: REDUX - remove flux actions when whole post-editor is reduxified
		actions.edit
          
      
index.jsx
          
             );
		recordEvent( 'Changed visibility', newVisibility );

		// TODO: REDUX - remove flux actions when whole
          
          
            ( [ 'Enter', 'Escape' ], event.key ) ) {
			this.closePopover();
		}
	},

	setPostToPrivate() {
		// TODO
          
      
style.scss
          
            
.progress-indicator__cancel.noticon:before { // TODO remove noticon
	display: block;
	position: absolute
          
      
README.md
          
            : olarkStore.get() } );
	},

	startChat: function() {
		// TODO: Add some logic that will initiate
          
      
index.jsx
          
             = this.getData(),
			emptyChart;

		// If we have an empty chart, show a message
		// @todo this message
          
      
accordion.jsx
          
             );
		const user = getCurrentUser( state );

		return {
			// [TODO]: Reintroduce selected site from
          
      
connected-list.js
          
             in-flight
		const isLoading = requesting && ! ( data && data.length );

		// TODO: Support error state in
          
      
index.jsx
          
            : sinon.spy() } } // TODO: test if called when clicked
		};
	} );

	describe( 'rendering', function
          
      
index.jsx
          
            >
			</div>
		);
	},

	_getCountryData: function() {
		// TODO: move this to country-list or
          
      
index.jsx
          
             trashed
		// [TODO]: This becomes obsolete when we no longer rely on Flux for
		// tracking post data
          
      
suggestions-list.jsx
          
            
		// why, since usually a div isn't focusable by default
		// TODO does this still apply now that
          
      
x-post.jsx
          
            .
		// TODO: maybe add xpost metadata, so we can remove this regex
		let xpostTitle = post.title
          
      
style.scss
          
            ,
.disconnect-jetpack-button {
	margin-right: 8px;
}

// @TODO: Remove has-divider once all instances
          
      
index.js
          
            : abortTour } ) );
	}

	quit( options = {} ) {
		// TODO: put into step specific callback?
		const sidebar
          
      
positioning.js
          
             targets and regular css for now
		// (e.g. misses #ids, ...)
		// TODO(lsinger): fix this
		return query
          
      
index.jsx
          
            : function( event ) {
		// TODO: REDUX - remove flux actions when whole post-editor is reduxified
          
          
             (#6934). [TODO]: Remove after launch.
		const isCustomTypesEnabled = config.isEnabled( 'manage
          
      
index.js
          
            't do that yet.
	// TODO: Remove the ! user.get() check once isomorphic sections render their
	// Layout
          
          
            
	//TODO: remove this one when notices are reduxified - it is for old notices
	page( '*', require
          
      
constants.js
          
            : () => i18n.translate( 'Free' ),
		getPriceTitle: () => i18n.translate( 'Free for life' ), //TODO
          
          
            ' ),
		getPriceTitle: () => i18n.translate( '$99 per year' ), //TODO: DO NOT USE
		getProductId: () => 1003
          
      
store.js
          
             ] = {};
	}

	// TODO: follower = FollowerUtils.normalizeFollower( follower );
	follower.avatar_URL
          
      
store.js
          
             ] ) {
		_followersBySite[ siteId ][ id ] = {};
	}

	// TODO: follower = FollowerUtils.normalizeFollower
          
      
store.js
          
             ] ) {
		_usersBySite[ siteId ][ id ] = {};
	}

	// TODO: user = UserUtils.normalizeTeamMemberData( teamMember
          
      
index.js
          
             > 0 && !placeholdersVisibleStart ) {
		placeholdersVisibleStart = performance.now(); // TODO: performance
          
      
post-editor.jsx
          
            ', { set() {} } );
		// TODO: REDUX - add proper tests when whole post-editor is reduxified
		mockery
          
      
index.js
          
             up to 4 matches in the document and extract snippets to be joined together
	// TODO: detect when
          
      
actions.js
          
             to the post store
		// would rob them of that chance.
		//
		// TODO add a new action that receives
          
      
_z-index.scss
          
            ,
		'.editor-featured-image .editor-drawer-well__remove': 20,
		'.main': 20, //TODO: this doesn't always have
          
      
controller.jsx
          
            .
 * TODO: Remove this once `sites-list` is removed from Calypso.
 *
 * @param {String} siteSlug - The
          
      
index.jsx
          
             ( error ) {
				// TODO: bump a stat here
				notices.error( error.message );

				this.setState
          
      
index.js
          
             );
		}
	},

	getOlarkConfiguration: function() {
		return new Promise( ( resolve, reject ) => {
			// TODO: Maybe store this
          
          
            ',
			olark_chat_display_source: 'live_support-calypso'
		} );
		/**
		 * TODO: Set up tracking using Nosara
          
      
index.jsx
          
             );
		}
	},

	setPostDate: function( date ) {
		// TODO: REDUX - remove flux actions when whole post-editor is reduxified
          
          
            ();
		let buttonLabels;

		// TODO: switch entirely to new wording once translations catch up
		if
          
      
style.scss
          
            ( $gray, 30% ), .5 ) ); // TODO: needs to use default color for gradient

		.chart__bar:hover
          
      
post-comment-list.jsx
          
            ,

	// connect()ed props:
	commentsTree: React.PropTypes.object, //TODO: Find a lib that provides
          
      
style.scss
          
            : 0;
	pointer-events: none;
}

// @todo should be moved, together with its logic, to "post-controls" not
          
      
index.jsx
          
            {{/a}}.',
						{
							// TODO: needs correct url
							components: { a: <a href
          
      
index.jsx
          
             ) {
			// TODO: fix code duplication between the wordpress plugin and the React component
			content
          
      
post.jsx
          
            >
			);
		}
	},

	getMeta() {
		// @todo Let's make these separate components
		const post = this.props.post
          
      
main.jsx
          
            .
				// @TODO: Do not require reload here.
				location.reload();
			}
		} );
	},

	onSiteSelect( siteSlug
          
      
actions.js
          
            ( 'NOT_DIRTY' ) );
		}

		store.set( 'wpcom-autosave:' + post.site_ID + ':' + post.ID, post );

		// TODO
          
      
cart-items.js
          
            , false otherwise
 * @todo This will fail when a domain is purchased with a plan, as the domain will
          
      
selectors.js
          
             a non-hierarchical taxonomy
			// TODO avoid changing the shape of the `terms` state - see
          
      
style.scss
          
            ;

	@include breakpoint( "<480px" ) {
		margin: 0;
	}
}

// [TODO]: Selector `:not( .mce-wpcom-insert-menu
          
      
undocumented.js
          
             } );

	if ( apiVersion ) {
		// TODO: temporary solution for apiVersion until https://github.com