community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864198 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/drafts.js source/generators.js source/primer.js wizard.js
Date Fri, 02 Aug 2019 06:21:21 GMT
Author: humbedooh
Date: Fri Aug  2 06:21:21 2019
New Revision: 1864198

URL: http://svn.apache.org/viewvc?rev=1864198&view=rev
Log:
Updates:
- tweak community health layout
- slow down highlighter a bit
- only inject drafts list if still on tab 0

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js
    comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
    comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js?rev=1864198&r1=1864197&r2=1864198&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js Fri Aug  2 06:21:21 2019
@@ -86,7 +86,7 @@ function show_draft_list(state, json) {
     }
     txt += "</ul></small>"
   }
-  if (json) {
+  if (json && current_step == 0) {
     let tip = document.getElementById('tips');
     if (txt.length > 0) {
         tip.style.display = 'block';

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js?rev=1864198&r1=1864197&r2=1864198&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js Fri Aug  2 06:21:21
2019
@@ -203,24 +203,24 @@ function health_tips(data) {
             pct_change_txt = 'big';
         }
         if (pct_change > 25 && mldata.quarterly[0] > 5) {
-            txt += "<span style='color: #080'>- %s had a %s increase in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change_txt,
mldata.quarterly[0], mldata.quarterly[1]);
+            txt += "<li style='color: #080'>%s had a %s increase in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
         }
         else if (pct_change < -25  && mldata.quarterly[1] > 5) {
             pct_change = Math.abs(pct_change)
-            txt += "<span style='color: #800'>- %s had a %s decrease in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change_txt,
mldata.quarterly[0], mldata.quarterly[1]);
+            txt += "<li style='color: #800'>%s had a %s decrease in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
         }
     }
     
     // Bugzilla changes
     let bz = data.bugzilla[project];
-    if (bz[0] || bz[1]) txt += "- %u BugZilla tickets opened and %u closed in the past quarter.".format(bz[0],
bz[1]);
+    if (bz[0] || bz[1]) txt += "<li>%u BugZilla tickets opened and %u closed in the
past quarter.</li>".format(bz[0], bz[1]);
     
     // JIRA changes
     let jira = data.jira[project];
-    if (jira[0] || jira[1]) txt += "- %u JIRA tickets opened and %u closed in the past quarter.".format(jira[0],
jira[1]);
+    if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u closed in the
past quarter.</li>".format(jira[0], jira[1]);
     
     // Append header IF there is data, otherwise nah.
-    if (txt.length > 0) txt = "<h5>Potentially useful observations for your community
health section:</h5>" + txt;
+    if (txt.length > 0) txt = "<hr/><big>Potentially useful observations on
community health:</big><ul>" + txt + "</ul>";
     return txt;
 }
 

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js?rev=1864198&r1=1864197&r2=1864198&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js Fri Aug  2 06:21:21 2019
@@ -182,7 +182,7 @@ function build_steps(s, start, noclick,
         else {
             window.clearTimeout(hilite_timer);
             if (event && event.keyCode == 13) mark_section(step.description);
-            else hilite_timer = window.setTimeout(() => { mark_section(step.description)},
100);
+            else hilite_timer = window.setTimeout(() => { mark_section(step.description)},
200);
         }
     }
 }

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1864198&r1=1864197&r2=1864198&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Fri Aug  2 06:21:21 2019
@@ -1101,7 +1101,7 @@ function show_draft_list(state, json) {
     }
     txt += "</ul></small>"
   }
-  if (json) {
+  if (json && current_step == 0) {
     let tip = document.getElementById('tips');
     if (txt.length > 0) {
         tip.style.display = 'block';
@@ -1352,24 +1352,24 @@ function health_tips(data) {
             pct_change_txt = 'big';
         }
         if (pct_change > 25 && mldata.quarterly[0] > 5) {
-            txt += "<span style='color: #080'>- %s had a %s increase in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change_txt,
mldata.quarterly[0], mldata.quarterly[1]);
+            txt += "<li style='color: #080'>%s had a %s increase in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
         }
         else if (pct_change < -25  && mldata.quarterly[1] > 5) {
             pct_change = Math.abs(pct_change)
-            txt += "<span style='color: #800'>- %s had a %s decrease in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change_txt,
mldata.quarterly[0], mldata.quarterly[1]);
+            txt += "<li style='color: #800'>%s had a %s decrease in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
         }
     }
     
     // Bugzilla changes
     let bz = data.bugzilla[project];
-    if (bz[0] || bz[1]) txt += "- %u BugZilla tickets opened and %u closed in the past quarter.".format(bz[0],
bz[1]);
+    if (bz[0] || bz[1]) txt += "<li>%u BugZilla tickets opened and %u closed in the
past quarter.</li>".format(bz[0], bz[1]);
     
     // JIRA changes
     let jira = data.jira[project];
-    if (jira[0] || jira[1]) txt += "- %u JIRA tickets opened and %u closed in the past quarter.".format(jira[0],
jira[1]);
+    if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u closed in the
past quarter.</li>".format(jira[0], jira[1]);
     
     // Append header IF there is data, otherwise nah.
-    if (txt.length > 0) txt = "<h5>Potentially useful observations for your community
health section:</h5>" + txt;
+    if (txt.length > 0) txt = "<hr/><big>Potentially useful observations on
community health:</big><ul>" + txt + "</ul>";
     return txt;
 }
 
@@ -1706,7 +1706,7 @@ function build_steps(s, start, noclick,
         else {
             window.clearTimeout(hilite_timer);
             if (event && event.keyCode == 13) mark_section(step.description);
-            else hilite_timer = window.setTimeout(() => { mark_section(step.description)},
100);
+            else hilite_timer = window.setTimeout(() => { mark_section(step.description)},
200);
         }
     }
 }



Mime
View raw message