MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / LegacySettingGroup

Class LegacySettingGroup

src/settings/components/settingHelpers.ts:81–103  ·  view source on GitHub ↗

* Legacy fallback that mimics SettingGroup API for Obsidian < 1.11.0 * Uses the old pattern of section headers and individual settings

Source from the content-addressed store, hash-verified

79 * Uses the old pattern of section headers and individual settings
80 */
81class LegacySettingGroup {
82 private containerEl: HTMLElement;
83
84 constructor(containerEl: HTMLElement) {
85 this.containerEl = containerEl;
86 }
87
88 setHeading(text: string | DocumentFragment): this {
89 new Setting(this.containerEl).setName(text).setHeading();
90 return this;
91 }
92
93 addClass(_cls: string): this {
94 // No-op for legacy - classes were not applied to groups
95 return this;
96 }
97
98 addSetting(cb: (setting: Setting) => void): this {
99 const setting = new Setting(this.containerEl);
100 cb(setting);
101 return this;
102 }
103}
104
105interface SettingGroupLike {
106 setHeading(text: string | DocumentFragment): this;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected