Enhance Editor File API Docs with pinned state features#65
Enhance Editor File API Docs with pinned state features#65UnschooledGamer wants to merge 5 commits intoAcode-Foundation:mainfrom
Conversation
Added pinned state functionality and updated remove method options.
Greptile SummaryThis PR documents the new pinned-tab feature for the Editor File API. It adds Key findings:
Confidence Score: 3/5The typo 'editorManger' will cause plugin developers to silently miss events; should be fixed before publishing. One P1 issue (the 'editorManger' typo will cause real broken behavior in any plugin that copies the event listener example verbatim) and three P2 style/convention issues keep the score below 5. Functional scope is documentation only, but documentation correctness is the entire purpose of this PR. docs/editor-components/editor-file.md — typo in event name, broken anchors, and inconsistent/incomplete code examples all need attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Plugin
participant EditorFile
participant EditorManager
Plugin->>EditorFile: file.setPinnedState(true, { reorder: true, emit: true })
EditorFile->>EditorFile: Update internal pinned state
EditorFile->>EditorFile: Reorder tabs (if reorder=true)
EditorFile->>EditorManager: emit("update", "pin-tab", file)
EditorManager-->>Plugin: on("update", (action, file) => ...)
Plugin->>EditorFile: file.togglePinned()
EditorFile->>EditorFile: Invert pinned state
EditorFile->>EditorManager: emit("update", "pin-tab", file)
Plugin->>EditorFile: file.remove(false, { ignorePinned: true })
EditorFile->>EditorFile: Bypass pinned check, close tab
EditorFile->>EditorManager: emit close event
Plugin->>EditorFile: file.remove(false, { silentPinned: true })
EditorFile->>EditorFile: Suppress toast, close tab
EditorFile->>EditorManager: emit close event
Reviews (1): Last reviewed commit: "Enhance Editor File API with pinned stat..." | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Added pinned state functionality and updated the remove method options.