Problem/Motivation
The whole theme/rendering of the token browser is problematic, it uses multiple theme functions that call each other, different ways to do the same (e.g. two different theme functions, but one can do the same as the other based on configuration).
It is also not possible to use the render cache with the current approach and the custom render cache that token implemented is possible anymore either, as the functions it used have been removed/moved into a service.
Proposed resolution
My suggestion would be to keep the browser modal link as the only theme function, convert the nested table theme functions to a service/function/#type that sets up the render cache and then uses #type/pre_render callbacks for the real work, allowing to rely on the render cache properly. Also, zero tests :)
I think that the custom overrides that token has for using render cache on POST would not be relevant if we default to the modal wherever it makes sense (= all forms).
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#4 | 2430823-4.patch | 3.03 KB | joelpittet |
|
Comments
Comment #1
couturier CreditAttribution: couturier as a volunteer commentedToken is the #4 most used module according to webchick, and the issue queue has been moved to critical by her for an official Token release for D8 as of November 2015. Since no activity has taken place on this issue in nearly a year, is it possible to set it to a "won't fix" status so that a Token release can go forward? If this is still a problem with current versions of Token, please revert status. Thanks.
Comment #2
Dave ReidPlease do not go through marking issues as won't fix. They are still valid, and only maintainers should be marking issues as won't fix as it's ultimately their decision to make.
Comment #3
BerdirComment #4
joelpittetA WIP patch. Leaving the #theme function in there for BC.
Comment #5
BerdirThanks, but that's not really what this issue was about :)
This is just the link to the token browser, this issue is about the token browser itself that's displayed in the dialog.