#1594 New activity graph widget doesn't format very well for me
Closed: Fixed Opened by tibbs.

The month names don't fit in the allotted space. Doesn't seem to get better or worse if I zoom the page in firefox. This is probably due to me having a minimum font size set in Firefox (because I have pretty high resolution monitors but am also getting old).

They're also rather low-contrast grey. (Which is also an issue because I'm getting old.)

pagure.png


Using abbreviations for the month names would probably work better if that's possible.

According to the docs for d3.timeFormat, using a format of %b should use abbreviated month names, so adding domainLabelFormat: "%b" should do it:

diff --git a/pagure/templates/_render_repo.html b/pagure/templates/_render_repo.html
index d1ebd27..5ff6594 100644
--- a/pagure/templates/_render_repo.html
+++ b/pagure/templates/_render_repo.html
@@ -306,6 +306,7 @@
       cal.init({
         cellSize: 9,
         domain: "month",
+        domainLabelFormat: "%b",
         subDomain: "day",
         start: new Date(new Date().setMonth(new Date().getMonth() - 11)),
         data: "{{ url_for(

But again, no local test instance at the moment so I can't actually test.

Just jumping in here, this fix did work for me. I see the abbreviated months.

I'm not sure what could have changed except for my browser version, but now the front page of the staging instance is rendering a bit worse:

pagure1.png

If I zoom out one tick, the display at least fits in the space assigned to it but that doesn't change the rendering of the month names.

Edit: Turns out that it's related to browser width. There's a min-width: 1200px rule; smaller than that and the heatmap overflows the allotted space.

If there are going to be changes to the heatmap, I think it would be nice add at least some spacing between it and borders of the box. It feels crammed into top left corner.

Commit 95c80702 fixes this issue

@pingou changed the status to Closed

Commit 484f6f5f fixes this issue

Metadata