-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MNT Remove TODO comments #1413
MNT Remove TODO comments #1413
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,8 +283,6 @@ class AssetAdmin extends Component { | |
this.handleOpenFile(response.record.id); | ||
} | ||
|
||
// TODO Update GraphQL store with new model, | ||
// see https://github.com/silverstripe/silverstripe-graphql/issues/14 | ||
return this.props.actions.files.readFiles() | ||
.then(() => { | ||
// open the containing folder, since folder edit mode isn't desired | ||
|
@@ -477,9 +475,6 @@ class AssetAdmin extends Component { | |
*/ | ||
handleUnpublish(fileIds) { | ||
return this.doUnpublish(fileIds).then((response) => { | ||
// TODO Update GraphQL store with new model or update apollo and use new API | ||
// see https://github.com/silverstripe/silverstripe-graphql/issues/14 | ||
// see https://dev-blog.apollodata.com/apollo-clients-new-imperative-store-api-6cb69318a1e3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
const { fileId } = this.props; | ||
this.props.actions.files.readFiles() | ||
.then(() => { | ||
|
@@ -536,8 +531,7 @@ class AssetAdmin extends Component { | |
} | ||
|
||
handleUpload() { | ||
// TODO Update GraphQL store with new model, | ||
// see https://github.com/silverstripe/silverstripe-graphql/issues/14 | ||
// noop | ||
} | ||
|
||
handleUploadQueue() { | ||
|
@@ -558,7 +552,6 @@ class AssetAdmin extends Component { | |
} | ||
|
||
handleMoveFilesSuccess(folderId, fileIds) { | ||
// TODO Refactor "queued files" into separate visual area and remove coupling here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
const files = this.props.queuedFiles.items.filter((file) => ( | ||
fileIds.includes(file.id) | ||
)); | ||
|
@@ -570,8 +563,6 @@ class AssetAdmin extends Component { | |
}); | ||
|
||
this.props.actions.gallery.deselectFiles(); | ||
// TODO Update GraphQL store with new model, | ||
// see https://github.com/silverstripe/silverstripe-graphql/issues/14 | ||
this.props.actions.files.readFiles(); | ||
} | ||
|
||
|
@@ -799,7 +790,6 @@ function mapStateToProps(state, ownProps) { | |
const { formSchema } = state.assetAdmin.modal; | ||
return { | ||
securityId: state.config.SecurityID, | ||
// TODO Refactor "queued files" into separate visual area and remove coupling here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
queuedFiles: state.assetAdmin.queuedFiles, | ||
showSearch: state.assetAdmin.displaySearch.isOpen, | ||
type: (formSchema && formSchema.type) || ownProps.type, | ||
|
@@ -812,7 +802,6 @@ function mapDispatchToProps(dispatch) { | |
gallery: bindActionCreators(galleryActions, dispatch), | ||
toasts: bindActionCreators(toastsActions, dispatch), | ||
displaySearch: bindActionCreators(displaySearchActions, dispatch), | ||
// TODO Refactor "queued files" into separate visual area and remove coupling here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
queuedFiles: bindActionCreators(queuedFilesActions, dispatch), | ||
confirmDeletion: bindActionCreators(confirmDeletionActions, dispatch) | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ class HistoryItem extends Component { | |
} | ||
|
||
return ( | ||
// @todo wrap the contents in an `<a>` tag | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions | ||
<li | ||
className="list-group-item history-item" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,6 @@ const sectionConfigKey = 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin'; | |
/** | ||
* Create a new endpoint | ||
* | ||
* @todo duplication with assetadmin. | ||
* | ||
* @param {Object} endpointConfig | ||
* @param {Boolean} includeToken | ||
* @returns {Function} | ||
|
@@ -47,7 +45,7 @@ class HistoryList extends Component { | |
} | ||
|
||
componentDidUpdate(prevProps) { | ||
// TODO race conditions happening, this should have history state shifted to redux | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
// Avoids race conditions from happening | ||
this.refreshHistoryIfNeeded(prevProps); | ||
} | ||
|
||
|
@@ -75,7 +73,6 @@ class HistoryList extends Component { | |
* This needs a delay/throttle, so this api request tries to be made last in the stack. | ||
* We also use this to stop an API call happening if the component is going to | ||
* unmount soon. | ||
* TODO: This could potentially be solved by using apollo-client's caching and graphql. | ||
*/ | ||
this.timer = setTimeout(() => { | ||
this.api({ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,10 +271,6 @@ jQuery.entwine('ss', ($) => { | |
_handleInsert(data, file) { | ||
let result = false; | ||
this.setData(Object.assign({}, data, file)); | ||
|
||
// Sometimes AssetAdmin.js handleSubmitEditor() can't find the file | ||
// @todo Ensure that we always return a file for any valid ID | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
// in case of any errors, better to catch them than let them go silent | ||
try { | ||
let category = null; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,6 @@ const config = { | |
fileIds, | ||
}, | ||
update: () => { | ||
// todo: | ||
// Refactor this once Apollo GraphQL adds support | ||
// for invalidating specific queries in the cache. | ||
// Context: https://github.com/silverstripe/silverstripe-asset-admin/issues/809 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
window.ss.apolloClient.resetStore(); | ||
} | ||
}), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.