Skip to content

Commit ffc9c0f

Browse files
committed
PR feedback
1 parent 54ba3af commit ffc9c0f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

frontend/viewer/src/lib/views/view-service.svelte.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ export function hasVisibleFields(fields: TypedViewField<FieldId>[]): boolean {
7272
}
7373

7474
/**
75-
* Each visible field becomes one CSS grid-template-areas row: `"<fieldId> <fieldId> <fieldId>"`
75+
* Returns a string that can be used as a grid-template-areas value for a grid with the given fields, ordered based on the current view.
76+
* looks like `"lexemeForm lexemeForm lexemeForm" "citationForm citationForm citationForm" "literalMeaning literalMeaning literalMeaning"` etc. each group of fields in quotes is a row.
77+
* there are 3 columns for each row and one field per row so the field name is repeated 3 times.
7678
*/
7779
export function objectTemplateAreas(fields: TypedViewField<FieldId>[]): string {
7880
return fields

frontend/viewer/src/project/data/writing-system-service.svelte.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ export class WritingSystemService {
7777
}
7878

7979
viewAnalysis(view: View) {
80-
return this.filterAndSortWs(this.analysis, view?.analysis);
80+
return this.filterWs(this.analysis, view?.analysis);
8181
}
8282

8383
viewVernacular(view: View) {
84-
return this.filterAndSortWs(this.vernacular, view?.vernacular);
84+
return this.filterWs(this.vernacular, view?.vernacular);
8585
}
8686

87-
filterAndSortWs(writingSystems: IWritingSystem[], override?: IViewWritingSystem[]) {
87+
filterWs(writingSystems: IWritingSystem[], override?: IViewWritingSystem[]) {
8888
if (!override) return writingSystems;
8989
return writingSystems.filter(ws => override.find(_ws => _ws.wsId === ws.wsId));
9090
}

0 commit comments

Comments
 (0)