Refactor data loading calls out of SubscriptionsHelper and BillingPlansHelper
Follow up from discussion in https://gitlab.com/gitlab-org/gitlab/-/issues/352231#note_839418535 and #300140
Problem
The SubscriptionsHelper
and BillingPlansHelper
are currently doing a lot of data loading. In particular, we're making API calls to the CustomersDot application within this view helper when we should only be using it for view logic.
Proposal
Move the API data loading out of these helpers and into the controller. This will make it easier to ensure we're only loading the data once (I think currently we're not caching this API data in a variable, so it's being called multiple times for one page render).
We should evaluate if any of the other database calls should be moved out of the view helper too.
Edited by Josianne Hyson