Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDFLSBP-651 - Implement cookie blocking placeholder #1220

Conversation

Dresse
Copy link
Contributor

@Dresse Dresse commented Jun 5, 2024

Link to issue

https://reload.atlassian.net/browse/DDFLSBP-651

Description

This PR introduces the following:

  • A new custom module (dpl_cookies), used for handling all custom cookie functionality, that is not handled in either the cookieinformation module or cookieinformation dashboard. For now this includes a preprocess hook that adds 3 new data attributes to all video media elements. These attributes are need by the cookieinformation script when handling user cookie consent.

  • A new template specifically targeting field--media--video. In this template we have added our custom cookie placeholder, which gets shown to user who have not yet consented to using cookies, in place of the original content.

Screenshot of the result

Screenrecording showing the result:

Screen.Recording.2024-06-06.at.14.13.01.mov

Additional comments or questions

This PR has a sister PR in the dpl-design-system: danskernesdigitalebibliotek/dpl-design-system#650

Dresse added 4 commits June 5, 2024 06:25
…custom cookie functionality, that are not configurable in either the cookieinformation module or cookieinformation dashboard. For now I have added a single preprocessing function, that modifies all video media iFrames, adding new attributes that cookieinformation is used for handling cookies.
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 05:12 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 05:15 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 05:24 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 05:25 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 05:29 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 05:52 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 06:39 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 06:43 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 07:04 Destroyed
@clausbruun clausbruun self-requested a review June 5, 2024 08:48
Copy link
Contributor

@clausbruun clausbruun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvis jeg afviser alle cookies ser jeg dette på en side hvor der er indsat et Vimeo klip:

Skærmbillede 2024-06-05 kl  11 42 19
Det er muligvis mit lokalmiljø som driller med stylingen, men under alle omstændigheder kunne det måske være en forbedring at lave <div class="video-embed__wrapper"> elementet lidt lavere, når cookie-placeholder vises, således at der ikke er så meget "tom" plads?

@clausbruun clausbruun self-requested a review June 5, 2024 09:51
Copy link
Contributor

@clausbruun clausbruun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature, just a few minor suggestions...

@github-actions github-actions bot temporarily deployed to pr-1220 June 5, 2024 11:51 Destroyed
@Dresse
Copy link
Contributor Author

Dresse commented Jun 5, 2024

Hvis jeg afviser alle cookies ser jeg dette på en side hvor der er indsat et Vimeo klip:

Skærmbillede 2024-06-05 kl 11 42 19 Det er muligvis mit lokalmiljø som driller med stylingen, men under alle omstændigheder kunne det måske være en forbedring at lave <div class="video-embed__wrapper"> elementet lidt lavere, når cookie-placeholder vises, således at der ikke er så meget "tom" plads?

Good suggestion. I have already used some time on this PR, so I think I will skip this for now. Maybe this is also something that we need to clear up with the client beforehand. 😄

@Dresse Dresse requested a review from clausbruun June 6, 2024 07:25
@github-actions github-actions bot temporarily deployed to pr-1220 June 6, 2024 12:09 Destroyed
@clausbruun clausbruun removed their assignment Jun 6, 2024
Copy link
Contributor

@clausbruun clausbruun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@github-actions github-actions bot temporarily deployed to pr-1220 June 6, 2024 13:44 Destroyed
@github-actions github-actions bot temporarily deployed to pr-1220 June 12, 2024 09:47 Destroyed
@Dresse Dresse requested a review from clausbruun June 12, 2024 10:05
@Dresse Dresse merged commit 2a25172 into feature/cookie-implementation Jun 17, 2024
18 checks passed
@Dresse Dresse deleted the DDFLSBP-651-implement-cookie-blocking-placeholder branch June 17, 2024 23:49
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.

4 participants