From cb3c0440fcd02df68e8b9bfdf70a565a26aafda5 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 2 May 2025 23:41:49 -0700 Subject: [PATCH] address pr feedback --- README.md | 2 +- main.ts | 22 ++++++++++------------ manifest.json | 2 +- versions.json | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3ef891c..ca20d7f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Obsidian Checkbox Sorter 🔄 +# Checkbox Sorter 🔄 Automatically moves completed checkboxes to the bottom of their list group when toggled. Preserves nested list structure while sorting. diff --git a/main.ts b/main.ts index 2d261a4..97cb705 100644 --- a/main.ts +++ b/main.ts @@ -358,7 +358,16 @@ class CheckboxSortSettingTab extends PluginSettingTab { containerEl.empty(); - containerEl.createEl('h2', {text: 'Checkbox Sorter Settings'}); + new Setting(containerEl) + .setName('Enable checkbox sorting globally') + .setDesc('If enabled, clicking checkboxes will sort them within their peer group (unticked first, then ticked). This can be overridden by file frontmatter or list markers later.') + .addToggle(toggle => toggle + .setValue(this.plugin.settings.enableGlobalCheckboxSort) + .onChange(async (value) => { + this.plugin.debugLog('Global sort setting changed:', value); + this.plugin.settings.enableGlobalCheckboxSort = value; + await this.plugin.saveSettings(); + })); new Setting(containerEl) .setName('Enable debug mode') @@ -369,16 +378,5 @@ class CheckboxSortSettingTab extends PluginSettingTab { this.plugin.settings.debugMode = value; await this.plugin.saveSettings(); })); - - new Setting(containerEl) - .setName('Enable Checkbox Sorting Globally') - .setDesc('If enabled, clicking checkboxes will sort them within their peer group (unticked first, then ticked). This can be overridden by file frontmatter or list markers later.') - .addToggle(toggle => toggle - .setValue(this.plugin.settings.enableGlobalCheckboxSort) - .onChange(async (value) => { - this.plugin.debugLog('Global sort setting changed:', value); - this.plugin.settings.enableGlobalCheckboxSort = value; - await this.plugin.saveSettings(); - })); } } diff --git a/manifest.json b/manifest.json index 159cf07..ce78f6f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "checkbox-sort", "name": "Checkbox Sort", - "version": "0.1.1", + "version": "0.1.2", "minAppVersion": "0.15.0", "description": "Automatically moves completed checkboxes to the end of the list", "author": "mattang687", diff --git a/versions.json b/versions.json index 5b86eb9..f188b8d 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,3 @@ { - "0.1.1": "1.8.9" + "0.1.2": "1.8.9" }