konodyuk / obsidian-typing

Programmatic customizations for groups of notes
https://konodyuk.github.io/obsidian-typing/
MIT License
134 stars 8 forks source link

Endless Icon Insertion at the Top of the File's Window #22

Closed bezoro closed 2 months ago

bezoro commented 3 months ago

The plugin is incorrectly adding multiple icons at the top of the file's window. As shown in the attached screenshot. The more times I switch between editing and reading modes the more icons are inserted at the top.

v0.3.7

export-0001

ArlonSwaders commented 2 months ago

Hi all,

I found that the issue comes from: https://github.com/konodyuk/obsidian-typing/blob/549f9779a45d1645af3cee2e91c6d1bca9720713/src/middleware/title_bar.tsx#L22

The condition is trying to match an a element with a viewActions class and aria-label="Actions". However, this does not match, since the elements in the viewActions are of type button. At least, in my version of Obsidian (v1.6.7). image

Changing a to button seems to fix the problem for me. To verify that, I made the change in .obsidian\plugins\typing\main.js on line 163363 of the installed plugin.

@konodyuk I'm more than happy to open a PR for that fix. Do you have specific guidelines on how-to contribute?

konodyuk commented 2 months ago

@ArlonSwaders thank you for your time to figure out this issue! at the moment i have no time at all to handle even critical issues, so if you happen to feel like contributing something else or know someone else who wants, i'll be more than happy and can provide some dev docs and try to create a roadmap

ArlonSwaders commented 2 months ago

@konodyuk Thank you for merging my PR. I'd definitely be open to contribute more. I really like your approach and have been using it in my project for a while. That being said, I'm not a very familiar with typescript and am still learning it. Therefore, I might not be able to do big contributions yet.

I'd be more than happy to help out and try to fix issues when I come across them. I'm using the docs hosted at https://konodyuk.github.io/obsidian-typing. If you have any more documentation, I'd would be great if you could share them.

Thanks again, and see you on the next PR 😉