@@ -108,6 +108,7 @@ import {
108108 getTagSymlogLinearThresholds ,
109109 getSuperimposedCardsWithMetadata ,
110110 getMetricsTagGroupExpansionMap ,
111+ getMetricsSuperimposedSectionExpanded ,
111112 getCardStateMap ,
112113 getFullWidthSuperimposedCards ,
113114} from '../store' ;
@@ -875,22 +876,23 @@ export class MetricsEffects implements OnInitEffects {
875876 this . persistTagGroupExpansion$ = this . actions$ . pipe (
876877 ofType (
877878 actions . metricsTagGroupExpansionChanged ,
878- actions . metricsTagMetadataLoaded
879+ actions . metricsTagMetadataLoaded ,
880+ actions . metricsSuperimposedSectionExpansionChanged
879881 ) ,
880882 debounceTime ( 200 ) ,
881- withLatestFrom ( this . store . select ( getMetricsTagGroupExpansionMap ) ) ,
882- tap ( ( [ , expansionMap ] ) => {
883+ withLatestFrom (
884+ this . store . select ( getMetricsTagGroupExpansionMap ) ,
885+ this . store . select ( getMetricsSuperimposedSectionExpanded )
886+ ) ,
887+ tap ( ( [ , expansionMap , superimposedExpanded ] ) => {
883888 const entries : Array < [ string , boolean ] > = Array . from (
884889 expansionMap . entries ( )
885890 ) ;
886- if ( entries . length > 0 ) {
887- window . localStorage . setItem (
888- TAG_GROUP_EXPANSION_STORAGE_KEY ,
889- JSON . stringify ( { version : 1 , groups : entries } )
890- ) ;
891- } else {
892- window . localStorage . removeItem ( TAG_GROUP_EXPANSION_STORAGE_KEY ) ;
893- }
891+ entries . push ( [ '__superimposed__' , superimposedExpanded ] ) ;
892+ window . localStorage . setItem (
893+ TAG_GROUP_EXPANSION_STORAGE_KEY ,
894+ JSON . stringify ( { version : 1 , groups : entries } )
895+ ) ;
894896 window . dispatchEvent ( new CustomEvent ( 'tb-tag-group-expansion-changed' ) ) ;
895897 } )
896898 ) ;
0 commit comments