Add option for tooltips to be created via data attributes - #71
Conversation
data attributes
data attributesdata attributes
|
@oscgonfer I didn't have a chance to look at this yet but I like the idea. I thought about doing it this way in the first place but I had some performance concerns and wasn't sure how caching would work. Adding it as an opt in feature sounds like a good idea to me. Can you add some docs and tests for this? |
One way I see this last bit could be implemented is that (as you point out), when a term is updated and it's being used with this method, the banner should should show a warning indicating that the pages need to be republished. However, if the user has added this term in multiple locations, the banner can become unusable (and I am not sure if we want to do that for the user automatically, as there may be drafts and all sort of other things waiting).
Not sure what the best option is though. Maybe you have another idea. |

Hi @smark-1
Thank you for this plugin!
I wanted to submit a PR for an alternative way to populate the terms via
data-[...]attributes instead of requests via DRF. The idea is that we can passtermanddefinitionto the tooltip directly.In addition, this adds a couple of additional settings to be able to limit the word length of the tooltip, and to add a link on the bottom part that brings you to a different page (customizable) with a list of terms. An example of this can be found here:
more4nature-eu/knowledge-platform#64
There are a couple of pending things that I can work on if you like the idea.