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 #650

Merged
merged 11 commits into from
Jun 17, 2024

Conversation

Dresse
Copy link
Contributor

@Dresse Dresse commented May 31, 2024

Link to issue

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

Description

This PR adds the Cookie placeholder element to the design system.
Link to the design in Figma: https://www.figma.com/design/Zx9GrkFA3l4ISvyZD2q0Qi/Designsystem?node-id=16042-22933&t=kwXRJW0pZzoQmJHm-1

It is added as part of the VideoEmbed story.

Screenshot of the result

Image showing the result in dpl-desgin-system storybook:

Desktop:
Screenshot 2024-06-06 at 16 19 24

Mobile:
Screenshot 2024-06-06 at 16 18 53

Video recording showing the end result:
https://github.com/danskernesdigitalebibliotek/dpl-design-system/assets/6142323/74dd4689-ad6f-4684-80e1-05eed9fb2f8c

Added CookiePlaceholder to the design system.
@Dresse Dresse force-pushed the DDFLSBP-651-implement-cookie-blocking-placeholder branch from 84cb9c4 to 4461004 Compare May 31, 2024 11:57
@Dresse Dresse force-pushed the DDFLSBP-651-implement-cookie-blocking-placeholder branch from 4461004 to a7b676d Compare May 31, 2024 12:01
@Adamik10 Adamik10 self-requested a review June 4, 2024 20:21
Copy link
Contributor

@Adamik10 Adamik10 left a comment

Choose a reason for hiding this comment

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

I have one comment I'd like you to look at :)) Otherwise great job!

Also for future reference, I would like to see a mobile view screenshot in the PR overview.

✨🎖️

@Dresse
Copy link
Contributor Author

Dresse commented Jun 4, 2024

I have one comment I'd like you to look at :)) Otherwise great job!

Also for future reference, I would like to see a mobile view screenshot in the PR overview.

✨🎖️

Thanks for all the feedback and comments Adam 👍

I have updated the PR with new screenshots (both desktop and mobile).

I have also changed the padding: 20px and margin-bottom: 20px with a suitable variable from variables-spacing.scss.

I have also done some other changes to the overall markup, as I needed to adjust it to work with cookieinformation logic. Although this means that the cookiepopup is set to 'display: none' as default. Because of this, it is now also hidden in StoryBook/Chromatic.

So my question is; how should I handle this? Should I do some kind of logic to the StoryBook, that changes the 'display: none' value to 'display: block'? Do you have any suggestions?

Dresse added 2 commits June 5, 2024 06:23
… 'consent-placeholder' class as it is used by cookieinformation script to show/hide the placeholder. Also updated the styling to make sure the placeholder will always be centered.
@Dresse Dresse assigned Adamik10 and unassigned Dresse Jun 5, 2024
@Dresse Dresse requested a review from Adamik10 June 5, 2024 11:56
…and 'reject', to show how it looks like when cookies are disabled and how it looks when they are enabled. I also added a control for it. Furthermore I added a new class used for hiding the cookie placeholder per default
@spaceo spaceo self-requested a review June 6, 2024 18:35
Copy link
Contributor

@spaceo spaceo left a comment

Choose a reason for hiding this comment

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

I honour the review already given. :)
But I have one comment I think is, somewhat, important:
I think the cookie placeholder story and the video embed story should me merged. Either could the cookie placeholder story be a sub story of the video embed or you could have a control on the videoembed story that toggels the placeholder.
There is alreday a whole lot of stories in the storybook and I think we can try to "minmize clutter" by bundling stories that are related.

@spaceo
Copy link
Contributor

spaceo commented Jun 6, 2024

Btw there is a whole lot of chromatic tests that need to be approved. I think at least some of them are related. One troubeling one is one that seems like the contrast changes on the input fields that Claus did has been reverted?:
https://www.chromatic.com/test?appId=616ffdab9acbf5003ad5fd2b&id=6661c5837b4c653d0766aa3c

@spaceo spaceo removed their assignment Jun 7, 2024
@Dresse
Copy link
Contributor Author

Dresse commented Jun 7, 2024

I honour the review already given. :) But I have one comment I think is, somewhat, important: I think the cookie placeholder story and the video embed story should me merged. Either could the cookie placeholder story be a sub story of the video embed or you could have a control on the videoembed story that toggels the placeholder. There is alreday a whole lot of stories in the storybook and I think we can try to "minmize clutter" by bundling stories that are related.

I have now added the cookie placeholder story to the videoEmbed story. It has a control to toggle between the video and the placeholder. You can also click on the button on the placeholder to "accept" cookies and then see the video.

@Dresse
Copy link
Contributor Author

Dresse commented Jun 8, 2024

Btw there is a whole lot of chromatic tests that need to be approved. I think at least some of them are related. One troubeling one is one that seems like the contrast changes on the input fields that Claus did has been reverted?: https://www.chromatic.com/test?appId=616ffdab9acbf5003ad5fd2b&id=6661c5837b4c653d0766aa3c

It seems to be because I didn't have the newest version of develop merged into my branch. After merging develop into my branch, the only chromatic tests that needs to be approved are the new one introduces by my PR.

@Dresse Dresse requested a review from spaceo June 8, 2024 12:48
Copy link
Contributor

@Adamik10 Adamik10 left a comment

Choose a reason for hiding this comment

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

Wonderful 💯

To answer your question about visibility in storybook - yes, I would probably give it an argument in storybook that overwrites some styling in order to show the component. But then we would also need to make sure people don't take it into dpl-react and add it there for correct rendering in the final product :)

@Dresse
Copy link
Contributor Author

Dresse commented Jun 14, 2024

Wonderful 💯

To answer your question about visibility in storybook - yes, I would probably give it an argument in storybook that overwrites some styling in order to show the component. But then we would also need to make sure people don't take it into dpl-react and add it there for correct rendering in the final product :)

This is not relevant anymore as I have added it as part of the VideoEmbed story. I added functionality to hide/show the placeholder when clicking on the button and also as part of a config.

@Dresse Dresse removed the request for review from spaceo June 17, 2024 23:52
@Dresse Dresse merged commit 52b8f3b into develop Jun 17, 2024
8 checks passed
@Dresse Dresse deleted the DDFLSBP-651-implement-cookie-blocking-placeholder branch June 17, 2024 23:55
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