v0.1.3: address ObsidianReviewBot follow-up findings

- main.ts: await revealLeaf() calls in activateView (promises-must-await)
- settings.ts: remove "General" heading (Obsidian guideline)
- settings.ts / bucketComponent.ts / taskView.ts: sentence-case fixes
  (lowercase mid-sentence labels, drop "+" from button text, lowercase
  example placeholders)
- taskView.ts: drop unused async on onOpen() and return Promise.resolve()
  explicitly (async-method-no-await)
This commit is contained in:
Art Malanok 2026-04-21 16:01:58 -07:00
parent c58cdf5638
commit e69a0bc2cd
7 changed files with 15 additions and 14 deletions

View file

@ -1,7 +1,7 @@
{
"id": "minimal-task-board",
"name": "Minimal Task Board",
"version": "0.1.2",
"version": "0.1.3",
"minAppVersion": "1.10.0",
"description": "A clean, minimal task board with customizable buckets, secondary grouping, and inline task tracking.",
"author": "Art Malanok",

View file

@ -1,6 +1,6 @@
{
"name": "minimal-task-board",
"version": "0.1.2",
"version": "0.1.3",
"private": true,
"scripts": {
"build": "node esbuild.config.mjs",

View file

@ -116,7 +116,7 @@ export default class TasksPlugin extends Plugin {
private async activateView(): Promise<void> {
const existing = this.app.workspace.getLeavesOfType(TASKS_VIEW_TYPE);
if (existing.length > 0) {
this.app.workspace.revealLeaf(existing[0]);
await this.app.workspace.revealLeaf(existing[0]);
return;
}
@ -125,7 +125,7 @@ export default class TasksPlugin extends Plugin {
type: TASKS_VIEW_TYPE,
active: true,
});
this.app.workspace.revealLeaf(leaf);
await this.app.workspace.revealLeaf(leaf);
}
async loadSettings(): Promise<void> {

View file

@ -18,8 +18,6 @@ export class TasksSettingTab extends PluginSettingTab {
const { containerEl } = this;
containerEl.empty();
new Setting(containerEl).setName("General").setHeading();
new Setting(containerEl)
.setName("Task folder")
.setDesc("Vault folder where task notes are stored.")
@ -73,7 +71,7 @@ export class TasksSettingTab extends PluginSettingTab {
const newValue = value.toLowerCase().trim();
if (newValue !== this.plugin.settings.bucketProperty) {
new Notice(
"Changing the bucket property will affect how tasks are grouped. Existing tasks may appear in 'Unclassified' until their frontmatter is updated."
"Changing the bucket property will affect how tasks are grouped. Existing tasks may appear in 'unclassified' until their frontmatter is updated."
);
}
this.plugin.settings.bucketProperty = newValue;
@ -172,7 +170,7 @@ export class TasksSettingTab extends PluginSettingTab {
});
const addBtn = bucketSection.createEl("button", {
text: "+ Add bucket",
text: "Add bucket",
cls: "tasks-bucket-add-btn",
});
addBtn.addEventListener("click", () => {
@ -331,11 +329,11 @@ export class TasksSettingTab extends PluginSettingTab {
new Setting(containerEl).setName("Getting started").setHeading();
containerEl.createEl("p", {
text: "Add #task to any checkbox in your notes: - [ ] Do something #task",
text: "Add #task to any checkbox in your notes: - [ ] do something #task",
cls: "setting-item-description",
});
containerEl.createEl("p", {
text: "Use [[GroupName]] to organize by the secondary grouping property.",
text: "Use [[group name]] to organize by the secondary grouping property.",
cls: "setting-item-description",
});
containerEl.createEl("p", {

View file

@ -69,7 +69,7 @@ export function createBucket(
// Add task button
const addBtn = document.createElement("div");
addBtn.className = `${CLS}-bucket-add`;
addBtn.textContent = "+ Add a task";
addBtn.textContent = "Add a task";
addBtn.addEventListener("click", () => {
callbacks.onAddTask(group.bucket.name);
});

View file

@ -63,7 +63,7 @@ export class TaskView extends ItemView {
return "square-check-big";
}
async onOpen(): Promise<void> {
onOpen(): Promise<void> {
const { contentEl } = this;
contentEl.empty();
@ -105,6 +105,8 @@ export class TaskView extends ItemView {
this.renderView(contentArea);
}, 300);
});
return Promise.resolve();
}
private setMode(mode: "focus" | "board"): void {
@ -151,7 +153,7 @@ export class TaskView extends ItemView {
emptyState.appendChild(hint1);
const hint2 = document.createElement("div");
hint2.className = `${CLS}-empty-hint`;
hint2.textContent = "Example: - [ ] Send report [[Project Alpha]] #task";
hint2.textContent = "Example: - [ ] send report [[project alpha]] #task";
emptyState.appendChild(hint2);
contentArea.appendChild(emptyState);
return;

View file

@ -1,5 +1,6 @@
{
"0.1.0": "1.10.0",
"0.1.1": "1.10.0",
"0.1.2": "1.10.0"
"0.1.2": "1.10.0",
"0.1.3": "1.10.0"
}