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

Ngstack 833 cookie consent cookie policy improvements new #210

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

mlukac
Copy link
Member

@mlukac mlukac commented Oct 30, 2024

No description provided.

@iherak iherak requested review from Ljudevit and emodric December 3, 2024 12:36
.ng-cc-cookie-policy-text {
position: absolute;
inset: 0;
z-index: 10000000;
Copy link
Member

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/

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it was not enough, unfortunately toggle buttons are leaking on the front of page due to this fix
image
Not ideal of course. Please suggest any solution if you have one.

z-index: 10000000;
transition: transform .3s ease;
transform: translateX(100%);
background: #fff;
Copy link
Member

Choose a reason for hiding this comment

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

please use $white

Copy link
Member Author

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 #}
Copy link
Member

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.

Copy link
Member Author

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 {
Copy link
Member

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

Copy link
Member Author

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:
Copy link
Member

@emodric emodric Dec 3, 2024

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.

Copy link
Member Author

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?

Copy link
Member

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.

@@ -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"
Copy link
Member

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"

Copy link
Member Author

Choose a reason for hiding this comment

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

Added translation.

@@ -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',
Copy link
Member

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

Copy link
Member

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?

Copy link
Member Author

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.

@mlukac mlukac force-pushed the NGSTACK-833-cookie-consent-cookie-policy-improvements-new branch from a705763 to 2348b0a Compare January 24, 2025 18:59
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