Fix/settings declarative render - #15
Merged
Merged
Conversation
Obsidian 1.13 renders a settings tab declaratively and skips display() whenever getSettingDefinitions() returns a non-empty array. The previous text-only definitions left the page without any controls on 1.13+. Provide full declarative definitions instead: simple values bind through getControlValue/setControlValue with the same persistence and side effects as before, while rows needing custom validation or rich components (CLI path, max tabs, placement, nav mappings, !bash, command/ skill, agent, MCP and plugin managers) use render callbacks sharing the imperative builders. Content injected into group lists is deferred to a microtask because the declarative renderer reconciles group.listEl synchronously after each render callback. display() is kept as the fallback for Obsidian versions older than 1.13.0.
CI rejects eslint-disable directives for obsidianmd/no-unsupported-api. Replace the disable block with the rule's sanctioned requireApiVersion() guards: getControlValue/setControlValue bodies and the SettingGroup.listEl access (now centralized in deferIntoList) are wrapped in version checks. No directive comments remain in the settings feature.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
npm run typechecknpm run lintnpm run testnpm run buildnpm run release:checknpm run audit:prodSafety
CHANGELOG.md