- Issue created by @xaqrox
- @xaqrox opened merge request.
- Status changed to Needs review
over 1 year ago 8:02pm 6 April 2023 - πΊπΈUnited States xaqrox Washington, D.C.
A couple notes on this and other topics β
- This dependency is probably needed in more places, but I'm not sure what is the most Drupaly way to add a cache dependency to a theme hook everywhere.
template_preprocess_HOOK()
? That would make the merge request obsolete. - In looking thru this, I started to feel like
addtoany_create_data()
andaddtoany_create_entity_data()
should be moved into a service and decomposed into functions for each of the variables. Don't have a *great* reason for that, just a code smell instinct. - If there was a
template_preprocess_HOOK()
implementation, that is where the defaults from the settings could be filled in. For example, the extra field would likely always provide URL and title, but if the user doesn't specify icon size, then it could get filled in from the default config. The block could provide icon size and custom_html, and if URL/title was not provided, they could get filled in from the current route in the hook. In the process, if there is a need to hit the default config, that is when the cache dependency could be added. (It may also be that there are settings that will always be needed to build the markup, in which case the dependency should be added in every case.)
- This dependency is probably needed in more places, but I'm not sure what is the most Drupaly way to add a cache dependency to a theme hook everywhere.
- Issue was unassigned.
- Status changed to Postponed: needs info
over 1 year ago 1:34am 24 May 2023 - π¦πΊAustralia VladimirAus Brisbane, Australia
Checking if committed π Block Display is random for anonymous Fixed resolved the issue?
- πΊπΈUnited States xaqrox Washington, D.C.
I tested this on simplytest.me: I added the share block to the block layout, made a change to the global config. Reloaded the page, my change was not reflected. Cleared the cache and reloaded, change was reflected. I did not expect the code added in https://www.drupal.org/project/addtoany/issues/3212302 π Block Display is random for anonymous Fixed to fix this, because it doesn't account for the dependency on the global config.