Redesign: remove gcalendar warning#10999
Conversation
| document.querySelectorAll(".new_report").forEach((container) => changeReportFormBehavior(container)) | ||
|
|
||
| updateExternalDomainLinks($("body")) | ||
| document.querySelectorAll("a").forEach((elem) => updateExternalDomainLinks(elem)) |
There was a problem hiding this comment.
After #10967 will be merged, this line needs to be checked. In index.js we already have a snippet like:
document.querySelectorAll("a[target=\"_blank\"]:not([data-external-domain-link=\"false\"])").forEach((elem) => new ExternalDomainLink(elem))
Also, this line is different from the one in redesigned_index.js
There was a problem hiding this comment.
It's different due to the backwards compatibility, since I changed the updateExternalDomainLinks function input arguments.
In the redesigned_index, what I did was merging both snippets into a single one, that is, if some link doesn't contain data-external-link=false, then it applies the external-domain-warning also. I believe both functions are closely related, and perhaps we can save on a data-attribute,
Thoughts? cc/ @andreslucena
There was a problem hiding this comment.
I know what you mean, as I also have the doubt while working on #10121.
As long as it works as it should (ie we should not show the external domain warning if a domain is whitelisted), it sounds good to me to reuse the same selector logic.
| export default function updateExternalDomainLinks($target) { | ||
| const whitelist = window.Decidim.config.get("external_domain_whitelist") || [] | ||
|
|
||
| export default function updateExternalDomainLinks(element) { |
There was a problem hiding this comment.
Yes, we annotate this, when the sync is merged we'll take care of fixing.
* feature/redesign: (26 commits) Use the component name in the sidebar title (#11088) Redesign: layout center (#11068) Redesign: display only public users followings in following profile tab (#11051) Redesign: fix cards (#11072) Redesign: remove gcalendar warning (#10999) lock sass-embedded (#11077) Redesign: scopes picker (#11039) Redesign: pending notifications (#10926) Redesign: change the filters style (#11049) Redesign: secondary actions (#11067) Redesign: assembly members page (#10992) Redesign: update default static map size to 300px (#10953) Redesign: visual placeholder cards (#11038) Redesign: fix emoji popup position (#10957) Redesign: enable REDESIGN_ENABLED on ParticipatoryProcesses (#10983) Redesign: opinion buttons (#10998) Display a disabled message button in public profile if user blocks them instead of hidding it (#10984) Redesign: confirm modal Foundation-free (#10978) Redesign: initiatives (#10646) Redesign: surveys (#10922) ...

🎩 What? Why?
Use the
data-external-link=falsedirective for the google calendar link. Refactor of the external_domain_warning file to get rid of jquery besides simplification of the logic📌 Related Issues
📷 Screenshots
https://decidim-redesign.populate.tools/processes/Decidim4Dummies/f/168/meetings/1810