#1595 Clicking an entry in the CalHeatMap doesn't always update the activity list
Closed: Fixed 7 years ago Opened 7 years ago by tibbs.

Sometimes the API call will return an empty activities array, even when the heatmap shows activity on that day. This one, for example:

https://stg.pagure.io/api/0/user/tibbs/activity/2016-09-07?grouped=1

In that case, the page doesn't change, which is kind of odd. Maybe simply call $('#user-activity').hide(); in that case?

diff --git a/pagure/templates/_render_repo.html b/pagure/templates/_render_repo.html
index d1ebd27..e87e1c4 100644
--- a/pagure/templates/_render_repo.html
+++ b/pagure/templates/_render_repo.html
@@ -326,6 +326,8 @@
                 $('#user-activity-body').html('');
                 $('#user-activity-title').text('Activity on ' + date);
                 $('#user-activity').show();
+              } else {
+                $('#user-activity').hide();
               }
               for (var i=0; i<data.activities.length; i++){
                 var d = data.activities[i];

Totally untested as I don't have a local pagure instance set up.


I'll likely do it a little bit different from your solution but I agree we should fix this :)

@pingou changed the status to Closed

7 years ago

Login to comment on this ticket.

Metadata