- Issue created by @glottus
- πΊπΈUnited States glottus
This patch adds the described functionality but needs code review and testing.
- π©πͺGermany jurgenhaas Gottmadingen
Please turn this into an issue fork with an MR, patches are no longer used. That's not only because tests will be run on MRs, which is always the first step to get all tests green before anyone should review new code.
- πΊπΈUnited States glottus
Done - thanks for the advice and patience. First time getting through the MR process on drupalcode.
- π©πͺGermany jurgenhaas Gottmadingen
@glottus thanks for going through this, I hope it is a somewhat fun experience. It looks great so far.
Just a couple of issues with the tests. Would be great if you could fix them and get the tests to green again. After that, you could set the issue status to "Needs review", then we can have a look and merge this asap.
- πΊπΈUnited States glottus
Yikes. Sorry for all the cruft above. Fumbling my way through!
- π©πͺGermany jurgenhaas Gottmadingen
This is great work, thank you so much @glottus
Yikes. Sorry for all the cruft above. Fumbling my way through!
No worries at all, you're doing great.
I've left a few remarks in the MR. Nothing big, just some clean-up and wording items. Some of it are just questions, please feel free to decline suggestions in there.
- πΊπΈUnited States glottus
Thanks for your remarks - I'm hoping to get back to this within the week, but having trouble getting set up or understanding how/where I can see your comments in context. Keep getting "make sure you have the correct access rights and the repository exists" errors, despite generating and adding the necessary keys and being able to edit through the website. Will need some more time to fix that before I can work more efficiently, but to answer a couple questions:
1) I had it in the Content submodule because I wasn't having luck (yet) comparing anything other than simple arrays, which I expected (and my use case was specifically) from simple text (list) fields in entities, but as it grows, you're right, I could see it being useful elsewhere.
2) I don't have strong feelings about "first/second" vs "primary/secondary", and could very easily be more encumbered by being a native English speaker! Your perspective is appreciated, and I agree, "first" and "second" could be more easily understood by all. I was trying to imply a little more than just numbering, but rather that the "primary" array would be the one on the left side of the array_function - the one to be compared to others - if you want to know what's in one array but not another, it's like a "left join" where some importance is communicated by the first one being "more important", so I called that "primary".
3) Yes, this was all copied/pasted from a different iteration in which some of the language was project-specific. I'll make some adjustments when I can see your comments in context a little better. - π©πͺGermany jurgenhaas Gottmadingen
how/where I can see your comments in context
When you're logged in, both on d.o and on GitLab, you can click on the MR above and you'll see all the comments within the code diff. Direct link to that is https://git.drupalcode.org/project/eca/-/merge_requests/457
As for 1), you'll find more list related actions in the eca_base submodule as well, that's why I thought it should belong there.
As for 2), this is not a requirement, I leave that totally up to your decision.
- π©πͺGermany jurgenhaas Gottmadingen
Is this ready for another review? Status still says "Needs work".
- π©πͺGermany jurgenhaas Gottmadingen
This looks great, I've only cleaned up the code in 2 areas:
- Removed named arguments as we're not using them elsewhere either.
- Merged the 2 traits into the action plugin class, as those traits are not re-used elsewhere and are so small, that having them in separate files feels more overhead than benefit.
Thanks a lot @glottus for this contribution and congrats, your first MR went really well.
-
jurgenhaas β
committed 94d8364e on 2.1.x authored by
glottus β
Issue #3490040 by glottus, jurgenhaas: New Action to compare lists
-
jurgenhaas β
committed 94d8364e on 2.1.x authored by
glottus β
- Status changed to Fixed
3 months ago 8:24am 28 January 2025 Automatically closed - issue fixed for 2 weeks with no activity.