Skip to content

Commit

Permalink
Merge pull request #870 from trey-wallis/dev
Browse files Browse the repository at this point in the history
fix: resolve build errors
  • Loading branch information
decaf-dev authored Nov 25, 2023
2 parents 1e2dfa6 + 053cebc commit 9732220
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 58 deletions.
90 changes: 45 additions & 45 deletions src/data/serialize-frontmatter.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
createColumn,
createDateCell,
// createDateCell,
createFolderSource,
createGenericLoomState,
createMultiTagCell,
Expand Down Expand Up @@ -98,50 +98,50 @@ describe("serializeFrontmatter", () => {
return state;
};

/**
* Returns a 3x2 state with a source column, source file column, and date column
* - date cell 0 - "2020-12-31T22:00:00Z"
* - date cell 1 - "2020-12-31T23:00:00Z"
* @param frontmatterKey - The frontmatter key to use in the date column
*/
const generateStateWithDateColumn = (frontmatterKey: string | null) => {
//Arrange
const columns: Column[] = [
createColumn({ type: CellType.SOURCE }),
createColumn({ type: CellType.SOURCE_FILE }),
createColumn({
type: CellType.DATE,
includeTime: true,
frontmatterKey,
}),
];
const sources: Source[] = [createFolderSource("test", false)];

const rows: Row[] = [
createRow(0, {
sourceId: sources[0].id,
cells: [
createSourceCell(columns[0].id),
createSourceFileCell(columns[1].id),
createDateCell(columns[2].id, {
dateTime: "2020-12-31T22:00:00Z",
}),
],
}),
createRow(1, {
sourceId: sources[0].id,
cells: [
createSourceCell(columns[0].id),
createSourceFileCell(columns[1].id),
createDateCell(columns[2].id, {
dateTime: "2020-12-31T23:00:00Z",
}),
],
}),
];
const state = createGenericLoomState({ columns, rows, sources });
return state;
};
// /**
// * Returns a 3x2 state with a source column, source file column, and date column
// * - date cell 0 - "2020-12-31T22:00:00Z"
// * - date cell 1 - "2020-12-31T23:00:00Z"
// * @param frontmatterKey - The frontmatter key to use in the date column
// */
// const generateStateWithDateColumn = (frontmatterKey: string | null) => {
// //Arrange
// const columns: Column[] = [
// createColumn({ type: CellType.SOURCE }),
// createColumn({ type: CellType.SOURCE_FILE }),
// createColumn({
// type: CellType.DATE,
// includeTime: true,
// frontmatterKey,
// }),
// ];
// const sources: Source[] = [createFolderSource("test", false)];

// const rows: Row[] = [
// createRow(0, {
// sourceId: sources[0].id,
// cells: [
// createSourceCell(columns[0].id),
// createSourceFileCell(columns[1].id),
// createDateCell(columns[2].id, {
// dateTime: "2020-12-31T22:00:00Z",
// }),
// ],
// }),
// createRow(1, {
// sourceId: sources[0].id,
// cells: [
// createSourceCell(columns[0].id),
// createSourceFileCell(columns[1].id),
// createDateCell(columns[2].id, {
// dateTime: "2020-12-31T23:00:00Z",
// }),
// ],
// }),
// ];
// const state = createGenericLoomState({ columns, rows, sources });
// return state;
// };

/**
* Returns a 3x2 state with a source column, source file column, and tag column
Expand Down
12 changes: 0 additions & 12 deletions src/shared/frontmatter/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
import { App } from "obsidian";
import { deserializeFrontmatterForCell } from ".";
import {
CellType,
DateCell,
MultiTagCell,
NumberCell,
TagCell,
TextCell,
} from "../loom-state/types/loom-state";
import { createLoomState } from "../loom-state/loom-state-factory";

describe("deserializeFrontmatter", () => {
it("deserializes text content", () => {});
//TODO fix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { dateTimeToDateString } from "src/shared/date/date-time-conversion";
import { isNumber } from "src/shared/match";
import { parseDateTime } from "src/shared/date/date-validation";
import { cloneDeep } from "lodash";
import { filterUniqueStrings } from "src/react/loom-app/text-cell-edit/utils";

export default class ColumnTypeUpdateCommand extends LoomStateCommand {
private targetColumnId: string;
Expand Down

0 comments on commit 9732220

Please sign in to comment.