Account created on 26 September 2008, about 16 years ago
  • Senior Developer / CTO at werk21 
#

Merge Requests

More

Recent comments

🇩🇪Germany jan kellermann

Thank you for this issue, @detectivepixel. The hard codig was a hotfix for the latest release of klaro-js.

I added the option to the Klaro! settings form and created a MR.

Please review and feedback.

🇩🇪Germany jan kellermann

We have no frontender at hand in the moment.

I opened a MR which will add klaro-theme-
to every klaro-element.

Here is the Klaro-SCSS with all defined vars you can easyly override:
https://github.com/klaro-org/klaro-js/blob/master/src/scss/vars.scss

And I uploaded our SCSS-file which we use for customizing (renamed to TXT).

🇩🇪Germany jan kellermann

Created Merge Request.

Please review and feedback.

🇩🇪Germany jan kellermann

Transfered MR from #3494722.

Please review.

🇩🇪Germany jan kellermann

jan kellermann made their first commit to this issue’s fork.

🇩🇪Germany jan kellermann

With pleasure! I am always very happy to discuss the topic of data protection.

My statement regarding (1) is not a legally binding statement and data protection authorities or courts may have a different opinion.

In general, it is important that this information is included in the website's privacy policy. To make this transparent, we often include a “Privacy Information” section at the end of our module descriptions and provide information about the processing of personal data, external services and the use of cookies and storage.

🇩🇪Germany jan kellermann

Thank you for feedback and testing.

I merged the code.

🇩🇪Germany jan kellermann

Thank you for this issue. I had opened the referenced issue.

1) In general: The storage of data in the browser is permitted if it is strictly necessary for the provision of a requested service. If opening the chat across page boundaries is part of the service, it can be assumed that writing to the localStorage after the user interaction is permitted. Then you do not need a consensus. I have therefore built the MR so that the localStorage is only used after user interaction and only for as long as it is needed.

2) You can just ask the Klaro consent state: let consent = klaro.getManager().getConsent('deepchat');.

3) We have an issue for Klaro that would resolv your problem because all accesses to the browser are prevented until consent is given: https://www.drupal.org/project/klaro/issues/3487461 Blocking Cookies and Storage Sets (proof of concept) Active (I add ^deepChatState_.*$ to the list in service-yaml).

🇩🇪Germany jan kellermann

@anybody We added now tweo services to eTracker:

If you want to track every visit and block only cookies, please use the
service etracker_cookies. Please make sure that cookies are
deactivated in the eTracker settings. Klaro will activate the cookies after
consent.

If you want block tracking before consent at all, activate the
service etracker.

We created a test-account for eTracker and tested both configs with success.

Please review / feedback. Thank you.

🇩🇪Germany jan kellermann

Thank you very much for proposal, testing and feedback.

I merged the code.

🇩🇪Germany jan kellermann

Issue branch updated, MR testable without merge conflict.

🇩🇪Germany jan kellermann

Issue branch updated, MR testable without merge conflict.

🇩🇪Germany jan kellermann

Issue branch updated, MR testable without merge conflict.

🇩🇪Germany jan kellermann

New version is tagged. Thanks to @jurgenhaas!

🇩🇪Germany jan kellermann

Testing can now be done directly with dev branch without further MRs.

🇩🇪Germany jan kellermann

Thank you for feedback and testing.

I merged the MR.

Please reopen for feedback on config or wording.

🇩🇪Germany jan kellermann

I changed the composer.json. Now we can install the dev version for testing.

But I expect the versions to be dependent on each other in the future, so I would prefer to have some control of the requirement and use ~3.0.0.

Then we could publish the new klaro_js with breaking changes independent from klaro module and use it for testing the dev-version of klaro.

And in case of security updates we have to update klaro module every time, because an update of klaro_js ist not visible in the Drupal update report.
And we have to guarantee backwards compatibility, which doesn't work if the systems automatically update the library but not the module.

So I would prefer ~ requirement

        "drupal/klaro_js": "~3.0.0 || ^3.0.x-dev"
🇩🇪Germany jan kellermann

Yes, I suppose. This is on our list of measures. However, this also delays the rendering of the contextual content dialogs - which probably leads to a worsening of the LCP e.g. for a YouTube video on the start page.

🇩🇪Germany jan kellermann

Thank you all for reporting, proposals, testing an review.

I merged the code.

🇩🇪Germany jan kellermann

In issue #3493540, we ensured that the JavaScript files are only loaded if services are also activated. This minimizes the standard footprint for the moment.

In issue #3491681 we changed the library from klaro-no-css.js to klaro-no-translations-no-css.js and thus reduced it from 208K to 164K.

During the work on #3491681 we also realized that the Klaro library is built with compatibility options for very old browsers. We have reduced these to the Drupal browser defaults and thus reduced the library to 64K. We are in contact with the maintainer and will adopt the new lean library.

In #3493822 we discuss whether the library can be integrated with `defer` or even `async`. However, due to the way the library is used, I am rather pessimistic about finding a solution here.

🇩🇪Germany jan kellermann

No, it cant not combined. The site builder must decide which service is to be used.

I merged the code.

Thank you for review and feedback.

🇩🇪Germany jan kellermann

Yes, the effect of this flag is less than expected:

This service is not activated when “Accept all” is clicked (only relevant if this button is activated in the module settings).

Thank you all for review and feedback. It is a pleasant journey with you to the stable version.

🇩🇪Germany jan kellermann

Yes, for defer is this issue: https://www.drupal.org/project/klaro/issues/3493822 📌 Consider async/defer loading of klaro-no-css.js Active
We had to adapt the JS as you mentioned: https://git.drupalcode.org/project/klaro/-/merge_requests/58.diff

🇩🇪Germany jan kellermann

The ai_deepchat module uses localStorage without consent or requirement. I opened this issue 🐛 Dont set localStorage by default Active . The localStorage will not mitigated by Klaro! so this issue must be resolved.

The ai_image_alt_text module does not use the browser's memory, so no further steps are required.

🇩🇪Germany jan kellermann

> should i open an issue for this module?

We dont need a Klaro! service for this module because it imports serverside so the client has no contact to 3rd party.

> testing instructions

I use for testing the HTML field formatter and copy the code directly. Maybe using text format "full_html" is another option.

🇩🇪Germany jan kellermann

Ah, sorry, you wrote it: "mastodon module"
The this produces own embed code. We need a preprocessor for this. I open a new issue.

🇩🇪Germany jan kellermann

Where is you code from? On Mastodon it gives you

<blockquote class="mastodon-embed" data-embed-url="https://social.bund.de/@Umweltbundesamt/113662513183074352/embed" style="background: #FCF8FF; border-radius: 8px; border: 1px solid #C9C4DA; margin: 0; max-width: 540px; min-width: 270px; overflow: hidden; padding: 0;"> <a href="https://social.bund.de/@Umweltbundesamt/113662513183074352" target="_blank" style="align-items: center; color: #1C1A25; display: flex; flex-direction: column; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Roboto, sans-serif; font-size: 14px; justify-content: center; letter-spacing: 0.25px; line-height: 20px; padding: 24px; text-decoration: none;"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 79 75"><path d="M74.7135 16.6043C73.6199 8.54587 66.5351 2.19527 58.1366 0.964691C56.7196 0.756754 51.351 0 38.9148 0H38.822C26.3824 0 23.7135 0.756754 22.2966 0.964691C14.1319 2.16118 6.67571 7.86752 4.86669 16.0214C3.99657 20.0369 3.90371 24.4888 4.06535 28.5726C4.29578 34.4289 4.34049 40.275 4.877 46.1075C5.24791 49.9817 5.89495 53.8251 6.81328 57.6088C8.53288 64.5968 15.4938 70.4122 22.3138 72.7848C29.6155 75.259 37.468 75.6697 44.9919 73.971C45.8196 73.7801 46.6381 73.5586 47.4475 73.3063C49.2737 72.7302 51.4164 72.086 52.9915 70.9542C53.0131 70.9384 53.0308 70.9178 53.0433 70.8942C53.0558 70.8706 53.0628 70.8445 53.0637 70.8179V65.1661C53.0634 65.1412 53.0574 65.1167 53.0462 65.0944C53.035 65.0721 53.0189 65.0525 52.9992 65.0371C52.9794 65.0218 52.9564 65.011 52.9318 65.0056C52.9073 65.0002 52.8819 65.0003 52.8574 65.0059C48.0369 66.1472 43.0971 66.7193 38.141 66.7103C29.6118 66.7103 27.3178 62.6981 26.6609 61.0278C26.1329 59.5842 25.7976 58.0784 25.6636 56.5486C25.6622 56.5229 25.667 56.4973 25.6775 56.4738C25.688 56.4502 25.7039 56.4295 25.724 56.4132C25.7441 56.397 25.7678 56.3856 25.7931 56.3801C25.8185 56.3746 25.8448 56.3751 25.8699 56.3816C30.6101 57.5151 35.4693 58.0873 40.3455 58.086C41.5183 58.086 42.6876 58.086 43.8604 58.0553C48.7647 57.919 53.9339 57.6701 58.7591 56.7361C58.8794 56.7123 58.9998 56.6918 59.103 56.6611C66.7139 55.2124 73.9569 50.665 74.6929 39.1501C74.7204 38.6967 74.7892 34.4016 74.7892 33.9312C74.7926 32.3325 75.3085 22.5901 74.7135 16.6043ZM62.9996 45.3371H54.9966V25.9069C54.9966 21.8163 53.277 19.7302 49.7793 19.7302C45.9343 19.7302 44.0083 22.1981 44.0083 27.0727V37.7082H36.0534V27.0727C36.0534 22.1981 34.124 19.7302 30.279 19.7302C26.8019 19.7302 25.0651 21.8163 25.0617 25.9069V45.3371H17.0656V25.3172C17.0656 21.2266 18.1191 17.9769 20.2262 15.568C22.3998 13.1648 25.2509 11.9308 28.7898 11.9308C32.8859 11.9308 35.9812 13.492 38.0447 16.6111L40.036 19.9245L42.0308 16.6111C44.0943 13.492 47.1896 11.9308 51.2788 11.9308C54.8143 11.9308 57.6654 13.1648 59.8459 15.568C61.9529 17.9746 63.0065 21.2243 63.0065 25.3172L62.9996 45.3371Z" fill="currentColor"/></svg> <div style="color: #787588; margin-top: 16px;">Post by @Umweltbundesamt@social.bund.de</div> <div style="font-weight: 500;">View on Mastodon</div> </a> </blockquote> <script data-allowed-prefixes="https://social.bund.de/" async src="https://social.bund.de/embed.js"></script>

I dont know "", is this a drupal module for embedding content?

🇩🇪Germany jan kellermann

Added "Some Notes on Cookies"

🇩🇪Germany jan kellermann

Created MR!4.

Please Review and feedback.

🇩🇪Germany jan kellermann

jan kellermann changed the visibility of the branch 3494722-dont-set-localstorage to hidden.

🇩🇪Germany jan kellermann

Services are created.

You need first the MRs of #3491906 and #3484568 to test this merge request.

Please review and feedback.

🇩🇪Germany jan kellermann

I added optional textfield and option contextualConsentOnly for better handling of contextual consents.

For testing you should apply #3491906 before.

🇩🇪Germany jan kellermann

We need this for handling Drupal CMS AI features.

🇩🇪Germany jan kellermann

@smustgrave Thank you! I did not know. I just started the test.

I am not allowed to close MRs or delete branches :)

🇩🇪Germany jan kellermann

jan kellermann changed the visibility of the branch 3493742-11.x-decode-xml-correct-test-only to hidden.

🇩🇪Germany jan kellermann

I added tests in MR!10571. I also added a branch with test only to see it fail in MR!10579.

Please review. Thank you.

🇩🇪Germany jan kellermann

jan kellermann changed the visibility of the branch 11.x to hidden.

🇩🇪Germany jan kellermann

I'm very sorry, but I can't reproduce it. I copied the embed code again and created a new content and activated mastodon-config with this MR.

Did you updated the database? This MR needs an update because the wrapper will be converted from class-names to QuerySelector (`mastodon-embed` to `.mastodon-embed`).

Can you please send your config crom klaro and mastodon-app, tell us which field type you use or if "Process final HTML" is enabled and the frontend-markup from the browser of the embed after loading in website? Thank you.

Thank you for testing and feedback! But I can only try to resolve the problem when I can reproduce it. Thank you for your understanding.

🇩🇪Germany jan kellermann

@smustgrave how can we simulate a xml from the Drupal server? Should we create a dummy contrib module with „&“ in their title for testing?

🇩🇪Germany jan kellermann

I merged this issue.

Thank you all for reporting, working and feedback!

And a special "thank you" to @joachim-namyslo for his job for the german version of Drupal!

🇩🇪Germany jan kellermann

I want to fix the bug not to mitigate the wrong output (btw: I would fix the output here).

The double encoding occurs because the title is loaded directly from the XML (and not from the project array) and is encoded in the XML.

I have created an MR that decodes the title directly when processing the XML (3493742-11.x-decode-xml-correct).

🇩🇪Germany jan kellermann

jan kellermann changed the visibility of the branch 3493742-decode-xml to hidden.

🇩🇪Germany jan kellermann

Opened Merge Request.

Plese use these files for Testing:
https://github.com/werk21/klaro-js/tree/master/dist

Please review.

🇩🇪Germany jan kellermann

Klaro! is build with compatibility for older browsers. According to Drupal's browser requirements I adapted the build script for browserslist to defaults.

File Size is now 64K.

🇩🇪Germany jan kellermann

I tested in combination with #3491906 and the "globally"-option and it worked as expected.

We need a review for RTBC.

🇩🇪Germany jan kellermann

@gaurav.kapoor Thank you for testing! I cannot reproduce your problem :(

I use this embed for testing:

<iframe src="https://social.bund.de/@Umweltbundesamt/113366705012830259/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://social.bund.de/embed.js" async="async"></script>

and the mastodon-config from the module.

Can you please post your embed-markup? Did you adapt the src-URL in config correct? Can you please post the part the ready html-document? I will try to reproduce.

Thank you very much.

🇩🇪Germany jan kellermann

Thank you for the solution and the merge request.
I fixed small things and merged.

In general there is a problem with caching but I will open a new issue for this.

🇩🇪Germany jan kellermann

I added the source https://www.recaptcha.net/recaptcha/api.js.

Please test.

🇩🇪Germany jan kellermann

In original documentation of klaro-js the loading with "defer" is recommended.
We run in some race-conditions with our own drupal integration and removed the defer-flag.

We will check this again - unfortunately, the impact assessment is not trivial.

🇩🇪Germany jan kellermann

Thank you for feedback and testing!

Merged to dev.

🇩🇪Germany jan kellermann

FYI: I tested module Entity Search & Replace and have the same problem in update report.

So i think this could be a problem in the update-module of core.

🇩🇪Germany jan kellermann

I fixed this bug in klaro-js and opened a pull request.

New file size would be 164K. I look if we can compress more with webpack.

🇩🇪Germany jan kellermann

Thank you! Fixed both. Please review.

🇩🇪Germany jan kellermann

In my installation klaro-no-css.js has 208K and klaro-no-translations-no-css.js 208K also. I therefore see no urgent need for action here.

In the case that a fork is used at a later date, we can think again about minimization and the like. Slimmer would indeed be nicer.

🇩🇪Germany jan kellermann

Handler added and opened MR.

Please review.

Production build 0.71.5 2024