Skip to content
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

ENH Remove code that had been retained for backwards compatibility #1883

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/js/vendor.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions client/src/components/Breadcrumb/Breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@ Breadcrumb.propTypes = {
crumbs: PropTypes.arrayOf(PropTypes.shape({
onClick: PropTypes.func,
text: PropTypes.string,
// pass in a single icon (retain backwards compatibility)
icon: PropTypes.shape({
nodeName: PropTypes.string,
className: PropTypes.string,
onClick: PropTypes.func,
action: (props) => { if (props.action) { throw new Error('action: no longer used'); } },
}),
Comment on lines -105 to -111
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't used anywhere that I can find - and if anyone's using it for their own uses they can just pass it as an array to the icons prop instead.

// pass in an array multiple icons (use this going forward)
icons: PropTypes.arrayOf(PropTypes.shape({
nodeName: PropTypes.string,
className: PropTypes.string,
Expand Down
9 changes: 0 additions & 9 deletions client/src/legacy/LeftAndMain.EditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,15 +607,6 @@ $.entwine('ss', function($){
this.hideMembersList(instant);
}
},
// these two functions retained for backwards compatibility
showList: function(instant) {
this.showGroupsList(instant);
this.showMembersList(instant);
},
hideList: function(instant) {
this.hideGroupsList(instant);
this.hideMembersList(instant);
},
Comment on lines -610 to -618
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were only kept in case someone was calling them directly in their own code. See #1531 (review)
Now that we're doing a major release, we can remove these unnecessary functions.

showGroupsList: function (instant) {
const holder = this.closest('.field');
this.showListElement(holder, holder.parent().find('.form-group, .field').filter((_, candidate) => this.checkIfHoldsField(candidate, 'Groups')), instant);
Expand Down
8 changes: 0 additions & 8 deletions code/Forms/UsedOnTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,7 @@ public function usage(HTTPRequest $request)
// Exclude classes from being queried and showing in the results via an extension hook
$excludedClasses = [];
$this->extend('updateUsageExcludedClasses', $excludedClasses);

$usage = $record->findAllRelatedData($excludedClasses);

// Legacy extension hook kept for backwards compatibility
// Use 'updateUsageExcludedClasses' extension hook instead which prevents database from being queried
//
// Example: protected function updateUsage(ArrayList &$usage, DataObject &$record)
// $dataObjects = $usage->exclude('ClassName', MyDataObject::class);
$this->extend('updateUsage', $usage, $record);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used in any core or supported modules

}

$usageData = [];
Expand Down
25 changes: 0 additions & 25 deletions thirdparty/jquery-entwine/jquery.entwine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2295,28 +2295,3 @@ Sizzle is good for finding elements for a selector, but not so good for telling
});

})(jQuery);


/* src/jquery.entwine.legacy.js */

(function($) {

// Adds back concrete methods for backwards compatibility
$.concrete = $.entwine;
$.fn.concrete = $.fn.entwine;
$.fn.concreteData = $.fn.entwineData;

// Use addHandler to hack in the namespace.$.concrete equivilent to the namespace.$.entwine namespace-injection
$.entwine.Namespace.addHandler({
order: 100,
on: function(selector, k, v) { return false; },

namespaceMethodOverrides: function(namespace){
namespace.$.concrete = namespace.$.entwine;
namespace.injectee.concrete = namespace.injectee.entwine;
namespace.injectee.concreteData = namespace.injectee.entwineData;
return {};
}
});

})(jQuery);
Comment on lines -2300 to -2322
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concrete was a very very very very very old way of invoking entwine. There's virtually 0 chance anyone is using it.

Loading