pjeby / hot-reload

Automatically reload Obsidian plugins in development when their files are changed
ISC License
496 stars 23 forks source link

Add setting to disable reload Notice #2

Open jmilldotdev opened 2 years ago

jmilldotdev commented 2 years ago

Hello,

It would be nice if this plugin exposed a setting which allowed you to disable the Notice that is sent on reload. This notice covers the right drawer and makes development on plugins with ItemView a bit painful.

pjeby commented 2 years ago

I'm confused. On my machine the notice disappears quickly, often before I've even switched back to the window where Obsidian is running. It was added to provide a visual indicator that the reload occurred, without needing to check the debug console.

So I'm confused about how this relates to ItemView or the right drawer, especially since you can also just click the notice to make it go away.

Are you developing on mobile perhaps? Is it different than on the desktop in this respect?

jmilldotdev commented 2 years ago

No, I'm developing on Desktop

image

image

The notice covers the icons in the top of the right drawer, and takes a couple of seconds or a second click to make it go away. All I'm suggesting is that it would be nice if there were a settings tab for the plugin with a toggle to display or not display the message which defaults to true.

No change in functionality and a user can disable it if they find it fits their workflow, like I did while I was working on this project

pjeby commented 2 years ago

If you drag the view in question downward in the drawer, it'll create a new split, and the notice won't overlay it. I'll consider the setting, but it's unlikely to be implemented soon. An alternative workaround would be to just comment out the Notice line in your installed version's main.js.

jmilldotdev commented 2 years ago

Yeah, this is obviously a non-urgent suggestion. Your fix there is what I ended up doing, and I actually added the setting myself. I can PR it in if you're open to the suggestion