Skip to content

Decide FileTreeNode public API surface for consumers #13

Description

@veganstraightedge
  • What properties are exposed to consumers? The closures for `onFileSelect`, `onFileOpen`, `.rowContent`, `.contextMenu` all receive some representation of a node. Is it just a `URL`, or a richer type with properties like `isFolder`, `name`, `sourceControlStatus`, `isOpen`, `isModified`, `depth`?
  • Should consumers get a `FileTreeNode` or a simpler `FileTreeItem` protocol/struct? Exposing the full `@Observable` node risks consumers mutating internal state. A read-only snapshot or protocol might be safer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions