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

Comments

couturier’s picture

Status: Active » Closed (won't fix)

Token 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.

Dave Reid’s picture

Status: Closed (won't fix) » Active

Please 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.

Berdir’s picture

Category: Task » Plan