Load the activities tab of submission and project on demand (#3330)
The activities tab can have a lot of activities as it’s unpaginated and also has an N+1 query to fetch the related objects. This PR loads the data only after the tab is clicked. I makes use of the htmx and alpine to observe the window-hash change. Notes: - The communication tab with it's markdown editor, requires some custom initialization logic, which breaks with the htmx loaded content. So it' not included in this PR. - On a submission with 5 activities the number of SQL queries reduced from 168 to 148. Related #3328
parent
1ecd4dfc
No related branches found
No related tags found
Showing
- hypha/apply/activity/services.py 47 additions, 0 deletionshypha/apply/activity/services.py
- hypha/apply/activity/views.py 4 additions, 12 deletionshypha/apply/activity/views.py
- hypha/apply/funds/templates/funds/applicationsubmission_detail.html 13 additions, 3 deletions...y/funds/templates/funds/applicationsubmission_detail.html
- hypha/apply/funds/urls.py 2 additions, 0 deletionshypha/apply/funds/urls.py
- hypha/apply/funds/views_partials.py 21 additions, 0 deletionshypha/apply/funds/views_partials.py
- hypha/apply/projects/templates/application_projects/project_detail.html 14 additions, 2 deletions...ojects/templates/application_projects/project_detail.html
- hypha/apply/projects/urls.py 2 additions, 0 deletionshypha/apply/projects/urls.py
- hypha/apply/projects/views/__init__.py 2 additions, 0 deletionshypha/apply/projects/views/__init__.py
- hypha/apply/projects/views/project_partials.py 19 additions, 0 deletionshypha/apply/projects/views/project_partials.py
hypha/apply/activity/services.py
0 → 100644
hypha/apply/funds/views_partials.py
0 → 100644
Please register or sign in to comment