Skip to content

Commit 7839987

Browse files
author
Sabina Talipova
committed
MNT Remove TODO comments
1 parent 02728e1 commit 7839987

File tree

16 files changed

+2
-49
lines changed

16 files changed

+2
-49
lines changed

client/src/components/UploadField/UploadField.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ class UploadField extends Component {
226226
return;
227227
}
228228

229-
// @todo - Should successful uploads be moved to another state?
230229
this.props.actions.uploadField.succeedUpload(this.props.id, file._queuedId, json[0]);
231230
}
232231

client/src/components/UploadField/UploadFieldItem.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ $uploadfield-item-label-height: 40px;
9898

9999
// ACTIONS
100100
// Hidden checkbox is controlled via it's label
101-
// @todo - need this?
102101
.uploadfield-item__remove-btn {
103102
margin: 0;
104103
}

client/src/containers/AssetAdmin/AssetAdmin.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ class AssetAdmin extends Component {
283283
this.handleOpenFile(response.record.id);
284284
}
285285

286-
// TODO Update GraphQL store with new model,
287-
// see https://github.com/silverstripe/silverstripe-graphql/issues/14
288286
return this.props.actions.files.readFiles()
289287
.then(() => {
290288
// open the containing folder, since folder edit mode isn't desired
@@ -477,9 +475,6 @@ class AssetAdmin extends Component {
477475
*/
478476
handleUnpublish(fileIds) {
479477
return this.doUnpublish(fileIds).then((response) => {
480-
// TODO Update GraphQL store with new model or update apollo and use new API
481-
// see https://github.com/silverstripe/silverstripe-graphql/issues/14
482-
// see https://dev-blog.apollodata.com/apollo-clients-new-imperative-store-api-6cb69318a1e3
483478
const { fileId } = this.props;
484479
this.props.actions.files.readFiles()
485480
.then(() => {
@@ -536,8 +531,7 @@ class AssetAdmin extends Component {
536531
}
537532

538533
handleUpload() {
539-
// TODO Update GraphQL store with new model,
540-
// see https://github.com/silverstripe/silverstripe-graphql/issues/14
534+
// noop
541535
}
542536

543537
handleUploadQueue() {
@@ -558,7 +552,6 @@ class AssetAdmin extends Component {
558552
}
559553

560554
handleMoveFilesSuccess(folderId, fileIds) {
561-
// TODO Refactor "queued files" into separate visual area and remove coupling here
562555
const files = this.props.queuedFiles.items.filter((file) => (
563556
fileIds.includes(file.id)
564557
));
@@ -570,8 +563,6 @@ class AssetAdmin extends Component {
570563
});
571564

572565
this.props.actions.gallery.deselectFiles();
573-
// TODO Update GraphQL store with new model,
574-
// see https://github.com/silverstripe/silverstripe-graphql/issues/14
575566
this.props.actions.files.readFiles();
576567
}
577568

@@ -799,7 +790,6 @@ function mapStateToProps(state, ownProps) {
799790
const { formSchema } = state.assetAdmin.modal;
800791
return {
801792
securityId: state.config.SecurityID,
802-
// TODO Refactor "queued files" into separate visual area and remove coupling here
803793
queuedFiles: state.assetAdmin.queuedFiles,
804794
showSearch: state.assetAdmin.displaySearch.isOpen,
805795
type: (formSchema && formSchema.type) || ownProps.type,
@@ -812,7 +802,6 @@ function mapDispatchToProps(dispatch) {
812802
gallery: bindActionCreators(galleryActions, dispatch),
813803
toasts: bindActionCreators(toastsActions, dispatch),
814804
displaySearch: bindActionCreators(displaySearchActions, dispatch),
815-
// TODO Refactor "queued files" into separate visual area and remove coupling here
816805
queuedFiles: bindActionCreators(queuedFilesActions, dispatch),
817806
confirmDeletion: bindActionCreators(confirmDeletionActions, dispatch)
818807
},

client/src/containers/Editor/LegacyPopoverField.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
// Unable to use classes within the popover, so we use elements to style
4242
ul {
43-
// TODO remove important by removing nesting of lists
4443
padding-left: 0 !important;
4544
list-style-type: none;
4645
margin-left: -#{$popover-body-padding-x} + 1px; // minus border

client/src/containers/Gallery/Gallery.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,27 +127,23 @@ class Gallery extends Component {
127127
}
128128

129129
if (filters.lastEditedFrom && filters.lastEditedTo) {
130-
// TODO Date localisation
131130
messages.push(i18n._t(
132131
'AssetAdmin.SEARCHRESULTSMESSAGEEDITEDBETWEEN',
133132
'last edited between \'{lastEditedFrom}\' and \'{lastEditedTo}\''
134133
));
135134
} else if (filters.lastEditedFrom) {
136-
// TODO Date localisation
137135
messages.push(i18n._t(
138136
'AssetAdmin.SEARCHRESULTSMESSAGEEDITEDFROM',
139137
'last edited after \'{lastEditedFrom}\''
140138
));
141139
} else if (filters.lastEditedTo) {
142-
// TODO Date localisation
143140
messages.push(i18n._t(
144141
'AssetAdmin.SEARCHRESULTSMESSAGEEDITEDTO',
145142
'last edited before \'{lastEditedTo}\''
146143
));
147144
}
148145

149146
if (filters.appCategory) {
150-
// TODO Category name localisation
151147
messages.push(i18n._t(
152148
'AssetAdmin.SEARCHRESULTSMESSAGECATEGORY',
153149
'categorised as \'{appCategory}\''
@@ -402,8 +398,6 @@ class Gallery extends Component {
402398

403399
this.props.actions.queuedFiles.succeedUpload(fileXhr._queuedId, json[0]);
404400

405-
// TODO Update GraphQL store with new model,
406-
// see https://github.com/silverstripe/silverstripe-graphql/issues/14
407401
if (this.props.onSuccessfulUpload) {
408402
this.props.onSuccessfulUpload(json);
409403
}

client/src/containers/HistoryList/HistoryItem.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class HistoryItem extends Component {
2525
}
2626

2727
return (
28-
// @todo wrap the contents in an `<a>` tag
2928
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
3029
<li
3130
className="list-group-item history-item"

client/src/containers/HistoryList/HistoryList.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ const sectionConfigKey = 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin';
1111
/**
1212
* Create a new endpoint
1313
*
14-
* @todo duplication with assetadmin.
15-
*
1614
* @param {Object} endpointConfig
1715
* @param {Boolean} includeToken
1816
* @returns {Function}
@@ -47,7 +45,7 @@ class HistoryList extends Component {
4745
}
4846

4947
componentDidUpdate(prevProps) {
50-
// TODO race conditions happening, this should have history state shifted to redux
48+
// Avoids race conditions from happening
5149
this.refreshHistoryIfNeeded(prevProps);
5250
}
5351

@@ -75,7 +73,6 @@ class HistoryList extends Component {
7573
* This needs a delay/throttle, so this api request tries to be made last in the stack.
7674
* We also use this to stop an API call happening if the component is going to
7775
* unmount soon.
78-
* TODO: This could potentially be solved by using apollo-client's caching and graphql.
7976
*/
8077
this.timer = setTimeout(() => {
8178
this.api({

client/src/containers/TableView/TableView.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ class TableView extends Component {
131131
columnMetadata: this.getColumnConfig(),
132132
useGriddleStyles: false,
133133
onRowClick: this.handleRowClick,
134-
// TODO will need to request upstream to stop their internal sorting to show folders first
135134
results: this.props.files,
136135
customNoDataComponent: this.renderNoItemsNotice,
137136
};

client/src/entwine/TinyMCE_ssmedia.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,6 @@ jQuery.entwine('ss', ($) => {
271271
_handleInsert(data, file) {
272272
let result = false;
273273
this.setData(Object.assign({}, data, file));
274-
275-
// Sometimes AssetAdmin.js handleSubmitEditor() can't find the file
276-
// @todo Ensure that we always return a file for any valid ID
277-
278274
// in case of any errors, better to catch them than let them go silent
279275
try {
280276
let category = null;

client/src/entwine/UploadField/UploadFieldEntwine.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jQuery.entwine('ss', ($) => {
6868

6969
const UploadField = this.getComponent();
7070

71-
// TODO: rework entwine so that react has control of holder
7271
let root = this.getReactRoot();
7372
if (!root) {
7473
root = createRoot(this.getContainer());

0 commit comments

Comments
 (0)