@@ -11,6 +11,24 @@ td.nonzero { color: firebrick; font-weight: bold; }
1111td .zero { color : #999 ; }
1212td .total-cell { font-weight : bold ; border-left : 1px solid gray ; }
1313th .role-header { text-align : center ; }
14+ {%- if popup _data _json %}
15+ td .has-popup { cursor : pointer ; text-decoration : underline dotted ; text-underline-offset : 2px ; }
16+ td .has-popup :hover { filter : brightness (1.3 ); }
17+ #team-modal { display : none ; position : fixed ; inset : 0 ; z-index : 9999 ; align-items : center ; justify-content : center ; }
18+ #team-modal .open { display : flex ; }
19+ #team-backdrop { position : fixed ; inset : 0 ; background : rgba (0 ,0 ,0 ,.5 ); }
20+ #team-box { position : relative ; z-index : 1 ; background : #fff ; border-radius : 6px ; max-width : 700px ; width : 90vw ; max-height : 80vh ; display : flex ; flex-direction : column ; box-shadow : 0 8px 32px rgba (0 ,0 ,0 ,.3 ); overflow : hidden ; }
21+ #team-header { display : flex ; align-items : center ; gap : .5em ; padding : .6em 1em ; background : #f5f5f5 ; border-bottom : 1px solid #ddd ; }
22+ #team-title { flex : 1 ; font-weight : bold ; font-size : .95em ; overflow : hidden ; text-overflow : ellipsis ; white-space : nowrap ; }
23+ #team-close { background : none ; border : none ; color : #888 ; font-size : 1.4em ; line-height : 1 ; cursor : pointer ; padding : 0 .15em ; flex-shrink : 0 ; }
24+ #team-close :hover { color : #333 ; }
25+ #team-list { margin : 0 ; padding : .75em 1em ; overflow-y : auto ; flex : 1 ; list-style : none ; }
26+ #team-list li { padding : .3em 0 ; border-bottom : 1px solid #f0f0f0 ; font-size : .9em ; }
27+ #team-list li :last-child { border-bottom : none ; }
28+ #team-list li a { color : #0366d6 ; text-decoration : none ; }
29+ #team-list li a :hover { text-decoration : underline ; }
30+ .popup-repo { color : #888 ; font-size : .85em ; margin-left : .4em ; }
31+ {%- endif %}
1432 </style >
1533</head >
1634<body >
@@ -32,13 +50,13 @@ th.role-header { text-align: center; }
3250<th class =" role-header" title =" Number of BOM components this developer is involved with (hover for list)" >Components</th >
3351</tr >
3452{% - for row in rows %}
35- <tr >
53+ <tr data-dev = " {{ row.dev_id }} " >
3654<td >{{ row.dev_link | safe }}</td >
37- <td class =" {{ 'nonzero' if row.reviewer_prs > 0 else 'zero' }}" >{{ row.reviewer_prs }}</td >
38- <td class =" {{ 'nonzero' if row.support_issues > 0 else 'zero' }}" >{{ row.support_issues }}</td >
39- <td class =" {{ 'nonzero' if row.debugger_bugs > 0 else 'zero' }}" >{{ row.debugger_bugs }}</td >
40- <td class =" {{ 'nonzero' if row.developer_features > 0 else 'zero' }}" >{{ row.developer_features }}</td >
41- <td class =" {{ 'nonzero' if row.maintainer_releases > 0 else 'zero' }}" >{{ row.maintainer_releases }}</td >
55+ <td class =" {{ 'nonzero has-popup ' if row.reviewer_prs > 0 else 'zero' }}" data-col = " reviewer_prs " >{{ row.reviewer_prs }}</td >
56+ <td class =" {{ 'nonzero has-popup ' if row.support_issues > 0 else 'zero' }}" data-col = " support_issues " >{{ row.support_issues }}</td >
57+ <td class =" {{ 'nonzero has-popup ' if row.debugger_bugs > 0 else 'zero' }}" data-col = " debugger_bugs " >{{ row.debugger_bugs }}</td >
58+ <td class =" {{ 'nonzero has-popup ' if row.developer_features > 0 else 'zero' }}" data-col = " developer_features " >{{ row.developer_features }}</td >
59+ <td class =" {{ 'nonzero has-popup ' if row.maintainer_releases > 0 else 'zero' }}" data-col = " maintainer_releases " >{{ row.maintainer_releases }}</td >
4260<td class =" total-cell" >{{ row.total }}</td >
4361<td title =" {{ row.components | join(', ') }}" >{{ row.component_count }}</td >
4462</tr >
@@ -48,6 +66,73 @@ th.role-header { text-align: center; }
4866 <b >Note:</b > Lead developers are counted in all role columns for each of their components.
4967 GitHub data excludes draft PRs and issues labeled &ldquo ; question&rdquo ; .
5068 Enhancement counts exclude issues with milestone &ldquo ; unscheduled&rdquo ; .
69+ Click any nonzero cell to see the contributing items.
5170</p >
71+ {% - if popup_data_json %}
72+ <div id =" team-modal" >
73+ <div id =" team-backdrop" ></div >
74+ <div id =" team-box" >
75+ <div id =" team-header" >
76+ <span id =" team-title" ></span >
77+ <button id =" team-close" >× ; </button >
78+ </div >
79+ <ul id =" team-list" ></ul >
80+ </div >
81+ </div >
82+ <script >
83+ (function (){
84+ var modal = document .getElementById (' team-modal' );
85+ var titleEl = document .getElementById (' team-title' );
86+ var list = document .getElementById (' team-list' );
87+ var DATA = {{ popup_data_json | safe }};
88+
89+ var COL_LABELS = {
90+ reviewer_prs: ' PRs to review' ,
91+ support_issues: ' Issues to answer' ,
92+ debugger_bugs: ' Bugs to fix' ,
93+ developer_features: ' Features requested' ,
94+ maintainer_releases: ' Releases needed'
95+ };
96+
97+ function show (devId , col , devName ) {
98+ var items = DATA [devId] && DATA [devId][col];
99+ if (! items || ! items .length ) return ;
100+ titleEl .textContent = devName + ' — ' + COL_LABELS [col] + ' (' + items .length + ' )' ;
101+ list .innerHTML = ' ' ;
102+ items .forEach (function (item ) {
103+ var li = document .createElement (' li' );
104+ if (col === ' maintainer_releases' ) {
105+ var repoLabel = item .url ? item .url .replace (' https://github.com/' , ' ' ) : item .ga ;
106+ li .innerHTML = item .url
107+ ? ' <a href="' + item .url + ' /commits" target="_blank">' + item .ga + ' </a>'
108+ : item .ga ;
109+ } else {
110+ li .innerHTML = ' <a href="' + item .url + ' " target="_blank">#' + item .number + ' – ' + escHtml (item .title ) + ' </a>'
111+ + ' <span class="popup-repo">' + escHtml (item .repo ) + ' </span>' ;
112+ }
113+ list .appendChild (li);
114+ });
115+ modal .classList .add (' open' );
116+ }
117+ function hide () { modal .classList .remove (' open' ); }
118+ function escHtml (s ) {
119+ return s .replace (/ &/ g ,' &' ).replace (/ </ g ,' <' ).replace (/ >/ g ,' >' ).replace (/ "/ g ,' "' );
120+ }
121+
122+ document .querySelectorAll (' td.has-popup' ).forEach (function (td ) {
123+ td .addEventListener (' click' , function () {
124+ var tr = td .closest (' tr' );
125+ var devId = tr .dataset .dev ;
126+ var col = td .dataset .col ;
127+ var devName = tr .querySelector (' td:first-child' ).textContent .trim ();
128+ show (devId, col, devName);
129+ });
130+ });
131+ document .getElementById (' team-close' ).addEventListener (' click' , hide);
132+ document .getElementById (' team-backdrop' ).addEventListener (' click' , hide);
133+ document .addEventListener (' keydown' , function (e ) { if (e .key === ' Escape' ) hide (); });
134+ })();
135+ </script >
136+ {% - endif %}
52137</body >
53138</html >
0 commit comments