Skip to content

Commit

Permalink
Make all tabs visible for a workflow (#1931)
Browse files Browse the repository at this point in the history
Style workflow versions so no scrolling necessary

As part of that, revert "Swap position of Metrics and Tool tabs (#1926)"

SEAB-6231
  • Loading branch information
coverbeck authored Feb 2, 2024
1 parent 959b372 commit b786d89
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
4 changes: 0 additions & 4 deletions cypress/e2e/group2/myworkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,6 @@ describe('Dockstore my workflows part 3', () => {
cy.visit('/my-workflows/github.com/A/l');
isActiveTab('Info');
tabs.forEach((tab) => {
if (tab === 'Tools') {
// Ugh, got to scroll to click this.
cy.get('#workflow_tabs').find('.mat-tab-header-pagination-after').first().click();
}
goToTab(tab);
isActiveTab(tab);
if (tab === 'Versions') {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/group3/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ describe('Dockstore Metrics', () => {
setTokenUserViewPort();
it('Should see no metrics banner', () => {
cy.visit('/workflows/github.com/A/l:master');
cy.get('.mat-tab-header-pagination-after').click();
goToTab('Metrics');
cy.get('[data-cy=no-metrics-banner]').should('be.visible');

Expand All @@ -23,7 +22,6 @@ describe('Dockstore Metrics', () => {
}).as('getMetrics');
});
cy.visit('/workflows/github.com/A/l:master');
cy.get('.mat-tab-header-pagination-after').click();
cy.wait('@getMetrics');
goToTab('Metrics');

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/immutableDatabaseTests/workflowDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,13 @@ describe('Dockstore Workflow Details', () => {
it('Should see No Metrics banner', () => {
cy.visit('/workflows/github.com/A/l');
cy.get('.mat-tab-label').should('have.length', 7);
cy.get('.mat-tab-header-pagination-after').click();
goToTab('Metrics');
cy.url().should('eq', Cypress.config().baseUrl + '/workflows/github.com/A/l:master?tab=metrics');
cy.get('[data-cy=no-metrics-banner]').should('be.visible');
});
});

it('Change tab to tools', () => {
cy.get('.mat-tab-header-pagination-after').click();
goToTab('Tools');
cy.url().should('eq', Cypress.config().baseUrl + '/workflows/github.com/A/l:master?tab=tools');
});
Expand Down
6 changes: 6 additions & 0 deletions src/app/shared/styles/workflow-container.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ a.underline-none {
width: 14rem;
text-align: start;
}

:host ::ng-deep .mat-tab-label {
padding-left: 0.5em !important;
padding-right: 0.5em !important;
min-width: 0 !important;
}
28 changes: 14 additions & 14 deletions src/app/workflow/workflow.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,18 @@ <h3>
</ng-template>
</ng-template>
</mat-tab>
<mat-tab id="metricsTab" label="Metrics">
<app-executions-tab [entry]="workflow" [version]="selectedVersion"></app-executions-tab>
</mat-tab>
<div *ngIf="entryType === EntryType.BioWorkflow">
<mat-tab id="toolsTab" label="Tools">
<div *ngIf="!isStub()">
<app-tool-tab [selectedVersion]="selectedVersion" [canRead]="canRead" [canWrite]="canWrite" [isOwner]="isOwner">
</app-tool-tab>
</div>
<div *ngIf="isStub()" class="p-3">
<mat-card class="alert alert-warning mat-elevation-z" role="alert">
<mat-icon class="alert-warning-icon">warning</mat-icon> To see tools, please refresh the workflow.
</mat-card>
</div>
</mat-tab>
<mat-tab id="dagTab" label="DAG">
<ng-template matTabContent>
<app-dag
Expand All @@ -401,18 +409,10 @@ <h3>
</div>
</ng-template>
</mat-tab>
<mat-tab id="toolsTab" label="Tools">
<div *ngIf="!isStub()">
<app-tool-tab [selectedVersion]="selectedVersion" [canRead]="canRead" [canWrite]="canWrite" [isOwner]="isOwner">
</app-tool-tab>
</div>
<div *ngIf="isStub()" class="p-3">
<mat-card class="alert alert-warning mat-elevation-z" role="alert">
<mat-icon class="alert-warning-icon">warning</mat-icon> To see tools, please refresh the workflow.
</mat-card>
</div>
</mat-tab>
</div>
<mat-tab id="metricsTab" label="Metrics">
<app-executions-tab [entry]="workflow" [version]="selectedVersion"></app-executions-tab>
</mat-tab>
<mat-tab *ngIf="!isPublic() && isHosted() && isOwner" id="permissionsTab" label="Permissions">
<app-permissions [workflow]="workflow"></app-permissions>
</mat-tab>
Expand Down

0 comments on commit b786d89

Please sign in to comment.