(core) Adding UI for timing API

Summary:
Adding new buttons to control the `timing` API and a way to view the results
using virtual table features.

Test Plan: Added new

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4252
This commit is contained in:
Jarosław Sadziński
2024-05-21 18:27:06 +02:00
parent 60423edc17
commit a6ffa6096a
29 changed files with 858 additions and 144 deletions

View File

@@ -22,7 +22,9 @@ export class ClientColumnGetters implements ColumnGetters {
}
public getColGetter(colSpec: Sort.ColSpec): ColumnGetter | null {
const rowModel = this._tableModel.docModel.columns.getRowModel(Sort.getColRef(colSpec));
const rowModel = this._tableModel.docModel.columns.getRowModel(
Sort.getColRef(colSpec) as number /* HACK: for virtual tables */
);
const colId = rowModel.colId();
let getter: ColumnGetter|undefined = this._tableModel.tableData.getRowPropFunc(colId);
if (!getter) { return null; }

View File

@@ -675,7 +675,7 @@ export function createViewSectionRec(this: ViewSectionRec, docModel: DocModel):
// with sharing.
this.activeSortSpec = modelUtil.jsonObservable(this.activeSortJson, (obj: Sort.SortSpec|null) => {
return (obj || []).filter((sortRef: Sort.ColSpec) => {
const colModel = docModel.columns.getRowModel(Sort.getColRef(sortRef));
const colModel = docModel.columns.getRowModel(Sort.getColRef(sortRef) as number /* HACK: for virtual tables */);
return !colModel._isDeleted() && colModel.getRowId();
});
});