Open AngryDragonite opened 3 months ago
All requested changes committed.
Thank you @AngryDragonite - however there are now more files in js/dist
. Please remove the dist
folder from your commits to resolve the conflicts
@imorland Sorry for confusion, I followed steps that you advised, but somehow it got worse, possibly because I messed up something. I'm trying to fix it now
@AngryDragonite thanks for your efforts, unfortunately you're now deleting the dist
folder contents, rather than simply omitting any changes to them. This should help you ;)
@imorland There are changes to the dist folder on the master branch since this PR. Perhaps this is causing the issues? https://github.com/FriendsOfFlarum/terms/commits/master/js/dist?since=2024-04-28&until=2024-06-16
I tried to help @AngryDragonite, but still the files are in this Pull Request.
ping @imorland @DavideIadeluca
Resolves #33
Changes proposed in this pull request:
First of all, I added migrations that create columns:
optional
(boolean) andadditional_info
(JSON) insidefof_terms_policies
table. Tablefof-terms-policy-user
has been enriched withis_accepted
(boolean) column.Modifications inside
extend.php
:RegisterMiddleware.php
.Modifications inside
Policy.php
,UserPolicyData.php
,PolicyStoreController.php
,PolicyRepository.php
,RegisterPolicyValidator.php
:Modifications inside
RegisterMiddleware.php
:New backend files:
PolicyDeclineController.php
- as the name suggests. Basically, it is "1:1 copy" ofPolicyAcceptController.php
, however with opposite behaviourNow lets take a look at what changed in the frontend.
Modifications inside
Policy.js
:optional
andadditional_info
fields to the Policy model.Modifications inside
PolicyEdit.js
:initNewField
method withPolicy
model changes,deletePolicy
method - during developing I encountered a bug - when deleting aPolicy
, its field is, of course deleted, but alsosavePolicy
method is being called. It was happening possibly because when clicking Delete policy button,onsubmit
method is being called.Modifications inside
AcceptPoliciesModal.js
:Modifications inside `forum/index.js':
addManagePoliciesOption
component.Modifications inside
admin/components/index.js
:ExtensionData
component, so developers working on integrating fof/terms with other extensions could access this componentNew frontend files:
ExtensionData.js
- a component that allows developers to integrate fof/terms with other extensions by saving their data intofof-terms-policies
table. Recipe on how to use it is descriped inREADME.md
in For developers section.addManagePoliciesOption.js
- a component that allows users to opt in/out of consents in their profile settings.Other changes:
admin.less
& newforum.less
- added some styling for components,en.yml
- added translations.README.md
- added section For developers, explaining step-by-step how to useExtensionData
component, and therefore integratefof/terms
with other extensions.Reviewers should focus on:
I would definitely want to know, if my instructions on how to use
ExtensionData
inREADME.md
are specific, exact and free of ambiguities. Every feedback on what in my code can be fixed, rewritten so it is easier to read, or is simply better is greatly welcomed :)Screenshot
Confirmed
composer test
).Required changes: