8000 Improve consent dialog by tijsverkoyen · Pull Request #3372 · forkcms/forkcms · GitHub
[go: up one dir, main page]

Skip to content

Improve consent dialog#3372

Merged
tijsverkoyen merged 4 commits intomasterfrom
improve-consent-dialog
Apr 27, 2021
Merged

Improve consent dialog#3372
tijsverkoyen merged 4 commits intomasterfrom
improve-consent-dialog

Conversation

@tijsverkoyen
Copy link
Member

Type

  • Enhancement
  • Feature

Pull request description

Trigger events

A JS event is triggered in the document when the Consent dialog is submitted.

  • privacyConsentChanged: is always triggered when the dialog is submitted.
  • privacyConsentLevelXXXAgreed: is triggered when consent is given for that level.
  • privacyConsentLevelXXXDisagreed: is triggered when consent is not given for that level.

XXX is replaced by the ucfirst version of the level.

Better rendering of the dialog.

Don't render HTML if the dialog is disabled through the settings. But render the HTML if it is enabled so you can open the dialog with JS.

Remark: If you include your own version of the HTML of the dialog you will need to implement the changes in your own theme.

If we want the dialog to be opened with example we need it to be present in the HTML.
!Important: this is potentially a breaking change.
A JS event is triggered in the document when the Consent dialog is submitted.

* `privacyConsentChanged`: is always triggered when the dialog is submitted.
* `privacyConsentLevelXXXAgreed`: is triggered when consent is given for that level.
* `privacyConsentLevelXXXDisagreed`: is triggered when consent is not given for that level.

`XXX` is replaced by the ucfirst version of the level.
@tijsverkoyen tijsverkoyen added this to the 5.10.0 milestone Apr 19, 2021
@tijsverkoyen tijsverkoyen requested a review from a team as a code owner April 19, 2021 15:56
@codecov
Copy link
codecov bot commented Apr 19, 2021

Codecov Report

Merging #3372 (66940fa) into master (521d0d7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3372   +/-   ##
=========================================
  Coverage     27.74%   27.75%           
- Complexity     8028     8029    +1     
=========================================
  Files           568      568           
  Lines         30624    30627    +3     
=========================================
+ Hits           8497     8500    +3     
  Misses        22127    22127           
Flag Coverage Δ Complexity Δ
functional 23.69% <100.00%> (+<0.01%) 8029.00 <1.00> (+1.00)
installer 3.85% <0.00%> (-0.01%) 8029.00 <1.00> (+1.00) ⬇️
unit 7.62% <0.00%> (-0.01%) 8029.00 <1.00> (+1.00) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
src/ForkCMS/Privacy/ConsentDialog.php 62.22% <100.00%> (+1.75%) 14.00 <1.00> (+1.00)
src/Frontend/Core/Engine/Page.php 65.19% <100.00%> (+0.15%) 71.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 521d0d7...66940fa. Read the comment docs.

@tijsverkoyen tijsverkoyen merged commit 5656da0 into master Apr 27, 2021
@tijsverkoyen tijsverkoyen deleted the improve-consent-dialog branch April 27, 2021 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0