@@ -87,6 +87,10 @@ export default class extends PageModification {
8787 display: none!important;
8888 }
8989
90+ .ghx-swimlane.no-visibility {
91+ display: none!important;
92+ }
93+
9094 .ghx-parent-group.no-visibility {
9195 display: none!important;
9296 }
@@ -173,7 +177,7 @@ export default class extends PageModification {
173177 cards . forEach ( node => {
174178 node . classList . remove ( 'no-visibility' ) ;
175179 } ) ;
176- this . showAllSubTaskParentGroup ( ) ;
180+ this . showOrHideTaskAggregations ( ) ;
177181 return ;
178182 }
179183
@@ -194,29 +198,39 @@ export default class extends PageModification {
194198 node . classList . add ( 'no-visibility' ) ;
195199 }
196200 } ) ;
197- this . showOrHideSubTaskParentGroup ( ) ;
201+ this . showOrHideTaskAggregations ( ) ;
198202 }
199203
200- showAllSubTaskParentGroup ( ) {
201- document . querySelectorAll ( '.ghx-parent-group' ) . forEach ( el => {
202- el . classList . remove ( 'no-visibility' ) ;
203- } ) ;
204+ showOrHideTaskAggregations ( ) {
205+ this . showOrHideSubTaskParentGroup ( ) ;
206+ this . showOrHideEmptySwimlanes ( ) ;
204207 }
205208
206209 showOrHideSubTaskParentGroup ( ) {
207210 const parentGroup = Array . from ( document . querySelectorAll ( '.ghx-parent-group' ) ) ;
208211 parentGroup . forEach ( el => {
209- const lenNoVisibleCards = el . querySelectorAll ( '.ghx-issue.no-visibility' ) . length ;
210- const lenCard = el . querySelectorAll ( '.ghx-issue' ) . length ;
212+ this . showOrHideElementByVisibleIssueCards ( el ) ;
213+ } ) ;
214+ }
211215
212- if ( lenNoVisibleCards === lenCard ) {
213- el . classList . add ( 'no-visibility' ) ;
214- } else {
215- el . classList . remove ( 'no-visibility' ) ;
216- }
216+ showOrHideEmptySwimlanes ( ) {
217+ const swimLines = Array . from ( document . querySelectorAll ( DOM . swimlane ) ) ;
218+ swimLines . forEach ( el => {
219+ this . showOrHideElementByVisibleIssueCards ( el ) ;
217220 } ) ;
218221 }
219222
223+ showOrHideElementByVisibleIssueCards ( el ) {
224+ const lenNoVisibleCards = el . querySelectorAll ( '.ghx-issue.no-visibility' ) . length ;
225+ const lenCard = el . querySelectorAll ( '.ghx-issue' ) . length ;
226+
227+ if ( lenNoVisibleCards === lenCard ) {
228+ el . classList . add ( 'no-visibility' ) ;
229+ } else {
230+ el . classList . remove ( 'no-visibility' ) ;
231+ }
232+ }
233+
220234 hasCustomSwimlines ( ) {
221235 const someSwimline = document . querySelector ( DOM . swimlaneHeaderContainer ) ;
222236
0 commit comments