foambubble / foam

A personal knowledge management and sharing system for VSCode
https://foambubble.github.io/
Other
15.28k stars 650 forks source link

Rename placeholder on note creation #1344

Closed riccardoferretti closed 6 months ago

riccardoferretti commented 6 months ago

This PR fixes #1327

Passing to the create-note command a source link, in which case it will check whether, once the note has been created (possibly using a template that changed the name of the original placeholder), the name of the new note matches the originating link - and if not updates it.

I made a conscious decision here to only update the source link, and not all placeholders that match the source link. Happy to have a conversation about that, for now it felt better this way.

Oh yeah, and I was playing with some logging stuff (minor)

ashtuchkin commented 6 months ago

The editor is super slow after this change for me (specifically v0.25.9), looks like it's recalculating the orphans and other stuff after every change, see this video: https://github.com/foambubble/foam/assets/627997/0f30182f-65c4-4d47-9811-ae665fc4a93f

I've checked that this doesn't happen in 0.25.8.

riccardoferretti commented 6 months ago

Thanks for reporting this, it's related to one of the side changes, pushing a fix now :)

riccardoferretti commented 6 months ago

v0.25.10 should fix this

ashtuchkin commented 6 months ago

Thank you!