Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c803f07
ENG-2109 Create node search modal with ranked results and preview
trangdoan982 Aug 7, 2026
b321c4a
ENG-2109 Use the search highlight colour for matched substrings
trangdoan982 Aug 8, 2026
d4b8fc8
Keep preview text paired with its file to avoid stale render
trangdoan982 Aug 8, 2026
dafa539
Show node type as a badge and resolve author names from the shared cache
trangdoan982 Aug 8, 2026
39da641
Tighten comments on the node type badge and author name cache
trangdoan982 Aug 9, 2026
2ea117e
Cycle the node type palette and correct author fallbacks
trangdoan982 Aug 9, 2026
abe1dfc
ENG-2109 Navigate results by keyboard from anywhere in the modal
trangdoan982 Aug 9, 2026
08d3da9
ENG-2109 Derive the badge from the title when the node type is gone
trangdoan982 Aug 9, 2026
4376238
ENG-2109 Keep colorUtils out of this change
trangdoan982 Aug 9, 2026
2d61418
ENG-2109 Restore colorUtils byte-for-byte
trangdoan982 Aug 9, 2026
447dd27
ENG-2109 Drop the remaining explanatory comments
trangdoan982 Aug 9, 2026
f3200e1
Clamp the active index while results are being replaced
trangdoan982 Aug 10, 2026
24a3625
ENG-2113 Add footer action bar with open in new tab and split (#1292)
trangdoan982 Aug 18, 2026
470df4f
ENG-2109 Address review: pointer guard, modal sizing utilities
trangdoan982 Aug 18, 2026
e3dafe3
ENG-2110 Add node type filter dropdown menu
trangdoan982 Aug 19, 2026
f398094
ENG-2110 Address review: contain panel keystrokes, swap Select all fo…
trangdoan982 Aug 19, 2026
5bbc1cd
ENG-2110 Drop the unused select-all check state helper
trangdoan982 Aug 20, 2026
bf53409
ENG-2110 Close the filter panel on Escape via a pushed keymap scope
trangdoan982 Aug 20, 2026
354c400
ENG-2111 Add keyboard-only node type filtering with tag chips
trangdoan982 Aug 20, 2026
eda7a34
ENG-2111 Address review: remove chips by id, drop the inline max-width
trangdoan982 Aug 20, 2026
0ec6373
ENG-2111 Keep the caret where a click puts it
trangdoan982 Aug 20, 2026
31ceaf9
ENG-2112 Add sort button with sort dropdown
trangdoan982 Aug 20, 2026
41ba82c
ENG-2112 Mirror Roam's sort menu styling
trangdoan982 Aug 20, 2026
8392a77
ENG-2112 Address review: drive dropdown styling from Obsidian variables
trangdoan982 Aug 20, 2026
b7a106d
ENG-2112 Reduce comments to one line each
trangdoan982 Aug 20, 2026
45b670a
ENG-2112 Migrate the type filter onto SearchDropdown
trangdoan982 Aug 20, 2026
65856ae
ENG-2112 Drop ObsidianIcon and inline setIcon
trangdoan982 Aug 21, 2026
cb88591
ENG-2112 Annotate the frontmatter read instead of asserting it
trangdoan982 Aug 21, 2026
a4c0e6b
ENG-2112 Keep only comments that explain a decision
trangdoan982 Aug 22, 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
74 changes: 74 additions & 0 deletions apps/obsidian/src/components/NodeSearchFooter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { type ReactElement } from "react";
import { getHintKeys, type HintKey } from "~/utils/keyboardHints";

type NodeSearchFooterProps = {
canAct: boolean;
onClose: () => void;
onOpenInNewTab: () => void;
onOpenInSplit: () => void;
};

type FooterActionProps = {
disabled?: boolean;
keys: HintKey[];
label: string;
onClick: () => void;
};

const KeyHints = ({ keys }: { keys: HintKey[] }): ReactElement => (
<>
{getHintKeys(keys).map((symbol) => (
<kbd className="dg-search-footer-key" key={symbol}>
{symbol}
</kbd>
))}
</>
);

const FooterAction = ({
disabled = false,
keys,
label,
onClick,
}: FooterActionProps): ReactElement => (
<button
type="button"
className="prompt-instruction dg-search-footer-action inline-flex h-auto cursor-pointer items-center gap-1 rounded-none border-0 p-0 disabled:cursor-not-allowed disabled:opacity-50"
disabled={disabled}
onClick={onClick}
// Clicking must not move focus out of the query input, or the arrow keys stop
// reaching the result list.
onMouseDown={(event) => event.preventDefault()}
>
<KeyHints keys={keys} />
<span className="ms-1">{label}</span>
</button>
);

// Sits in Obsidian's `prompt-instructions` container for its type and spacing.
// Obsidian centres that row for the narrow quick switcher; this footer spans a
// full-width result list, so the actions start at its left edge instead.
export const NodeSearchFooter = ({
canAct,
onClose,
onOpenInNewTab,
onOpenInSplit,
}: NodeSearchFooterProps): ReactElement => (
<div className="prompt-instructions dg-search-footer shrink-0 justify-start px-0 pb-0 text-left">
<FooterAction
disabled={!canAct}
keys={["Enter"]}
label="open in new tab"
onClick={onOpenInNewTab}
/>
<FooterAction
disabled={!canAct}
keys={["Shift", "Enter"]}
label="open in split"
onClick={onOpenInSplit}
/>
{/* The Escape key itself is handled by Obsidian's modal scope; this button
is the pointer equivalent, so every footer item responds to a click. */}
<FooterAction keys={["Escape"]} label="close" onClick={onClose} />
</div>
);
Loading