Skip to content
Snippets Groups Projects
Unverified Commit 2d395a89 authored by Saurabh Kumar's avatar Saurabh Kumar Committed by GitHub
Browse files

Reduce the lazy load time for applicant submission on dashboard (#3815)

Right now, the my submission for the applicants on their dashboard is
loaded after 1s of page load which is too much delay.

This PR reduces the delay so it's the loading via htmx is triggered as
soon as the page is finished loading. Also, the PR reduces the loading
preview/skeleton to 3 so there is must of jumpiness before/after the
submissions are loading, this is based on the fact that on an average
there we only few submission by a single applicant.
parent be33097b
No related branches found
Tags v1.10.0
1 merge request!76Merge up to 5.6.0
......@@ -44,7 +44,7 @@
<h2 class="font-light flex-1">{% trans "My submissions" %}</h2>
</div>
<div hx-get="{% url 'dashboard:applicant_submissions' %}" hx-trigger="load delay:1000" id="submissions_list">
<div hx-get="{% url 'dashboard:applicant_submissions' %}" hx-trigger="load" id="submissions_list">
{% for dummy_item in per_section_items %}
<div class="wrapper wrapper--status-bar-outer animate-pulse min-h-40">
<div class="mt-5 ms-4 lg:max-w-[30%] h-9 bg-gray-200 "></div>
......
......@@ -521,9 +521,10 @@ class ApplicantDashboardView(TemplateView):
context["my_submissions_exists"] = ApplicationSubmission.objects.filter(
user=self.request.user
).exists()
context["per_section_items"] = range(
5
) # it is just for animation, nothing to do with no of items there.
# Number of items to show in skeleton in each section of lazy loading
context["per_section_items"] = range(3)
context["my_projects_exists"] = Project.objects.filter(
user=self.request.user
).exists()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment