It would be very helpful to have the option to set yes / no comments required. Often a simple yes / no simply has ne meaning at all so I think many users could need that.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | separate-required-comment-option-2926429-12385384-1.patch | 18.04 KB | guilherme-lima-almeida |
| #12 | separate-required-comment-option-2926429-12385384.patch | 17.17 KB | guilherme-lima-almeida |
Comments
Comment #2
heymo commentedGreat idea, thanks for the suggestion. I'll implement over the next few days.
Comment #3
anybodyWhao cool!! :)
Comment #6
heymo commentedCreated a new release (7.x-2.0-rc1) that includes this request.
You can change the settings to make comments required in the configuration page at
/admin/config/content/helpfulness
Hope this is what you had in mind...
Comment #7
anybodyThank you very very much!! I'l review this too in the next days.
Comment #8
anybodyThank you. Thats good, but I thought to separate it into two options: Require comment for positive and for negative feedback:
Reason: A "Yes" feedback needs no explanation. Good is good. But negative feedback should require feedback to learn from it. That would be a great benefit to the module.
Comment #9
gueguerreiroThe change in #8 makes sense. I think we can plan to include it once we have a stable release for 8.x and 8.8|9 versions of the module.
Comment #10
gueguerreiroComment #11
gueguerreiroComment #12
guilherme-lima-almeidaHi there,
I made the changes that Anybody suggest in comment #8.
So now we can choose if we want a comment in Yes or No answer and if it is required to answer in the comment.
Comment #13
gueguerreiroThank you @guilherme-lima-almeida, that's excellent. I tested it out and it's working great.
One thing that is missing, is an update hook for this change. I see you updated the configuration install, which is correct, but that will only take effect for new users that install the module after the new release. For current users, we need to update their existing configuration on an update. This guide should be useful: https://www.drupal.org/docs/drupal-apis/update-api/updating-configuratio...
The general idea will be that:
Also, some nitpicks:
This should be removed. It's included automatically by the Drupal release later on.
Right here, it seems we have ifs with the same exact conditions.
I think we can safely remove the first if, since it's not adding anything except an unnecessary deep level.
So, instead of
We can just have
Comment #14
guilherme-lima-almeidaHi there gueguerreiro,
I made the changes you pointed out in #13.
If there anything else that needs improvement, let me know.
Comment #15
guilherme-lima-almeidaComment #17
gueguerreiroThank you @guilherme-lima-almeida. There were some small standards fixes, but I was able to apply your patch and commited it to the 8.x-1.x branch 🎊. I'll have to make a follow-up commit for the 2.x-dev version, as your patch doesn't apply to that one. I'll create a new release once it's present on both branches.
Comment #19
gueguerreiroI gave you some extra commit credit because it's your first contribution to the module, and it was a big one. Thanks for helping!
Comment #20
gueguerreiroCommitted db818a7 and pushed to 2.x. Thanks!
Creating a new release to include this feature now.