File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
extension/src/experiments/model Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,10 @@ export class ExperimentsTree
182182 private formatExperiment ( experiment : ExperimentAugmented , dvcRoot : string ) {
183183 return {
184184 collapsibleState : experiment . hasChildren
185- ? this . getCollapsibleState ( experiment . displayNameOrParent )
185+ ? this . getInitialCollapsibleState (
186+ experiment . type ,
187+ experiment . displayNameOrParent
188+ )
186189 : TreeItemCollapsibleState . None ,
187190 command : {
188191 arguments : [ { dvcRoot, id : experiment . id } ] ,
@@ -234,8 +237,14 @@ export class ExperimentsTree
234237 this . expandedExperiments [ description ] = expanded
235238 }
236239
237- private getCollapsibleState ( description ?: string ) {
238- if ( description && this . expandedExperiments [ description ] ) {
240+ private getInitialCollapsibleState (
241+ type : ExperimentType ,
242+ description ?: string
243+ ) {
244+ if (
245+ ( description && this . expandedExperiments [ description ] ) ||
246+ type === ExperimentType . BRANCH
247+ ) {
239248 return TreeItemCollapsibleState . Expanded
240249 }
241250 return TreeItemCollapsibleState . Collapsed
You can’t perform that action at this time.
0 commit comments