Skip to content

Commit

Permalink
Merge branch 'hotfix/2.13.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed Nov 4, 2024
2 parents 2dcbfbf + 4183d8b commit 810d090
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/container/container.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<app-workflow *ngIf="displayAppTool" [isWorkflowPublic]="isToolPublic"></app-workflow>
<app-workflow *ngIf="displayAppTool" [isWorkflowPublic]="isToolPublic" [shouldClearState]="false"></app-workflow>
<div *ngIf="tool && !displayAppTool">
<div class="row m-1 mt-3 mb-0" *ngIf="tool?.archived">
<mat-card class="alert alert-warning mat-elevation-z m-0">
Expand Down
2 changes: 1 addition & 1 deletion src/app/container/container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class ContainerComponent extends Entry<Tag> implements AfterViewInit, OnI
}

ngOnInit() {
this.init();
this.init(false);
}

ngAfterViewInit() {
Expand Down
12 changes: 9 additions & 3 deletions src/app/shared/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@ export abstract class Entry<V extends WorkflowVersion | Tag> implements OnDestro
this.gA4GHFilesService.clearFiles();
}

init() {
// Getting rid of this line makes the linking work again and I didn't notice any weird behaviour, but I'm not sure.. Needs more testing
// this.clearState();
init(shouldClearState: boolean) {
// In a PR that added support for displaying AppTools, this clearState call was commented out:
// https://github.com/dockstore/dockstore-ui2/pull/1388#discussion_r761229496
// It has been partially restored, for non-tool/AppTool entry types, to eliminate the
// Flash Of Previous Entry (FOPE) problem for those entry types:
// https://ucsc-cgl.atlassian.net/browse/SEAB-6748
if (shouldClearState) {
this.clearState();
}
this.subscriptions();
this.router.events
.pipe(
Expand Down
3 changes: 2 additions & 1 deletion src/app/workflow/workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export class WorkflowComponent extends Entry<WorkflowVersion> implements AfterVi

@Input() user;
@Input() selectedVersion: WorkflowVersion;
@Input() shouldClearState: boolean = true;

constructor(
private dockstoreService: DockstoreService,
Expand Down Expand Up @@ -283,7 +284,7 @@ export class WorkflowComponent extends Entry<WorkflowVersion> implements AfterVi
}

ngOnInit() {
this.init();
this.init(this.shouldClearState);
//watch for changes in search
this.versionFilterCtrl.valueChanges.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
this.filterVersions();
Expand Down

0 comments on commit 810d090

Please sign in to comment.