Address Obsidian plugin review feedback

This commit is contained in:
Jatin-Shihora 2026-03-26 23:22:23 +05:30
parent 87837c7b2a
commit 2fb33c6722
11 changed files with 18 additions and 45 deletions

View file

@ -1,4 +1,4 @@
Copyright (C) 2020-2025 by Dynalist Inc.
Copyright (C) 2026 by Jatin Shihora
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

View file

@ -14,7 +14,7 @@ const context = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ["main.ts"],
entryPoints: ["src/main.ts"],
bundle: true,
external: [
"obsidian",

View file

@ -6,6 +6,5 @@
"description": "Focus better with lofi vibes and Pomodoro sessions. Stream radio or play your music library, all within your vault.",
"author": "Jatin Shihora",
"authorUrl": "https://github.com/Jatin-Shihora",
"fundingUrl": "https://github.com/Jatin-Shihora/Obsidian-lofi-plugin",
"isDesktopOnly": false
}
}

View file

@ -110,7 +110,7 @@ export default class LofiPlugin extends Plugin {
"Toggle lofi playback",
() => this.togglePlayback()
);
ribbonIconEl.addClass("lofi-plugin-ribbon-icon");
ribbonIconEl.addClass("ribbon-icon");
this.statusBarItemEl = this.addStatusBarItem();
@ -166,32 +166,32 @@ export default class LofiPlugin extends Plugin {
);
this.addCommand({
id: "lofi-plugin-toggle-playback",
id: "toggle-playback",
name: "Toggle lofi playback",
callback: () => this.togglePlayback(),
});
this.addCommand({
id: "lofi-plugin-play-next-track",
id: "play-next-track",
name: "Play next lofi track",
callback: () => this.playNextTrack(),
});
this.addCommand({
id: "lofi-plugin-play-previous-track",
id: "play-previous-track",
name: "Play previous lofi track",
callback: () => this.playPreviousTrack(),
});
this.addCommand({
id: "lofi-plugin-start-timer",
id: "start-timer",
name: "Start focus timer",
callback: () => this.startTimer(),
});
this.addCommand({
id: "lofi-plugin-pause-timer",
id: "pause-timer",
name: "Pause focus timer",
callback: () => this.pauseTimer(),
});
this.addCommand({
id: "lofi-plugin-reset-timer",
id: "reset-timer",
name: "Reset focus timer",
callback: () => this.resetTimer(),
});
@ -705,15 +705,6 @@ export default class LofiPlugin extends Plugin {
private setupAnimationCanvas(): void {
this.animationCanvas = document.createElement("canvas");
this.animationCanvas.setCssProps({
position: "fixed",
top: "0",
left: "0",
width: "100%",
height: "100%",
zIndex: "0",
pointerEvents: "none"
});
this.animationCanvas.classList.add("lofi-animation-canvas");
document.body.appendChild(this.animationCanvas);
this.animationContext = this.animationCanvas.getContext("2d");

View file

@ -31,10 +31,7 @@ export class LofiSettingTab extends PluginSettingTab {
const { containerEl } = this;
containerEl.empty();
new Setting(containerEl).setName("Lofi plugin").setHeading();
new Setting(containerEl).setName("Audio").setHeading();
new Setting(containerEl).setName("Audio source").setHeading();
const streamOptions: Record<string, string> = {};
PREDEFINED_LOFI_STREAMS.forEach((stream) => {
@ -269,7 +266,6 @@ export class LofiSettingTab extends PluginSettingTab {
text: "⬆️ ..",
cls: "lofi-browser-item-name",
});
upButtonEl.setCssProps({ cursor: "pointer" });
upButtonEl.addEventListener("click", () => {
this.navigateUp();
});
@ -295,14 +291,12 @@ export class LofiSettingTab extends PluginSettingTab {
if (child instanceof TFolder) {
iconEl.setText("📁");
itemEl.addClass("lofi-browser-item-folder");
itemEl.setCssProps({ cursor: "pointer" });
itemEl.addEventListener("click", () => {
this.navigateToFolder(child.path);
});
} else if (child instanceof TFile) {
iconEl.setText("📄");
itemEl.addClass("lofi-browser-item-file");
itemEl.setCssProps({ cursor: "default" });
}
}
} catch (error) {
@ -387,7 +381,6 @@ export class LofiSettingTab extends PluginSettingTab {
cls: "lofi-track-name",
});
trackItemEl.addClass("lofi-track-item-clickable");
trackItemEl.setCssProps({ cursor: "pointer" });
trackItemEl.addEventListener("click", () => {
this.plugin.playTrackByPath(trackVaultPath);
this.updateTrackListPlayingState(

View file

@ -148,19 +148,6 @@ If your plugin does not need CSS, delete this file.
/* --- End Styles for the Custom Folder Browser UI --- */
/* You can keep your existing styles for the ribbon icon etc. below this */
.lofi-plugin-ribbon-icon {
/* Add your styles for the ribbon icon here */
/* For example: */
/* fill: purple; */
}
/* Styles for the status bar item if you want to customize it */
/* .status-bar-item { ... } */
/* styles.css (add these below the folder browser styles) */
/* --- Styles for the Track List --- */
.lofi-track-list {
@ -195,6 +182,11 @@ If your plugin does not need CSS, delete this file.
background-color: var(--background-modifier-hover); /* Hover effect */
}
/* Style for clickable track items */
.lofi-track-item-clickable {
cursor: pointer;
}
/* Style for the track name text */
.lofi-track-name {
flex-grow: 1; /* Allow name to take space */
@ -371,10 +363,9 @@ If your plugin does not need CSS, delete this file.
align-items: center;
}
/* --- NEW: Styles for Animation Canvas --- */
/* Styles for Animation Canvas */
.lofi-animation-canvas {
/* Styles are primarily set in main.ts, but defining the class is good practice */
/* These styles ensure it acts as a fixed overlay */
/* Fixed overlay for background animation */
position: fixed;
top: 0;
left: 0;
@ -383,4 +374,3 @@ If your plugin does not need CSS, delete this file.
z-index: 0; /* Or 1, below most Obsidian UI elements */
pointer-events: none; /* Crucial: allows clicks/interaction with UI elements behind the canvas */
}
/* --- END NEW --- */

View file

@ -2,4 +2,4 @@
"1.0.0": "0.15.0",
"1.0.1": "0.15.0",
"1.0.2": "0.15.0"
}
}