-
Notifications
You must be signed in to change notification settings - Fork 10
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
Ngstack 833 cookie consent cookie policy improvements new #210
base: master
Are you sure you want to change the base?
Ngstack 833 cookie consent cookie policy improvements new #210
Conversation
.ng-cc-cookie-policy-text { | ||
position: absolute; | ||
inset: 0; | ||
z-index: 10000000; |
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.
100000 was not enough? :D
please add a proper value based on the bootstrap z-index states:
https://getbootstrap.com/docs/5.2/layout/z-index/
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.
assets/sass/_cookie_control.scss
Outdated
z-index: 10000000; | ||
transition: transform .3s ease; | ||
transform: translateX(100%); | ||
background: #fff; |
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.
please use $white
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.
Added sass variable, please notice that this whole file has few other hex defined colors in it.
<div class="ng-cc-modal"> | ||
{% endif %} | ||
|
||
{# cookie policy addition #} |
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.
No need for these comments.
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.
Removed comments.
@@ -127,6 +127,37 @@ | |||
transform: translate(0, -50%); | |||
} | |||
} | |||
&.btn-icon-chevron-left { |
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 understand what we have here but I would suggest separating concerns regarding buttons with icons in general and this particular example:
&[class*="btn-icon-"] {
// general rules for any button that has icon in it, like gap, &after rules, aligning etc
}
&.btn-icon-chevron-left {
&:after {
@extend %icon-chevron-left; // only the particular icon rendering
}
}
that way we can easily add new icons in buttons and coloring/styles are not involved only with class btn-icon-chevron-left
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.
Changed like this and added few more tweaks to support button combinations.
@@ -0,0 +1,3 @@ | |||
ngsite_view_payload: |
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.
Can you explain a bit why this route is used for?
In any case, this should not be located in media-site, but in netgen/site-bundle.
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.
This was used to activate payload I guess. Was not working without it. Please suggest me how to do it? The same file and line of code, just to do it inside netgen/site-bundle?
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.
If this is used exclusively to display the cookie policy, then the controller and route should reflect this. You don't need to pass the content ID around when the controller can just load the cookie policy text by itself and output it.
Besides, having this generic controller take ANY content ID and just display the content can be a security issue.
translations/messages.de.yaml
Outdated
@@ -7,6 +7,7 @@ ngsite.layout.powered_by: "Unterstützt durch" | |||
ngsite.layout.cookie_settings: "Cookie Einstellungen" | |||
ngsite.layout.cookie_settings.accepted: "Akzeptiert" | |||
ngsite.layout.cookie_settings.not_accepted: "Nicht akzeptiert" | |||
ngsite.layout.cookie_settings.go_back: "Go back" |
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.
Please add german label "Zurück"
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.
Added translation.
assets/js/components-noncritical.js
Outdated
@@ -38,6 +39,11 @@ const componentConfiguration = [ | |||
optionalListToggle: '.optional-list-toggle', | |||
rotateArrowClass: 'rotate-arrow', | |||
shownClass: 'shown', | |||
cookieModal: '.ng-cc-modal', | |||
cookiePolicyShow: '.ng-cc-js-link-cookie-policy a', |
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.
Is it possible to handle this to put the .ng-cc-js-link-cookie-policy class on link itself and not on wrapper and use the link as this value?
cookiePolicyShow: '.ng-cc-js-link-cookie-policy', // where html is text
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.
Also, a small nitpicker: can this key not be cookiePolicyShow but cookiePolicyShowTrigger?
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.
Not sure is this posible at least in easy way because link iz inside content text. Not sure is it worth doing some magic stuff in my opinion.
Changed the name of cookiePolicyShow variable.
a705763
to
2348b0a
Compare
No description provided.