MCPcopy
hub / github.com/opentrace/opentrace / HelpDrawer

Function HelpDrawer

ui/src/appComponents/HelpDrawer.tsx:29–157  ·  view source on GitHub ↗
({
  onClose,
  onOpenAddRepo,
  onOpenChat,
  onOpenSettings,
}: HelpDrawerProps)

Source from the content-addressed store, hash-verified

27}
28
29export default function HelpDrawer({
30 onClose,
31 onOpenAddRepo,
32 onOpenChat,
33 onOpenSettings,
34}: HelpDrawerProps) {
35 const panelRef = useRef<HTMLDivElement>(null);
36 const { width: panelWidth, handleMouseDown } = useResizablePanel({
37 storageKey: 'ot_help_drawer_width',
38 defaultWidth: 380,
39 minWidth: 320,
40 maxWidth: 640,
41 side: 'left',
42 panelRef,
43 });
44
45 return (
46 <div
47 ref={panelRef}
48 className="help-drawer"
49 style={
50 { '--help-drawer-width': `${panelWidth}px` } as React.CSSProperties
51 }
52 >
53 <PanelResizeHandle side="left" onMouseDown={handleMouseDown} />
54 <div className="panel-header">
55 <h3>Getting Started</h3>
56 <button className="close-btn" onClick={onClose}>
57 &times;
58 </button>
59 </div>
60
61 <div className="help-content">
62 <section className="help-section">
63 <h4>Graph Navigation</h4>
64 <dl className="help-shortcuts">
65 <dt>Pan</dt>
66 <dd>Click &amp; drag on the canvas</dd>
67 <dt>Zoom</dt>
68 <dd>Scroll wheel or pinch</dd>
69 <dt>Select node</dt>
70 <dd>Click a node</dd>
71 <dt>Deselect</dt>
72 <dd>Click empty canvas</dd>
73 </dl>
74 </section>
75
76 <section className="help-section">
77 <h4>Search &amp; Filtering</h4>
78 <dl className="help-shortcuts">
79 <dt>Search</dt>
80 <dd>Type a node name and press Enter</dd>
81 <dt>Hops</dt>
82 <dd>Control how many connections deep to traverse</dd>
83 <dt>Show All</dt>
84 <dd>Reset search to show the full graph</dd>
85 <dt>Filters</dt>
86 <dd>Toggle node types and communities in the side panels</dd>

Callers

nothing calls this directly

Calls 1

useResizablePanelFunction · 0.90

Tested by

no test coverage detected