-
Notifications
You must be signed in to change notification settings - Fork 6
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
DDFLSBP-651 - Implement cookie blocking placeholder #650
Conversation
Added CookiePlaceholder to the design system.
84cb9c4
to
4461004
Compare
4461004
to
a7b676d
Compare
There was a problem hiding this 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.
✨🎖️
src/stories/Library/cookie-placeholder/CookiePLaceholder.stories.tsx
Outdated
Show resolved
Hide resolved
…y existing spacing-variables
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? |
… '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.
…ers for admin users
… folded cornor like in the design
…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
There was a problem hiding this 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.
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?: |
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. |
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. |
There was a problem hiding this 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 :)
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. |
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:
Mobile:
Video recording showing the end result:
https://github.com/danskernesdigitalebibliotek/dpl-design-system/assets/6142323/74dd4689-ad6f-4684-80e1-05eed9fb2f8c