#4429 "Activity" CalHeatMap display accumulates "No activity..." messages
Closed: Fixed 5 years ago by pingou. Opened 5 years ago by ferdnyc.

Currently pagure/templates/_render_repo.html ends its success function for the activity lookup with:

if (data.activities.length > 0){
// ...
else {
  $('#user-activity-body').append(
     '<div class="list-group-item">No activity recorded on that day</div>'
  );
}

With that .append() being a bit too effective, because every time you click on a day with no activity, an additional "No activity recorded on that day" message is added below the existing one(s), growing the list ever longer.

Worse, those messages aren't cleared out even when a day with activity is clicked on, nor does closing the Activity list using the × in the upper-right corner — the built up "No activity..." lines return when the list reappears. Only reloading the page flushes out the list.


This should be fairly easy to fix, especially since you've already looked at where the code for this is :)

Would you like to take a stab at fixing it?
You can open a PR or attach a patch to this ticket, either work for me :)

Metadata Update from @pingou:
- Issue tagged with: JS, bug, easyfix

5 years ago

Sure, but I'm shooting blind because the hour I just spent trying and failing to get vagrant working is as much as I care to spend on it, so it'll be completely untested.

Login to comment on this ticket.

Metadata
Attachments 1
Related Pull Requests
  • #4439 Merged 5 years ago