obsidianmd / obsidianmd/obsidian-developer-docs

[obsidian.d.ts] Add information for View/FileView members

Open Beginner friendly
#208 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
521
Forks
174
PR merge metrics
No merged PRs in 30d

Description

This issue is an ask to add additional information to the FileView type in obsidian.d.ts, as well as some suggestions for what content to add.

View

contentEl

Current signature, and suggested edit:

/**
 * The HTML container for this view.
 * Rendered content should be added as a child of this element.
 * @public
 * @since 0.9.7
 */
containerEl: HTMLElement;
onOpen()

Current signature, and suggested edit:

/**
 * Called once after a new {@link View} instance is created.
 * The {@link View.contentEl} property should be contributed to at this point.
 * @public
 * @since 0.9.7
 */
protected onOpen(): Promise<void>;

FileView

file

Current signature, and suggested edit:

/**
 * The file currently loaded for this view.
 * May be null if no file has yet been loaded.
 * This property will be updated before {@link onLoadFile} is called when a new file is loaded.
 * @public
 */
file: TFile | null;
onLoadFile()

Current signature, and suggested edit:

/**
 * Called when opening a file in this view.
 * This may be called multiple times for the same {@link FileView} instance, such as when opening a new file in the same {@link WorkspaceLeaf}.
 * @param {TFile} file - The newly loaded file
 * @public
 */
onLoadFile(file: TFile): Promise<void>;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open obsidian.d.ts and inspect the View and FileView declarations at the linked member locations. Compare contentEl, onOpen, file, and onLoadFile with the suggested documentation and signatures. Done means these members contain the requested API information and type details.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.