Skip to content

refactor(settings): replace Obsidian 1.13 compatibility hotfix #100

Description

@ClaudiaFang

Context

Issue #98 was fixed by PR #99 with a compatibility adapter that returns an empty getSettingDefinitions() result, keeping the existing imperative display() lifecycle active on Obsidian 1.13+.

This is intentionally a hotfix. The settings implementation should be cleaned up so the compatibility behavior is explicit, testable, and no longer depends on the temporary module split.

Improvement plan

  • Remove the temporary settings.ts / settings-implementation.ts adapter split.
  • Decide on one supported lifecycle:
    • keep the imperative display() implementation and remove the declarative compatibility method entirely, or
    • fully migrate the settings UI to Obsidian's declarative settings API.
  • Make refresh behavior explicit for provider and language changes instead of relying on inherited update() behavior.
  • Add regression coverage for:
    • initial rendering on Obsidian 1.13+;
    • refresh after provider changes;
    • refresh after language changes;
    • reopening the settings tab;
    • compatibility with the oldest supported Obsidian version.
  • Improve the Obsidian Setting test mock so DOM assertions can distinguish framework markup from plugin-owned markup.
  • Document the supported Obsidian version range and settings API strategy.

Acceptance criteria

  • The settings page renders and refreshes correctly on all supported Obsidian versions.
  • No temporary compatibility adapter or duplicated settings module remains.
  • Lifecycle and refresh behavior are covered by regression tests.
  • pnpm test, pnpm lint, and pnpm build pass.

Follow-up to #98 and PR #99.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions