diff --git a/client/src/boot/BootRoutes.js b/client/src/boot/BootRoutes.js
index abf2a05f2..c14250ab8 100644
--- a/client/src/boot/BootRoutes.js
+++ b/client/src/boot/BootRoutes.js
@@ -98,7 +98,6 @@ class BootRoutes {
// Check if the beginning of the route is the same as the current location.
// Since we haven't decided on a router yet, we can't use it for route matching.
- // TODO Limit full page load when transitioning from legacy to react route or vice versa
return currentPath.match(route);
});
}
diff --git a/client/src/boot/applyTransforms.js b/client/src/boot/applyTransforms.js
index 79c58c1f4..3b4d1e24c 100644
--- a/client/src/boot/applyTransforms.js
+++ b/client/src/boot/applyTransforms.js
@@ -35,7 +35,6 @@ const applyTransforms = () => {
Injector.transform(
'field-holders',
(updater) => {
- // @todo: Should contain every field that exports itself wrapped in a `fieldHolder` by default
const fields = [
'FieldGroup',
];
diff --git a/client/src/boot/index.js b/client/src/boot/index.js
index 3a22aaa87..5210fa665 100644
--- a/client/src/boot/index.js
+++ b/client/src/boot/index.js
@@ -53,7 +53,6 @@ async function appBoot() {
routes.setStore(store);
routes.start(window.location.pathname);
- // @todo - Remove once we remove entwine
// Enable top-level css selectors for react-dependant entwine sections
if (window.jQuery) {
// need to separate class adds ...because entwine...
diff --git a/client/src/components/Badge/Badge.scss b/client/src/components/Badge/Badge.scss
index 48951cf83..5a0376d29 100644
--- a/client/src/components/Badge/Badge.scss
+++ b/client/src/components/Badge/Badge.scss
@@ -8,7 +8,6 @@
letter-spacing: .3px;
}
-// Todo: replace .status-archived class name with .badge--[modifier]
.status-archived {
color: $text-muted;
}
diff --git a/client/src/components/Breadcrumb/Breadcrumb.scss b/client/src/components/Breadcrumb/Breadcrumb.scss
index 9d0f90faf..e020a31fd 100644
--- a/client/src/components/Breadcrumb/Breadcrumb.scss
+++ b/client/src/components/Breadcrumb/Breadcrumb.scss
@@ -49,7 +49,7 @@
}
}
-.breadcrumb > li.breadcrumb__item--last, // TODO Fix Bootstrap clash
+.breadcrumb > li.breadcrumb__item--last,
.breadcrumb__item--last {
display: block;
float: none;
@@ -71,7 +71,7 @@
}
}
-.cms h2.breadcrumb__item-title--last, // TODO Fix CMS clash
+.cms h2.breadcrumb__item-title--last,
.breadcrumb__item--last .breadcrumb__item-title,
.breadcrumb__item-title--last {
margin: 0;
diff --git a/client/src/components/Form/Form.scss b/client/src/components/Form/Form.scss
index 002eb96da..82aadce7d 100644
--- a/client/src/components/Form/Form.scss
+++ b/client/src/components/Form/Form.scss
@@ -83,7 +83,6 @@
}
// Reset .file bootstrap overrides to default styles
- // TODO rename .file to a different class name as it conflicts with default bootstrap
&.file {
height: auto;
display: block;
@@ -91,7 +90,6 @@
position: static;
}
- // TODO Fix for when the .form-group--no-label class is used but there is actually a label
&.form-group--no-label:not(.stacked) .form__field-label + .form__field-holder {
margin-left: 0;
}
@@ -213,7 +211,6 @@ input.radio {
@include make-row();
// Composite fields
- // TODO reduce nesting
.form__field-holder .form-group {
.form__field-holder,
.form__field-label {
@@ -231,7 +228,6 @@ input.radio {
}
}
- // TODO make label display on the right side like normal .form__field-extra-label
.form__field-extra-label {
@include make-col(12);
margin-left: 0;
diff --git a/client/src/components/FormAction/FormAction.scss b/client/src/components/FormAction/FormAction.scss
index 5b0314ec4..44b2bb667 100644
--- a/client/src/components/FormAction/FormAction.scss
+++ b/client/src/components/FormAction/FormAction.scss
@@ -1,6 +1,3 @@
-// TODO Separate out bootstrap btn reset styles to a separate style sheet or divide within this sheet
-// TODO Rename component to something like Btn or Button?
-
// Button wrapper
.btn-toolbar {
margin-top: $spacer;
@@ -65,8 +62,7 @@
font-size: 17px;
}
-// Please use .btn--icon-lg
-// TODO .btn--icon-large to be deprecated across CMS
+// Please use .btn--icon-lg
.btn--icon-large[class*="font-icon-"]::before,
.btn--icon-lg[class*="font-icon-"]::before {
font-size: 20px;
@@ -77,7 +73,6 @@
}
// For buttons with icon and no text, removes space after icon
-// TODO replace all .no-text classes for .btn--no-text
.btn--no-text[class*="font-icon-"]::before,
.no-text[class*="font-icon-"]::before {
margin-right: 0;
@@ -180,7 +175,6 @@
}
}
-// Todo: All secondary buttons need to change to use .btn-light
.btn-secondary {
border-color: transparent;
background-color: transparent;
@@ -255,7 +249,7 @@
}
}
-// For secondary type actions without border, TODO change word "outline" to border
+// For secondary type actions without border
.btn-hide-outline {
border-color: transparent;
}
diff --git a/client/src/components/FormAlert/FormAlert.js b/client/src/components/FormAlert/FormAlert.js
index 97ffa9f5c..5f3a61369 100644
--- a/client/src/components/FormAlert/FormAlert.js
+++ b/client/src/components/FormAlert/FormAlert.js
@@ -73,7 +73,6 @@ class FormAlert extends Component {
}
render() {
- // @todo default this.props.visible as null
if ((typeof this.props.visible !== 'boolean' && this.state.visible) || this.props.visible) {
// needs to be inside a div because the `Alert` component does some magic with props.children
const body = castStringToElement('div', this.props.value);
diff --git a/client/src/components/FormBuilder/FormBuilder.js b/client/src/components/FormBuilder/FormBuilder.js
index d7a0a501c..65eb6c60e 100644
--- a/client/src/components/FormBuilder/FormBuilder.js
+++ b/client/src/components/FormBuilder/FormBuilder.js
@@ -241,7 +241,6 @@ class FormBuilder extends Component {
return formSchema;
})
.catch((reason) => {
- // @todo Generic CMS error reporting
this.setState({ submittingAction: null });
throw reason;
});
diff --git a/client/src/components/GridField/GridField.js b/client/src/components/GridField/GridField.js
index 3be58617e..bc3a63150 100644
--- a/client/src/components/GridField/GridField.js
+++ b/client/src/components/GridField/GridField.js
@@ -19,10 +19,6 @@ const NotYetLoaded = [];
/**
* The component acts as a container for a grid field,
* with smarts around data retrieval from external sources.
- *
- * @todo Convert to higher order component which hooks up form
- * schema data to an API backend as a grid data source
- * @todo Replace "dumb" inner components with third party library (e.g. https://griddlegriddle.github.io)
*/
class GridField extends Component {
constructor(props) {
@@ -134,7 +130,6 @@ class GridField extends Component {
render() {
if (this.props.records === NotYetLoaded) {
- // TODO Replace with better loading indicator
return
{ i18n._t('CampaignAdmin.LOADING', 'Loading...') }
;
}
diff --git a/client/src/components/GridField/GridField.scss b/client/src/components/GridField/GridField.scss
index 5aa4faa6d..559ee00fe 100644
--- a/client/src/components/GridField/GridField.scss
+++ b/client/src/components/GridField/GridField.scss
@@ -1,6 +1,5 @@
// Grid-field
// Uses bootstrap .table styles
-// TODO remove nesting once buttons have been BEMified
.grid-field {
border-bottom: 0;
@@ -67,7 +66,7 @@
font-family: silverstripe;
}
- &.ss-gridfield-sorted-desc, // TODO BEMify class
+ &.ss-gridfield-sorted-desc,
&.ss-gridfield-sorted-asc {
border-bottom: $table-border-width solid $cyan;
@@ -77,11 +76,11 @@
}
}
- &.ss-gridfield-sorted-desc::after { // TODO BEMify classes
+ &.ss-gridfield-sorted-desc::after {
content: "*";
}
- &.ss-gridfield-sorted-asc::after { // TODO BEMify classes
+ &.ss-gridfield-sorted-asc::after {
content: "(";
}
@@ -147,7 +146,7 @@ input.grid-field__sort-field {
padding-right: 30px;
}
- .grid-field & { // TODO Reduce nesting
+ .grid-field & {
width: calc(100% + #{$input-btn-padding-x * 2});
border-color: $table-bg-tools;
}
@@ -178,7 +177,7 @@ div.grid-field__sort-field + .form__fieldgroup-item {
// Grid-field body actions
.grid-field__icon-action,
-.grid-field__icon-action[class*="font-icon-"] { // Override legacy styles (TODO: remove once jqueryui is removed)
+.grid-field__icon-action[class*="font-icon-"] { // Override legacy styles
background: none;
border: 0;
padding: $table-cell-padding calc($table-cell-padding / 2);
@@ -230,7 +229,7 @@ div.grid-field__sort-field + .form__fieldgroup-item {
padding: 16px 20px;
display: block;
- .grid-field .grid-field__table & { // Override legacy styles (TODO: remove once jqueryui is removed)
+ .grid-field .grid-field__table & { // Override legacy styles
color: $text-muted;
text-decoration: none;
}
@@ -255,7 +254,6 @@ div.grid-field__sort-field + .form__fieldgroup-item {
// Responsive grid-field
-// Todo: add .text-truncate for overflowing cells
@include media-breakpoint-down(sm) {
.grid-field__table td,
.grid-field__table th {
diff --git a/client/src/components/GridField/GridFieldTable.js b/client/src/components/GridField/GridFieldTable.js
index 92c28e75f..31a2afdaa 100644
--- a/client/src/components/GridField/GridFieldTable.js
+++ b/client/src/components/GridField/GridFieldTable.js
@@ -15,9 +15,7 @@ class GridFieldTable extends Component {
return this.props.header;
}
- if (typeof this.props.data !== 'undefined') {
- // TODO: Generate the header.
- }
+ if (typeof this.props.data !== 'undefined') {}
return null;
}
@@ -35,9 +33,7 @@ class GridFieldTable extends Component {
return this.props.rows;
}
- if (typeof this.props.data !== 'undefined') {
- // TODO: Generate the rows.
- }
+ if (typeof this.props.data !== 'undefined') {}
return null;
}
diff --git a/client/src/components/SingleSelectField/SingleSelectField.js b/client/src/components/SingleSelectField/SingleSelectField.js
index fa4d87309..5ad6e2cf0 100644
--- a/client/src/components/SingleSelectField/SingleSelectField.js
+++ b/client/src/components/SingleSelectField/SingleSelectField.js
@@ -69,7 +69,6 @@ class SingleSelectField extends Component {
*/
getInputProps() {
const props = {
- // @TODO Prevent entwine chosen applying chosen
className: `${this.props.className} ${this.props.extraClass} no-chosen`,
id: this.props.id,
name: this.props.name,
diff --git a/client/src/components/Tabs/Tabs.scss b/client/src/components/Tabs/Tabs.scss
index e92076bac..1fb6e6d9e 100644
--- a/client/src/components/Tabs/Tabs.scss
+++ b/client/src/components/Tabs/Tabs.scss
@@ -1,7 +1,7 @@
// Tabs, styles built on top of Bootstrap 4 tab functionality
.nav-tabs {
margin-bottom: $panel-padding-y;
- border-radius: 0; // TODO remove once JQueryUI is removed
+ border-radius: 0;
// Spacing between items
.nav-item + .nav-item {
diff --git a/client/src/components/Toolbar/Toolbar.scss b/client/src/components/Toolbar/Toolbar.scss
index 117d9b577..adfe4d72d 100644
--- a/client/src/components/Toolbar/Toolbar.scss
+++ b/client/src/components/Toolbar/Toolbar.scss
@@ -2,7 +2,6 @@ $circular-button-border-radius: 100px;
$circular-button-size: 32px;
$circular-button-padding: 7px;
-// TODO ensure .toolbar is used globally and remove toolbar--"modifier" classes from following block
.toolbar,
.toolbar--north,
.toolbar--content,
diff --git a/client/src/components/TreeDropdownField/TreeDropdownField.js b/client/src/components/TreeDropdownField/TreeDropdownField.js
index 7a99a511c..07f1ada5c 100644
--- a/client/src/components/TreeDropdownField/TreeDropdownField.js
+++ b/client/src/components/TreeDropdownField/TreeDropdownField.js
@@ -268,7 +268,6 @@ class TreeDropdownField extends Component {
// If any ancestor node in visible chain is either loading or failed then abort re-load
const foundPrev = path.find((pathNode) => (
this.props.loading.indexOf(pathNode) > -1
- // TODO: investigate whether failed should not retry
|| this.props.failed.indexOf(pathNode) > -1
));
if (foundPrev) {
diff --git a/client/src/containers/FormBuilderLoader/FormBuilderLoader.js b/client/src/containers/FormBuilderLoader/FormBuilderLoader.js
index 68dbdab35..b0ad012f9 100644
--- a/client/src/containers/FormBuilderLoader/FormBuilderLoader.js
+++ b/client/src/containers/FormBuilderLoader/FormBuilderLoader.js
@@ -66,7 +66,6 @@ class FormBuilderLoader extends Component {
const messages = {};
// only error messages are collected
- // TODO define message type as standard "success", "info", "warning" and "danger"
if (state && state.fields) {
state.fields.forEach((field) => {
if (field.message) {
@@ -132,8 +131,6 @@ class FormBuilderLoader extends Component {
}
return promise
- // TODO Suggest storing messages in a separate redux store rather than throw an error
- // ref: https://github.com/erikras/redux-form/issues/94#issuecomment-143398399
.then(formSchema => {
if (!formSchema || !formSchema.state) {
return formSchema;
diff --git a/client/src/legacy/ConfirmedPasswordField.js b/client/src/legacy/ConfirmedPasswordField.js
index 464e4d265..92990e3fe 100644
--- a/client/src/legacy/ConfirmedPasswordField.js
+++ b/client/src/legacy/ConfirmedPasswordField.js
@@ -1,8 +1,5 @@
import $ from 'jquery';
-// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
-// import '../styles/legacy/ConfirmedPasswordField.scss';
-
$(document).on('click', '.confirmedpassword .showOnClick a', function () {
var $container = $('.showOnClickContainer', $(this).parent());
diff --git a/client/src/legacy/DateField.js b/client/src/legacy/DateField.js
index 08e678a73..c0ad2efb0 100644
--- a/client/src/legacy/DateField.js
+++ b/client/src/legacy/DateField.js
@@ -48,7 +48,6 @@ jQuery.entwine('ss', ($) => {
this.updateValue();
},
onchange() {
- // TODO Validation
this.updateValue();
},
updateValue() {
diff --git a/client/src/legacy/DatetimeField.js b/client/src/legacy/DatetimeField.js
index 0b317a6d4..ad1424fff 100644
--- a/client/src/legacy/DatetimeField.js
+++ b/client/src/legacy/DatetimeField.js
@@ -53,7 +53,6 @@ jQuery.entwine('ss', ($) => {
this.updateValue();
},
onchange() {
- // TODO Validation
this.updateValue();
},
updateValue() {
diff --git a/client/src/legacy/GridField.js b/client/src/legacy/GridField.js
index a5b30c8df..6c38c0b91 100644
--- a/client/src/legacy/GridField.js
+++ b/client/src/legacy/GridField.js
@@ -9,9 +9,6 @@ import { loadComponent } from 'lib/Injector';
import '../../../thirdparty/jquery-ui/jquery-ui.js';
import '../../../thirdparty/jquery-entwine/jquery.entwine.js';
-// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
-// import '../styles/legacy/GridField.scss';
-
$.entwine('ss', function($) {
$('.grid-field').entwine({
onmatch: function () {
@@ -91,8 +88,7 @@ $.entwine('ss', function($) {
dataType: 'html',
success: function (data) {
// Replace the grid field with response, not the form.
- // TODO Only replaces all its children, to avoid replacing the current scope
- // of the executing method. Means that it doesn't retrigger the onmatch() on the main container.
+ // It doesn't retrigger the onmatch() on the main container.
self.empty().append($(data).children());
// Refocus previously focused element. Useful e.g. for finding+adding
@@ -323,7 +319,6 @@ $.entwine('ss', function($) {
const GridFieldActions = this.getComponent();
- // TODO: rework entwine so that react has control of holder
let root = this.getReactRoot();
if (!root) {
root = createRoot(this[0]);
@@ -651,8 +646,6 @@ $.entwine('ss', function($) {
$('.grid-field[data-selectable] .ss-gridfield-items').entwine({
onadd: function() {
this._super();
-
- // TODO Limit to single selection
this.selectable();
},
onremove: function() {
diff --git a/client/src/legacy/LeftAndMain.BatchActions.js b/client/src/legacy/LeftAndMain.BatchActions.js
index 30628d9d7..ffe180460 100644
--- a/client/src/legacy/LeftAndMain.BatchActions.js
+++ b/client/src/legacy/LeftAndMain.BatchActions.js
@@ -410,7 +410,6 @@ $.entwine('ss.tree', function($){
}
}
- // TODO Should work by triggering change() along, but doesn't - entwine event bubbling?
this.trigger('chosen:updated');
this._super(e);
diff --git a/client/src/legacy/LeftAndMain.EditForm.js b/client/src/legacy/LeftAndMain.EditForm.js
index 0efe3f79b..3bb641301 100644
--- a/client/src/legacy/LeftAndMain.EditForm.js
+++ b/client/src/legacy/LeftAndMain.EditForm.js
@@ -98,13 +98,6 @@ $.entwine('ss', function($){
}
}
- // TODO
- // // Rewrite # links
- // html = html.replace(/(]+href *= *")#/g, '$1' + window.location.href.replace(/#.*$/,'') + '#');
- //
- // // Rewrite iframe links (for IE)
- // html = html.replace(/(