Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<section class="overflow-x-scroll">
@if (proofs) {
<la-tableau-svg [tree]="proofs.entailment"></la-tableau-svg>
} @else {
<la-no-data dataType="proof" />
}
</section>
</ng-template>
Expand All @@ -36,6 +38,8 @@
<section class="overflow-x-scroll">
@if (proofs) {
<la-tableau-svg [tree]="proofs.contradiction"></la-tableau-svg>
} @else {
<la-no-data dataType="proof" />
}
</section>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ParseService } from "@/services/parse.service";
import { AnnotationParseResultsComponent } from "../annotation-parse-results/annotation-parse-results.component";
import { TableauSVG } from '../tableau-svg/tableau-svg.component';
import { AnnotationCommentsComponent } from "../annotation-comments/annotation-comments.component";
import { NoDataComponent } from "@/shared/no-data/no-data.component";

@Component({
selector: "la-annotation-menu",
Expand All @@ -22,6 +23,7 @@ import { AnnotationCommentsComponent } from "../annotation-comments/annotation-c
AnnotationParseResultsComponent,
TableauSVG,
AnnotationCommentsComponent,
NoDataComponent,
],
templateUrl: "./annotation-menu.component.html",
styleUrl: "./annotation-menu.component.scss",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ <h2 ngbAccordionHeader>
</div>
</div>
} @empty {
<div class="mt-3">
<i class="text-muted" i18n>No parse results to display yet. Press the 'Parse and Prove' button to see the parse results.</i>
</div>
<la-no-data dataType="parse" />
}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { NgbAccordionModule } from "@ng-bootstrap/ng-bootstrap";
import { map } from "rxjs";
import { CommonModule } from "@angular/common";
import { CCGNode, CCGParse } from "@/types";
import { NoDataComponent } from "@/shared/no-data/no-data.component";

export interface TreeWithType {
type: string;
Expand Down Expand Up @@ -35,7 +36,12 @@ function unfoldParseResult(parse: CCGParse): UnfoldedParseResult {
@Component({
selector: "la-annotation-parse-results",
standalone: true,
imports: [ParseTreeTableComponent, NgbAccordionModule, CommonModule],
imports: [
ParseTreeTableComponent,
NgbAccordionModule,
CommonModule,
NoDataComponent,
],
templateUrl: "./annotation-parse-results.component.html",
styleUrl: "./annotation-parse-results.component.scss",
})
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/app/shared/no-data/no-data.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@let noDataType = dataType();

<i class="text-muted" i18n>
No {{ noDataType }} results to display yet. Press the 'Parse and Prove'
button to see the {{ noDataType }} results.
</i>
Empty file.
25 changes: 25 additions & 0 deletions frontend/src/app/shared/no-data/no-data.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { NoDataComponent } from './no-data.component';

describe('NoDataComponent', () => {
let component: NoDataComponent;
let fixture: ComponentFixture<NoDataComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [NoDataComponent]
})
.compileComponents();

fixture = TestBed.createComponent(NoDataComponent);
component = fixture.componentInstance;
const componentRef = fixture.componentRef;
componentRef.setInput("dataType", "parse");
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
11 changes: 11 additions & 0 deletions frontend/src/app/shared/no-data/no-data.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Component, input } from '@angular/core';

@Component({
selector: 'la-no-data',
templateUrl: './no-data.component.html',
styleUrl: './no-data.component.scss',
standalone: true,
})
export class NoDataComponent {
public readonly dataType = input.required<'parse' | 'proof'>();
}
Loading