Consider phasing instance variables out of helpers
Description
We have a few helpers in app/helpers
. Many of them use instance variables:
$ cd helpers/; ag '@\w+' | wc -l
219
Using instance variables in modules that are mixins might be counter-intuitive sometimes, and difficult to test.
Would it make sense to phase instance variables out of helpers?
Proposal
Encapsulating instance variables about current page in class might be a good start, see https://gitlab.com/gitlab-org/gitlab-ce/issues/20045.
/cc @DouweM @rspeicher @rymai