Skip to content

Commit

Permalink
Merge branch 'develop' into feature/SEAB-5762
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunnaye committed Nov 13, 2024
2 parents 513f76f + f145992 commit d427073
Show file tree
Hide file tree
Showing 19 changed files with 133 additions and 128 deletions.
84 changes: 42 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"license": "Apache License 2.0",
"config": {
"webservice_version_prefix": "1.16.0",
"webservice_version": "1.16.0-alpha.10",
"use_snapshot": true
"webservice_version": "1.16.0",
"use_snapshot": false
},
"scripts": {
"ng": "npx ng",
Expand Down
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
2 changes: 1 addition & 1 deletion src/app/home-page/home-logged-out/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h3><span class="title-strong">Use</span> in many analysis environments.</h3>
<span class="code primary-3">## or grab one that the workflow author has provided (if applicable)</span>
<span class="code"><span style="color: #3f51b5">wget --header=</span><span style="color: #0277bd">'Accept: text/plain' </span><span class="warn-1">https://dockstore.org/api/api/ga4gh/v2/tools/%23workflow%2Fgithub.com%2Fdockstore%2Fbcc2020-training%2FHelloWorld/versions/master/PLAIN_WDL/descriptor/..%2F..%2Ftest.json -O Dockstore.json</span></span>
<span class="code primary-3">## Run locally with the Dockstore CLI</span>
<span class="code"><span style="color: #3f51b5">dockstore</span><span style="color: #0277bd">' workflow launch --entry </span><span class="warn-1">github.com/dockstore/bcc2020-training/HelloWorld:master --json Dockstore.json</span></span>
<span class="code"><span style="color: #3f51b5">dockstore</span> <span style="color: #0277bd">workflow launch --entry </span><span class="warn-1">github.com/dockstore/bcc2020-training/HelloWorld:master --json Dockstore.json</span></span>
</pre>
</div>
</div>
Expand Down
39 changes: 20 additions & 19 deletions src/app/search/query-builder.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,26 +173,27 @@ export class QueryBuilderService {
* @memberof SearchComponent
*/
appendFilter(body: any, aggKey: string | null, filters: Map<string, Set<string>>, exclusiveFilters: Array<string>): Bodybuilder {
filters.forEach((value: Set<string>, key: string) => {
value.forEach((insideFilter) => {
const isExclusiveFilter = exclusiveFilters.includes(key);
if (aggKey === key && !isExclusiveFilter) {
// Return some garbage filter because we've decided to append a filter, there's no turning back
// return body; // <--- this does not work
body = body.notFilter('term', 'some garbage term that hopefully never gets matched', insideFilter);
} else {
// value refers to the buckets selected
if (value.size > 1) {
body = body.orFilter('term', key, insideFilter);
} else {
if (isExclusiveFilter) {
body = body.filter('term', key, this.convertIntStringToBoolString(insideFilter));
} else {
body = body.filter('term', key, insideFilter);
}
filters.forEach((values: Set<string>, key: string) => {
const isExclusiveFilter = exclusiveFilters.includes(key);
if (aggKey === key && !isExclusiveFilter) {
// Return some garbage filter because we've decided to append a filter, there's no turning back
values.forEach((value) => {
body = body.notFilter('term', 'some garbage term that hopefully never gets matched', value);
});
} else if (values.size == 1) {
// Add a filter that matches a single value
const [value] = values;
const convertedValue = isExclusiveFilter ? this.convertIntStringToBoolString(value) : value;
body = body.filter('term', key, convertedValue);
} else {
// Add a filter that matches at least one of multiple values
body = body.filter('bool', (b) => {
for (const value of values) {
b = b.orFilter('term', key, value);
}
}
});
return b;
});
}
});
return body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
notebook?.source.repository +
(notebook?.source.workflowName ? '/' + notebook?.source.workflowName : '')
}}</a>
<div class="truncate-text-3">
<div>
<span>{{ notebook?.source.topicAutomatic }}</span>
<app-ai-bubble
*ngIf="notebook?.source.topicSelection === TopicSelectionEnum.AI && !notebook?.source.approvedAITopic"
[isPublic]="true"
></app-ai-bubble>
<span [matTooltip]="notebook?.source.topicAutomatic" matTooltipPosition="left">{{ notebook?.source.topicAutomatic }}</span>
</div>
</div>
</mat-cell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
tool?.source.namespace + '/' + tool?.source.name + (tool?.source.toolname ? '/' + tool?.source.toolname : '')
}}</a>
</ng-template>
<div class="truncate-text-3">
<div>
<span>{{ tool?.source.topicAutomatic }}</span>
<app-ai-bubble
*ngIf="tool?.source.topicSelection === TopicSelectionEnum.AI && !tool?.source.approvedAITopic"
[isPublic]="true"
></app-ai-bubble>
<span [matTooltip]="tool?.source.topicAutomatic" matTooltipPosition="left">{{ tool?.source.topicAutomatic }}</span>
</div>
</div>
</mat-cell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
(workflow?.source.workflowName ? '/' + workflow?.source.workflowName : '')
}}</a
>
<div class="truncate-text-3">
<div>
<span>{{ workflow?.source.topicAutomatic }}</span>
<app-ai-bubble
*ngIf="workflow?.source.topicSelection === TopicSelectionEnum.AI && !workflow?.source.approvedAITopic"
[isPublic]="true"
></app-ai-bubble>
<span [matTooltip]="workflow?.source.topicAutomatic" matTooltipPosition="left">{{ workflow?.source.topicAutomatic }}</span>
</div>
</div>
</mat-cell>
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
5 changes: 0 additions & 5 deletions src/app/shared/styles/entry-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,3 @@ th {
white-space: nowrap;
vertical-align: top;
}

// Align AI bubble all the way to the left
app-ai-bubble {
margin-left: 0;
}
6 changes: 6 additions & 0 deletions src/app/test/service-stubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,12 @@ export class WorkflowsStubService {
updateWorkflowDefaultVersion(workflowId: number, tag: string) {
return observableOf([]);
}
primaryDescriptor1(workflowId, descriptorType, versionName) {
return observableOf({});
}
secondaryDescriptors1(workflowId, descriptorType, versionName) {
return observableOf([]);
}
}

export class ContainersStubService {
Expand Down
4 changes: 1 addition & 3 deletions src/app/workflow/info-tab/info-tab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export class InfoTabComponent extends EntryTab implements OnInit, OnChanges {
this.authors = null;
this.description = null;
}
this.displayTextForButton = this.infoTabService.getTRSId(this.workflow);
}

ngOnInit() {
Expand All @@ -208,9 +209,6 @@ export class InfoTabComponent extends EntryTab implements OnInit, OnChanges {
this.infoTabService.defaultTestFilePathEditing$
.pipe(takeUntil(this.ngUnsubscribe))
.subscribe((editing) => (this.defaultTestFilePathEditing = editing));
this.entryType$
.pipe(takeUntil(this.ngUnsubscribe))
.subscribe((entryType) => (this.displayTextForButton = this.infoTabService.getTRSId(this.workflow, entryType)));
this.infoTabService.forumUrlEditing$.pipe(takeUntil(this.ngUnsubscribe)).subscribe((editing) => (this.forumUrlEditing = editing));
}
/**
Expand Down
Loading

0 comments on commit d427073

Please sign in to comment.