Allowing site builders to expose user click-able UI elements that trigger rules is commonly required functionality. Rules Link is one solution that has momentum, so moving forward, it could become the right solution for this.
As a point of reference, Small Core, Big Core, Indie Core, Maintainable Core, Core Framework, Platform Initiative, etc have already provided significant insight in how to look at issues like this. In light of that, I'm confident we can evaluate this proposed change with relative ease and maintain or improve the quality of the Rules ecosystem as it continues to mature. The takeaway message I get from those discussions is that a) we all want good, clean, consistent APIs, and b) that maintainers want to do what's best for the code they are responsible for.
The question at hand is, do we need/want this functionality? And, if so, how would we go about including it? Based on #1273344: Establish heuristics for core feature evaluation, I propose this evaluation:
- Is the API stable and mature enough?
- Is it a building block that Rules builders and developers need in general?
- Does its inclusion significantly improve UX and DX, without significantly diminishing the experience of the others?
- Is there a major reason why it would be better to remain an separate project -- and/or a non-recommended solution?
- Would it add additional or optional/implied dependencies that aren't within the current pattern of development?
My evaluation:
- I have found it to be very stable, and few users are waiting for bugs to be confirmed or fixed. In terms of maturity, it's still in beta, and there are still a number of desirable feature requests that may be worth implementing first.
- There have been a number of issues where users have asked for this type of functionality, #642194: Trigger an event on a form being posted via AJAX is one; and there have been many other modules that have been used for this: Flag, Button Field, Rules Link Event.
- Continuing from 2, this shows that it would be beneficial to establish a canonical method for accomplishing this functionality. Rules Link usage is steadily picking up, but the numbers show a slow adoption compared to the demand.
- If we determine that there is good cause to include it, then, as of now, I don't see any reason why it should remain a separate project.
- Continuing from 4, this brings up a big question though, who will be the maintainer(s)? It's an inconvenience do this, but there is a major long term benefit available if Rules adopts a standard solution, as described above. Rules may need another maintainer with the experience of maintaining modules with 100k+ users to help commit patches. Is Dave Reid busy? ;)
- The Rules Link optional dependency on Views matches Rules Scheduler's optional Views integration.
Overall, I believe this change would be a positive one for Rules and that Rules users will appreciate more codified building standards and the opportunity to rally around the most desirable functionalities.
Comments
Comment #1
klausiI'm not so sure about this. I think Rules Link is a nice, self-contained module. I don't see the benefit to include it into Rules core from a developer's perspective. It only adds code weight to sites that don't need it (all the commerce installs and such).
However, it would be of course a great push for Rules link and it would be more visible. Counter proposal: how about we create a section on the project page with premium Rules modules that are very useful and extend Rules? The Rules maintainers recommend ... ?
Comment #2
mitchell commented>However, it would be of course a great push for Rules link and it would be more visible. Counter proposal: how about we create a section on the project page with premium Rules modules that are very useful and extend Rules?
Exactly! And the numbers don't lie. People simply don't know its value yet.
I don't think recommending it goes far enough. This made sense earlier in Rules' history when Flag was the best solution (to a *common need) and a completely separate API. But Rules Link changes the landscape drastically.
At this point, Commerce and modules like it would be better off leveraging it (which I'm pretty sure they would) and it wouldn't inconvenience them if it was off by default. It improves the core features for what developers want from Rules almost as much as reactions do, and it suits the needs of the 80% site builders.
>I don't see the benefit to include it into Rules core from a developer's perspective.
This is the real issue (and a separate one) that is harder to solve, just as it is in core where the answer was to include only the right apis and have multiple maintainers for them. IMHO, it saves the code maintainers effort in the short run, but it increases the docs/issue maintainers effort significantly because there are several people asking how to do this (in this case Rules, Rules Link, and Rules Forms), and tying in remote dependencies to accomplish basic tasks is very difficult from a docs perspective.
Comment #3
sonicthoughts commentedHoping this gets some attention :)
Comment #4
giorgio79 commentedMaybe D8
Comment #5
dasjoThis isn't planned to happen within Rules core within the near future, but feel free to work on patches / porting the Rules link module and we can see from there.
Comment #6
tr commentedFYI,
Two years since this discussion, and two years after D8 was released, Rules Link doesn't even have the start of a D8 port. So I would say that decides the issue...
Comment #7
giorgio79 commentedWonder why the lack of takeup. I now use it extensively on all Drupal sites even for basic node actions eg (delete, approve etc buttons on nodes that are missing from Drupal core). PErhaps, Rules Links could even have some presupplied links for basic node operations and allow other modules to provide Ruels Links (eg Workflow, Migrate etc)
Comment #8
tr commentedFeel free to reopen this if Rules Link ever gets ported to D8, or if there is another contributed module for D8 that provides functionality similar to Rules Link that you think should be put into Rules.
Or, if you can provide a patch to D8 Rules for this functionality, then we can consider it.