Switch userDashboard from using selector object to using the api to get contributions...
authoreileen <emcnaughton@wikimedia.org>
Wed, 13 Feb 2019 01:21:57 +0000 (14:21 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 13 Feb 2019 18:41:43 +0000 (07:41 +1300)
commit8bfce657bc212f3b5288b6b5c3535fad7323dbfc
tree38610972c3aa28ae858b0720a12287abba4b82ed
parentcbadec7774e5eaf9c6c3ef58f1041865e1962822
Switch userDashboard from using selector object to using the api to get contributions to display.

Note that preliminary tests for this were written & merged some time ago.

Reasons for the change are

1) readability - most devs are much more comfortable with reading the api code than the selector
2) performance - the contribute selector code is deeply unperformant - mostly due to the summary function which in
this case is somewhat mitigated by the limit of 12 but we are still doing something slow for no reason
3) test stability - the test for this turned out to have poor stability & hopefully this will help
4) preliminary cleanup - there are 2 existing PRs that attempt to add new buttons to this & moving towards
a cleaner tpl / php layer will help with those. In addition there is a serious performance issue to
address on the contribution summary function. Reducing use of that function should help with the cleanup effort
CRM/Contribute/Page/UserDashboard.php
templates/CRM/Contribute/Page/UserDashboard.tpl
tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php