website
website copied to clipboard
DonationWidget: Allow users to leave a comment when donating
I actually proposed this pretty much in the first iteration of the donation widget:
https://github.com/datenanfragen/website/blob/cfba6f9c04feae71b6154e4af2a77b7bac798dab/src/Components/DonationWidget.js#L137
Hey @baltpeter, I have been working on this issue, and here is what I did so far:
If you have any suggestions for improvement, please let me know. Just a quick question, I was not able to find an easy way to add text attributes to the (i18n) JSON files in one command, so I need help with that, or is there no such thing and the process has to be done manually, thanks.
Thanks for the mockup, @OussamaSALAHOUELHADJ. I've thought about this some more and think it would be best if we didn't implement this in the donation form itself, but rather on the /thanks
page that is displayed after the donation. That way, we can also just reuse the existing comments component.
What do you think?
That's better, the problem is the user comments cannot be retrieved directly. Since donations are sent directly to the API of payment providers, it's a good idea to keep a record of all donations on the server.
I can implement this comment on the /thanks
page if you want me to.
and what about this question:
If you have any suggestions for improvement, please let me know. Just a quick question, I was not able to find an easy way to add text attributes to the (i18n) JSON files in one command, so I need help with that, or is there no such thing and the process has to be done manually, thanks.
That's better, the problem is the user comments cannot be retrieved directly. Since donations are sent directly to the API of payment providers, it's a good idea to keep a record of all donations on the server.
I don't really understand what you're saying, I'm afraid. The handling of the donations itself is already implemented and working. And we don't care about mapping a comment to a donation. The comments here are just meant to give people who donate a way to leave a public message saying why they donated.
The comment form should also mention that the comment will be displayed publicly.
and what about this question:
Oh sorry, I missed that.
We don't have any tooling around adding new strings to the translation files. You just have to add them to the JSON files. You only need to add English, that acts as the fallback.