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..f00e00879 100644 --- a/client/src/components/GridField/GridFieldTable.js +++ b/client/src/components/GridField/GridFieldTable.js @@ -15,10 +15,6 @@ class GridFieldTable extends Component { return this.props.header; } - if (typeof this.props.data !== 'undefined') { - // TODO: Generate the header. - } - return null; } @@ -35,10 +31,6 @@ class GridFieldTable extends Component { return this.props.rows; } - if (typeof this.props.data !== 'undefined') { - // TODO: Generate the rows. - } - return null; } @@ -55,7 +47,7 @@ class GridFieldTable extends Component { } GridFieldTable.propTypes = { - data: PropTypes.object, + data: PropTypes.object, // eslint-disable-line react/no-unused-prop-types header: PropTypes.object, rows: PropTypes.array, }; 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(/(]*src=")([^"]+)("[^>]*>)/g, '$1' + $('base').attr('href') + '$2$3'); - this._super(); }, 'from .cms-tabset': { @@ -282,8 +275,6 @@ $.entwine('ss', function($){ * Hook in (optional) validation routines. * Currently clientside validation is not supported out of the box in the CMS. * - * Todo: - * Placeholder implementation * * Returns: * {boolean} diff --git a/client/src/legacy/LeftAndMain.FieldHelp.js b/client/src/legacy/LeftAndMain.FieldHelp.js index 8578a2c9d..3b6086788 100644 --- a/client/src/legacy/LeftAndMain.FieldHelp.js +++ b/client/src/legacy/LeftAndMain.FieldHelp.js @@ -17,7 +17,6 @@ $.entwine('ss', function($) { var descriptionEl = this.find('.description'), inputEl, tooltipEl; if(descriptionEl.length) { this - // TODO Remove title setting, shouldn't be necessary .attr('title', descriptionEl.text()) .tooltip({content: descriptionEl.html()}); descriptionEl.remove(); diff --git a/client/src/legacy/LeftAndMain.Panel.js b/client/src/legacy/LeftAndMain.Panel.js index 273b193e8..09f068338 100644 --- a/client/src/legacy/LeftAndMain.Panel.js +++ b/client/src/legacy/LeftAndMain.Panel.js @@ -155,12 +155,8 @@ $.entwine('ss', function($) { this.setPersistedCollapsedState(!doExpand); } - // TODO Fix redraw order (inner to outer), and re-enable silent flag - // to avoid multiple expensive redraws on a single load. - // if(!silent) { - this.trigger('toggle', doExpand); - this.trigger(doExpand ? 'expand' : 'collapse'); - // } + this.trigger('toggle', doExpand); + this.trigger(doExpand ? 'expand' : 'collapse'); }, expandPanel: function(force) { diff --git a/client/src/legacy/LeftAndMain.Tree.js b/client/src/legacy/LeftAndMain.Tree.js index 166046d04..36179635d 100644 --- a/client/src/legacy/LeftAndMain.Tree.js +++ b/client/src/legacy/LeftAndMain.Tree.js @@ -77,24 +77,6 @@ $.entwine('ss.tree', function($){ }); }; - /** - * @todo Icon and page type hover support - * @todo Sorting of sub nodes (originally placed in context menu) - * @todo Automatic load of full subtree via ajax on node checkbox selection (minNodeCount = 0) - * to avoid doing partial selection with "hidden nodes" (unloaded markup) - * @todo Disallow drag'n'drop when node has "noChildren" set (see siteTreeHints) - * @todo Disallow moving of pages marked as deleted - * most likely by server response codes rather than clientside - * @todo "defaultChild" when creating a page (sitetreeHints) - * @todo Duplicate page (originally located in context menu) - * @todo Update tree node title information and modified state after reordering (response is a JSON array) - * - * Tasks most likely not required after moving to a standalone tree: - * - * @todo Context menu - to be replaced by a bezel UI - * @todo Refresh form for selected tree node if affected by reordering (new parent relationship) - * @todo Cancel current form load via ajax when new load is requested (synchronous loading) - */ var self = this; this .jstree(this.getTreeConfig()) @@ -165,8 +147,6 @@ $.entwine('ss.tree', function($){ 'from .cms-container form': { onaftersubmitform: function(e){ const id = $('.cms-edit-form :input[name=ID]').val(); - // TODO Trigger by implementing and inspecting "changed records" metadata - // sent by form submission response (as HTTP response headers) const node = this.find(`[data-id=${id}]`); let ids = [+id]; node.find('li').each(function () { @@ -430,7 +410,6 @@ $.entwine('ss.tree', function($){ this.setIsUpdatingTree(true); self.jstree('save_selected'); - // TODO 'initially_opened' config doesn't apply here self.jstree('open_node', this.getNodeByID(0)); self.jstree('save_opened'); self.jstree('save_selected'); diff --git a/client/src/legacy/LeftAndMain.js b/client/src/legacy/LeftAndMain.js index 040c7644b..e9e4b0acb 100644 --- a/client/src/legacy/LeftAndMain.js +++ b/client/src/legacy/LeftAndMain.js @@ -472,7 +472,6 @@ $.entwine('ss', function($) { } if(typeof validationResult!=='undefined' && !validationResult) { - // TODO Automatically switch to the tab/position of the first error statusMessage("Validation failed.", "bad"); clearButton(); } @@ -484,7 +483,6 @@ $.entwine('ss', function($) { // Artificial HTTP referer, IE doesn't submit them via ajax. // Also rewrites anchors to their page counterparts, which is important // as automatic browser ajax response redirects seem to discard the hash/fragment. - // TODO Replaces trailing slashes added by History after locale (e.g. admin/?locale=en/) formData.push({ name: 'BackURL', value: document.URL.replace(/\/$/, '') }); // Save tab selections so we can restore them later @@ -504,7 +502,7 @@ $.entwine('ss', function($) { }, success: function(data, status, xhr) { clearButton(); - form.removeClass('changed'); // TODO This should be using the plugin API + form.removeClass('changed'); if(callback) callback(data, status, xhr); var newContentEls = self.handleAjaxResponse(data, status, xhr); @@ -780,7 +778,6 @@ $.entwine('ss', function($) { $data = $($.parseHTML(data, document, false)); // Try and guess the fragment if none is provided - // TODO: data-pjax-fragment might actually give us the fragment. For now we just check most common case guessFragment = 'Content'; if ($data.is('form') && !$data.is('[data-pjax-fragment~=Content]')) guessFragment = 'CurrentForm'; diff --git a/client/src/legacy/PermissionCheckboxSetField.js b/client/src/legacy/PermissionCheckboxSetField.js index c28dea047..73530401b 100644 --- a/client/src/legacy/PermissionCheckboxSetField.js +++ b/client/src/legacy/PermissionCheckboxSetField.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/CheckboxSetField.scss'; - $.entwine('ss', function($){ /** * Automatically check and disable all checkboxes if ADMIN permissions are selected. @@ -44,7 +41,6 @@ $.entwine('ss', function($){ /** * Automatically check all "CMS section" checkboxes when "Access to all CMS interfaces" is ticked. * - * @todo This should really be abstracted into a declarative dependency system * instead of custom logic. */ $('.permissioncheckboxset .valCMS_ACCESS_LeftAndMain input').entwine({ diff --git a/client/src/legacy/SecurityAdmin.js b/client/src/legacy/SecurityAdmin.js index 54162366a..9af3d60cd 100644 --- a/client/src/legacy/SecurityAdmin.js +++ b/client/src/legacy/SecurityAdmin.js @@ -27,7 +27,6 @@ var refreshAfterImport = function(e) { $('#MemberImportFormIframe, #GroupImportFormIframe').entwine({ onadd: function() { this._super(); - // TODO entwine can't seem to bind to iframe load events $(this).on('load', refreshAfterImport); } }); diff --git a/client/src/legacy/SelectionGroup.js b/client/src/legacy/SelectionGroup.js index 19a5073f0..a30a4864a 100644 --- a/client/src/legacy/SelectionGroup.js +++ b/client/src/legacy/SelectionGroup.js @@ -1,9 +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/SelectionGroup.scss'; - - $(document).ready(function() { // Support both bootstrap / legacy selectors $(document).on('click', 'ul.SelectionGroup input.selector, ul.selection-group input.selector', function() { diff --git a/client/src/legacy/TabSet.js b/client/src/legacy/TabSet.js index 29ebdbfa1..ee957a1da 100644 --- a/client/src/legacy/TabSet.js +++ b/client/src/legacy/TabSet.js @@ -4,9 +4,6 @@ import '../../../thirdparty/jquery-ui/jquery-ui.js'; import '../../../thirdparty/jquery-cookie/jquery.cookie.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 '../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css'; - $.entwine('ss', function($){ $('.ss-tabset, .cms-tabset').entwine({ diff --git a/client/src/legacy/ToggleCompositeField.js b/client/src/legacy/ToggleCompositeField.js index 7165f6983..3a4830d73 100644 --- a/client/src/legacy/ToggleCompositeField.js +++ b/client/src/legacy/ToggleCompositeField.js @@ -3,9 +3,6 @@ import $ from 'jquery'; // entwine also required, but can't be included more than once without error import '../../../thirdparty/jquery-ui/jquery-ui.js'; -// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now. -// import '../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css'; - $.entwine('ss', function($){ $('.ss-toggle').entwine({ onadd: function() { diff --git a/client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js b/client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js index fe0f9d2b1..98dd79605 100644 --- a/client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js +++ b/client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js @@ -67,7 +67,6 @@ jQuery.entwine('ss', ($) => { const TreeDropdownField = this.getComponent(); - // TODO: rework entwine so that react has control of holder let root = this.getReactRoot(); if (!root) { root = createRoot(this[0]); diff --git a/client/src/legacy/UsedOnTable/UsedOnTableEntwine.js b/client/src/legacy/UsedOnTable/UsedOnTableEntwine.js index 46095fbd0..e9d939b8b 100644 --- a/client/src/legacy/UsedOnTable/UsedOnTableEntwine.js +++ b/client/src/legacy/UsedOnTable/UsedOnTableEntwine.js @@ -39,7 +39,6 @@ jQuery.entwine('ss', ($) => { const UsedOnTable = this.getComponent(); - // TODO: rework entwine so that react has control of holder let root = this.getReactRoot(); if (!root) { root = createRoot(this[0]); diff --git a/client/src/legacy/jquery.changetracker.js b/client/src/legacy/jquery.changetracker.js index b452f055e..165bd7f59 100644 --- a/client/src/legacy/jquery.changetracker.js +++ b/client/src/legacy/jquery.changetracker.js @@ -41,7 +41,6 @@ import debounce from 'lodash.debounce'; * ignoreFieldSelector: jQuery selector string for specifically excluded fields * changedCssClass: CSS class attribute which is appended to all changed fields and the form itself * - * @todo Implement form reset handling * * @name jQuery.changetracker * @author Ingo Schommer, SilverStripe Ltd. diff --git a/client/src/legacy/sspath.js b/client/src/legacy/sspath.js index 75e4b4725..6449813fe 100644 --- a/client/src/legacy/sspath.js +++ b/client/src/legacy/sspath.js @@ -177,8 +177,6 @@ var $window = $( window ), }, // Converts query strings (foo=bar&baz=bla) to a hash. - // TODO Handle repeating elements (e.g. arr[]=one&arr[]=two) - // 2013-12-06 ischommer: Added to allow merge with existing keys convertSearchToArray: function(search) { var parts, i, tmp, params = {}; search = search.replace( /^\?/, '' ); diff --git a/client/src/lib/Backend.js b/client/src/lib/Backend.js index 4c8f906cb..319a1162d 100644 --- a/client/src/lib/Backend.js +++ b/client/src/lib/Backend.js @@ -145,7 +145,6 @@ function applySchemaToData(payloadSchema, data) { return prev; } - // TODO Support for nested keys return Object.assign(prev, { [key]: data[key] }); }, {}); } diff --git a/client/src/lib/ReactRouteRegister.js b/client/src/lib/ReactRouteRegister.js index d72a891e2..a142e5e90 100644 --- a/client/src/lib/ReactRouteRegister.js +++ b/client/src/lib/ReactRouteRegister.js @@ -169,8 +169,6 @@ class ReactRouteRegister { * copy of `reactRouteRegister` and all modules in `custom` get a single copy of * `reactRouteRegister`, the copy of `reactRouteRegister` in `framework` is not * the same copy of `reactRouteRegister` available in `custom`. - * - * @TODO Look into SystemJS as a solution https://github.com/systemjs/systemjs */ window.ss = window.ss || {}; diff --git a/client/src/lib/Router.js b/client/src/lib/Router.js index 2c065dba9..c2cfac68e 100644 --- a/client/src/lib/Router.js +++ b/client/src/lib/Router.js @@ -115,8 +115,6 @@ page.routeAppliesToCurrentLocation = routeAppliesToCurrentLocation; * copy of `router` and all modules in `custom` get a single copy of `router`, * the copy of `router` in `framework` is not the same copy of `router` * available in `custom`. - * - * @TODO Look into SystemJS as a solution https://github.com/systemjs/systemjs */ window.ss = window.ss || {}; diff --git a/client/src/lib/TinyMCEActionRegistrar.js b/client/src/lib/TinyMCEActionRegistrar.js index d24c97836..d29ec1c29 100644 --- a/client/src/lib/TinyMCEActionRegistrar.js +++ b/client/src/lib/TinyMCEActionRegistrar.js @@ -147,7 +147,6 @@ class TinyMCEActionRegistrar { } } -// TODO Fix registration across modules, see lib/Router.js for details window.ss = window.ss || {}; window.ss.tinymceactions = window.ss.tinymceactions || new TinyMCEActionRegistrar(); diff --git a/client/src/lib/dependency-injection/buildApolloGraphqlContainer.js b/client/src/lib/dependency-injection/buildApolloGraphqlContainer.js index 8862b91c7..15918faac 100644 --- a/client/src/lib/dependency-injection/buildApolloGraphqlContainer.js +++ b/client/src/lib/dependency-injection/buildApolloGraphqlContainer.js @@ -32,15 +32,6 @@ const buildApolloGraphqlContainer = ( */ /* eslint-disable max-len, no-unused-vars */ scaffold(key, config, { force }) { - /* - * @todo build out scaffolding - * I would recommend adding a default mutation update handlers here, instead of in the `register` method. - * This way query and mutation could be potentially be linked more easily. - * Config schema could be found in the `GraphqlManager.js` file. - * - * Proof-of-concept for handlers could be found here: - * https://github.com/flamerohr/silverstripe-graphql-react-boilerplate/tree/master/client/src/js/lib/graphql - */ throw new Error('This API endpoint is not available yet'); }, /* eslint-enable */ diff --git a/client/src/lib/dependency-injection/buildComponentContainer.js b/client/src/lib/dependency-injection/buildComponentContainer.js index 01ec73af1..b975c41a9 100644 --- a/client/src/lib/dependency-injection/buildComponentContainer.js +++ b/client/src/lib/dependency-injection/buildComponentContainer.js @@ -34,7 +34,6 @@ const buildComponentContainer = (base = buildBaseContainer()) => ({ const componentName = (service.displayName || service.name || 'Component'); const componentKey = (context) ? `[${context}]` : ''; - // @todo this causes incorrect context to display if this service is used in different contexts service.displayName = `${componentName}${componentKey}`; return service; diff --git a/client/src/lib/dependency-injection/injectGraphql.js b/client/src/lib/dependency-injection/injectGraphql.js index 84e125cb5..5aa63d80b 100644 --- a/client/src/lib/dependency-injection/injectGraphql.js +++ b/client/src/lib/dependency-injection/injectGraphql.js @@ -5,9 +5,6 @@ import withInjector from './withInjector'; /** * Loads the graphql HOC generated by injector * - * @todo investigate converting context to a callback which returns context, performance may - * be an issue - * * @param key * @param context */ diff --git a/client/src/styles/_layout.scss b/client/src/styles/_layout.scss index 9ddd30001..102c1c85f 100644 --- a/client/src/styles/_layout.scss +++ b/client/src/styles/_layout.scss @@ -1,5 +1,4 @@ // INITIATE FLEXBOX LAYOUT -// TODO Convert layout to BEM *, *:before, @@ -19,8 +18,6 @@ body { display: flex; } - -// TODO move out of layout .CMSPageEditController, // sass-lint:disable-line class-name-format .CMSPageSettingsController { // sass-lint:disable-line class-name-format &.has-panel { diff --git a/client/src/styles/_variables.scss b/client/src/styles/_variables.scss index a607de364..bb1ad2ebb 100644 --- a/client/src/styles/_variables.scss +++ b/client/src/styles/_variables.scss @@ -136,8 +136,6 @@ $shadow-level-3: rgba(0, 0, 0, .2); $shadow-level-4: rgba(0, 0, 0, .25); $shadow-level-5: rgba(0, 0, 0, .3); -// TODO tidy all shadows cms wide (including AssetAdmin) - $shadow-light: $shadow-level-3; $shadow-lighter: $shadow-level-1; $dropdown-shadow: 0 0 3px $shadow-level-3; diff --git a/client/src/styles/legacy/GridField.scss b/client/src/styles/legacy/GridField.scss index 46ddc4ee8..8b57911a6 100644 --- a/client/src/styles/legacy/GridField.scss +++ b/client/src/styles/legacy/GridField.scss @@ -3,8 +3,6 @@ * * @package framework * @subpackage scss - * @todo Add radial gradient to default delete button state - * @todo Create SASS mixin-function to simply swap the from/to, to to/from colours in grsdient mixins? */ // Extends basic table styles, requires .table .table-hover @@ -312,7 +310,6 @@ white-space: nowrap; } -// TODO create pagination component .grid-field__paginator_numbers { float: right; } diff --git a/client/src/styles/legacy/_forms.scss b/client/src/styles/legacy/_forms.scss index d036d6099..36c382515 100644 --- a/client/src/styles/legacy/_forms.scss +++ b/client/src/styles/legacy/_forms.scss @@ -20,7 +20,7 @@ fieldset { } } -.field { // TODO convert to .form-group +.field { &.ui-tabs { border-bottom: 0; @@ -70,7 +70,6 @@ fieldset { @extend .form-control; } - // TODO remove ID style &#Action { box-shadow: none; } diff --git a/client/src/styles/legacy/_style.scss b/client/src/styles/legacy/_style.scss index eed99a06e..ca3138595 100644 --- a/client/src/styles/legacy/_style.scss +++ b/client/src/styles/legacy/_style.scss @@ -70,7 +70,7 @@ html, body { // .cms-content-header, // // DEPRECATED: // // .cms-content-tools will be removed in 4.0 -// // Use .cms-content-filters instead (TODO rename to BEM). +// // Use .cms-content-filters instead // .cms-content-tools, // .cms-content-fields, // .cms-preview, @@ -79,7 +79,7 @@ html, body { // display: inline-block; // } -.cms-content-header { // Todo: should add .container-fluid to markup or extend .container-fluid +.cms-content-header { position: relative; padding-left: $panel-padding-x; padding-right: $panel-padding-x; @@ -480,7 +480,7 @@ html, body { &.cms-edit-form { padding: 0; - display: flex; // TODO remove once JQueryUI is removed + display: flex; } .ui-tabs .ui-tabs-nav { @@ -600,7 +600,6 @@ html, body { /** * Primary styles which sit on top right of screen. - * TODO Only use one "primary" selector and fix HTMLEditorField TabSet addExtraClass() */ .ui-tabs.cms-tabset-primary .ui-tabs-nav, .ui-tabs .ui-tabs-nav.cms-tabset-nav-primary, @@ -1332,7 +1331,6 @@ form.member-profile-form { #CreateTopLevelGroups { select { // Fix for chosen.js width detection on hidden elements. - // TODO Remove once .field styling in _form.scss is refactored to allow flexible field widths width: $spacer * 32; } } @@ -1497,7 +1495,7 @@ form.member-profile-form { .-content { border-radius: map_get($spacers, 2); - overflow: auto; // TODO Replace with proper $.layout grid + overflow: auto; &.loading { background-image: url('../../images/spinner.gif'); diff --git a/client/src/styles/legacy/_uitheme.scss b/client/src/styles/legacy/_uitheme.scss index b547e7ea7..3274e0f82 100644 --- a/client/src/styles/legacy/_uitheme.scss +++ b/client/src/styles/legacy/_uitheme.scss @@ -3,7 +3,6 @@ * Every rule should contain ONLY overwritten jQuery UI rules (with 'ui-' prefix). * * This file should be fairly short, as we're using our own custom jQuery UI theme already. - * TODO Add theme reference * * Use _style.scss to add more generic style information, * and read the jQuery UI theming API: http://jqueryui.com/docs/Theming/API diff --git a/code/CMSMenu.php b/code/CMSMenu.php index c0c8fc7e3..65ccc0016 100644 --- a/code/CMSMenu.php +++ b/code/CMSMenu.php @@ -70,8 +70,6 @@ public static function populate_menu() * Add a LeftAndMain controller to the CMS menu. * * @param string $controllerClass The class name of the controller - * @todo A director rule is added when a controller link is added, but it won't be removed - * when the item is removed. Functionality needed in {@link Director}. */ public static function add_controller($controllerClass) { @@ -371,7 +369,6 @@ protected static function add_menu_item_obj($code, $cmsMenuItem) * * Sorted by url_priority config. * - * @todo A variation of this function could probably be moved to {@link ClassInfo} * @param string $root The root class to begin finding subclasses * @param boolean $recursive Look for subclasses recursively? * @param string $sort Name of config on which to sort. Can be 'menu_priority' or 'url_priority' @@ -382,7 +379,6 @@ public static function get_cms_classes($root = null, $recursive = true, $sort = if (!$root) { $root = LeftAndMain::class; } - /** @todo Make these actual abstract classes */ $abstractClasses = [LeftAndMain::class, CMSMain::class]; $subClasses = array_values(ClassInfo::subclassesFor($root) ?? []); foreach ($subClasses as $className) { diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 1c3f5b1b3..eecfe5688 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -975,7 +975,6 @@ public static function menu_icon_class_for_class($class) */ public function show(HTTPRequest $request): HTTPResponse { - // TODO Necessary for TableListField URLs to work properly if ($request->param('ID')) { $this->setCurrentPageID($request->param('ID')); } @@ -1126,7 +1125,6 @@ public function Menu() } /** - * @todo Wrap in CMSMenu instance accessor * @return ArrayData A single menu entry (see {@link MainMenu}) */ public function MenuCurrentItem() diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php index 6d0619590..98635f75a 100644 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -644,8 +644,6 @@ public function ImportForm() * Imports the submitted CSV file based on specifications given in * {@link self::model_importers}. * Redirects back with a success/failure message. - * - * @todo Figure out ajax submission of files via jQuery.form plugin */ public function import(array $data, Form $form): HTTPResponse { diff --git a/tests/behat/features/manage-users.feature b/tests/behat/features/manage-users.feature index b55ead082..8fa8ef125 100644 --- a/tests/behat/features/manage-users.feature +++ b/tests/behat/features/manage-users.feature @@ -71,7 +71,6 @@ Feature: Manage users Scenario: I can list all users in a specific group When I click the "Groups" CMS tab - # TODO Please check how performant this is And I click "ADMIN group" in the "#Form_EditForm_groups" element Then I should see "admin@example.org" in the "#Root_Members" element And I should not see "staffmember@example.org" in the "#Root_Members" element diff --git a/tests/behat/features/profile.feature b/tests/behat/features/profile.feature index 11d6d1883..f5539119b 100644 --- a/tests/behat/features/profile.feature +++ b/tests/behat/features/profile.feature @@ -65,6 +65,3 @@ Feature: Manage my own settings And I select "German (Germany)" from "Interface Language" And I press the "Save" button Then I should see "Sprache" - - # TODO Date/time format - Difficult because its not exposed anywhere in the CMS? - # TODO Group modification as ADMIN user diff --git a/tests/php/LeftAndMainTest.php b/tests/php/LeftAndMainTest.php index cc1d4a3de..25ffb7521 100644 --- a/tests/php/LeftAndMainTest.php +++ b/tests/php/LeftAndMainTest.php @@ -35,8 +35,6 @@ protected function setUp(): void { parent::setUp(); - // @todo fix controller stack problems and re-activate - //$this->autoFollowRedirection = false; $this->resetMenu(); $this->backupCombined = Requirements::get_combined_files_enabled(); $base = ModuleLoader::inst()->getManifest()->getModule('silverstripe/admin'); diff --git a/tests/php/SecurityAdminTest.php b/tests/php/SecurityAdminTest.php index 45ac93b00..bf43cff27 100644 --- a/tests/php/SecurityAdminTest.php +++ b/tests/php/SecurityAdminTest.php @@ -12,7 +12,6 @@ class SecurityAdminTest extends FunctionalTest { protected static $fixture_file = 'LeftAndMainTest.yml'; - // TODO Fix export feature (moved from MemberTableField to GridFieldExportButton) // public function testGroupExport() { // $this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin')); @@ -30,7 +29,6 @@ class SecurityAdminTest extends FunctionalTest // $this->assertMatchesRegularExpression('/"","","admin@example.com"/', $lines[1], "Member values are correctly exported"); // } - // TODO Fix export feature (moved from MemberTableField to GridFieldExportButton) // public function testEmptyGroupExport() { // $this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));