File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ export default class extends PageModification {
8686 .ghx-issue.no-visibility {
8787 display: none!important;
8888 }
89+
90+ .ghx-parent-group.no-visibility {
91+ display: none!important;
92+ }
8993 </style>
9094 ` ;
9195 }
@@ -169,6 +173,7 @@ export default class extends PageModification {
169173 cards . forEach ( node => {
170174 node . classList . remove ( 'no-visibility' ) ;
171175 } ) ;
176+ this . showAllSubTaskParentGroup ( ) ;
172177 return ;
173178 }
174179
@@ -189,6 +194,27 @@ export default class extends PageModification {
189194 node . classList . add ( 'no-visibility' ) ;
190195 }
191196 } ) ;
197+ this . showOrHideSubTaskParentGroup ( ) ;
198+ }
199+
200+ showAllSubTaskParentGroup ( ) {
201+ document . querySelectorAll ( '.ghx-parent-group' ) . forEach ( el => {
202+ el . classList . remove ( 'no-visibility' ) ;
203+ } ) ;
204+ }
205+
206+ showOrHideSubTaskParentGroup ( ) {
207+ const parentGroup = Array . from ( document . querySelectorAll ( '.ghx-parent-group' ) ) ;
208+ parentGroup . forEach ( el => {
209+ const lenNoVisibleCards = el . querySelectorAll ( '.ghx-issue.no-visibility' ) . length ;
210+ const lenCard = el . querySelectorAll ( '.ghx-issue' ) . length ;
211+
212+ if ( lenNoVisibleCards === lenCard ) {
213+ el . classList . add ( 'no-visibility' ) ;
214+ } else {
215+ el . classList . remove ( 'no-visibility' ) ;
216+ }
217+ } ) ;
192218 }
193219
194220 hasCustomSwimlines ( ) {
You can’t perform that action at this time.
0 commit comments