Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f6997c7
ENG-2084 Add schema import UI for Obsidian
trangdoan982 Jul 29, 2026
035acba
ENG-2084 Inline Modal boilerplate in ImportSpecsModal (remove ReactRo…
trangdoan982 Jul 29, 2026
07175f5
ENG-2084 Show human-readable error when schema file fails Zod validation
trangdoan982 Jul 29, 2026
a44a5fa
ENG-2084 Remove console.error (violates Obsidian plugin guidelines)
trangdoan982 Jul 30, 2026
b3ea082
ENG-2084 Remove emptyTemplateText/beforePanel props; compose ImportSc…
trangdoan982 Jul 30, 2026
0c01d85
ENG-2084 Address review: simplify ImportSpecsModal constructor, use S…
trangdoan982 Jul 30, 2026
50644ea
ENG-2084 Remove useMemo from source — schema file is stable for compo…
trangdoan982 Jul 30, 2026
8f2f33f
ENG-2084 Use onWarning callback in applySchemaImportSelection
trangdoan982 Jul 30, 2026
b8c28be
ENG-2084 Drop schema import entry from settings
trangdoan982 Jul 30, 2026
2220b15
ENG-2084 Reset applying flag only on the failure path
trangdoan982 Jul 30, 2026
16675f1
ENG-2084 Add useSchemaMergePlan for per-field import choices
trangdoan982 Aug 24, 2026
3c7e23d
ENG-2084 Add the field choice step
trangdoan982 Aug 24, 2026
02bd089
ENG-2084 Add optional item notes to SchemaSelectionPanel
trangdoan982 Aug 24, 2026
44c802b
ENG-2084 Wire the field choice step into the import modal
trangdoan982 Aug 24, 2026
8d70d4c
ENG-2084 Trim comments to the non-obvious why
trangdoan982 Aug 25, 2026
bea02b5
ENG-2084 Separate the vault name from the bulk-control label
trangdoan982 Aug 25, 2026
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
59 changes: 59 additions & 0 deletions apps/obsidian/src/components/ImportSchemaPreviewSummary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import type { ImportPreviewStats, LoadedSchemaFile } from "~/utils/specImport";

export const ImportSchemaPreviewSummary = ({
loadedSchemaFile,
previewStats,
}: {
loadedSchemaFile: LoadedSchemaFile;
previewStats: ImportPreviewStats;
}) => {
return (
<>
<div className="mb-4 rounded border p-3 text-sm">
<div className="font-medium">Schema file metadata</div>
<div className="text-muted mt-1">
Vault:{" "}
<span className="font-medium">
{loadedSchemaFile.schemaFile.vaultName}
</span>
</div>
<div className="text-muted">
Exported at:{" "}
<span className="font-medium">
{loadedSchemaFile.schemaFile.exportedAt}
</span>
</div>
<div className="text-muted">
Plugin version:{" "}
<span className="font-medium">
{loadedSchemaFile.schemaFile.pluginVersion}
</span>
</div>
</div>

<div className="mb-4 rounded border p-3 text-sm">
<div className="font-medium">Preview (full schema file)</div>
<div className="text-muted mt-1">
Node types: {previewStats.nodeTypes.total} total (
{previewStats.nodeTypes.new} new, {previewStats.nodeTypes.existing}{" "}
existing)
</div>
<div className="text-muted">
Relation types: {previewStats.relationTypes.total} total (
{previewStats.relationTypes.new} new,{" "}
{previewStats.relationTypes.existing} existing)
</div>
<div className="text-muted">
Relation triples: {previewStats.discourseRelations.total} total (
{previewStats.discourseRelations.new} new,{" "}
{previewStats.discourseRelations.existing} existing)
</div>
<div className="text-muted">
Templates: {previewStats.templates.total} total (
{previewStats.templates.new} new, {previewStats.templates.existing}{" "}
existing)
</div>
</div>
</>
);
};
Loading