-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Fix Element handling from within Categories tree #16489
Conversation
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.
Works nicely
@smg6511 would it make sense for you to implement same approach for 2.x? |
It would, I just didn't want to step on any toes, since @halftrainedharry already put up a different solution for 2.x. |
### What does it do? Adds a new tree method to properly extract Element data from the working tree Node. There are three patterns for a Node's id, but only one was being accounted for in the code. Additionally, cleans up code formatting in the affected methods. ### Why is it needed? Within the Categories tree, these actions are currently inoperable: - Element removal - Plugin activation/deactivation ### How to test 1. Create a handful of Elements (at least one of each type), both within a Category and within the root (no Category) 2. Verify the ability to remove each Element (from both the Categories tree and from within the individual Element trees) 3. Verify the ability to activate/deactivate Plugins (from both the Categories tree and from within the individual Element trees) ### Related issue(s)/PR(s) Resolves #16487 for MODX 2.x Port of PR #16489 --------- Co-authored-by: Jason Coward <jason@opengeek.com>
Fix contextual menu action functionality within Categories tree
Refactor new extraction method to account for Element creation in the root of its tree
3a21a32
to
481571f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.x #16489 +/- ##
=========================================
Coverage 21.57% 21.57%
- Complexity 10568 10573 +5
=========================================
Files 561 561
Lines 31940 31966 +26
=========================================
+ Hits 6892 6898 +6
- Misses 25048 25068 +20 ☔ View full report in Codecov by Sentry. |
### What does it do? Adds a new tree method to properly extract Element data from the working tree Node. There are three patterns for a Node's id, but only one was being accounted for in the code. Additionally, cleans up code formatting in the affected methods. ### Why is it needed? Within the Categories tree, these actions are currently inoperable: - Element removal - Plugin activation/deactivation ### How to test 1. Create a handful of Elements (at least one of each type), both within a Category and within the root (no Category) 2. Verify the ability to remove each Element (from both the Categories tree and from within the individual Element trees) 3. Verify the ability to activate/deactivate Plugins (from both the Categories tree and from within the individual Element trees) ### Related issue(s)/PR(s) Resolves #16487 for MODX 3.0.x Related to 2.x solution #16488 Port of 3.x solution #16489 --------- Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
What does it do?
Adds a new tree method to properly extract Element data from the working tree Node. There are three patterns for a Node's id, but only one was being accounted for in the code. Additionally, cleans up code formatting in the affected methods.
Why is it needed?
Within the Categories tree, these actions are currently inoperable:
How to test
Related issue(s)/PR(s)
Resolves #16487 for MODX 3.x
Related to 2.x solution #16488