Open Apollo3zehn opened 10 months ago
Hey Apollo3zehn, Thanks for your note—also sorry I didn't get back to you sooner. School has been hitting me hard this term, but now it's almost spring break! :)
First, I really like your foam feature. That seems like it would be very helpful (one of the reasons I switch back into the Logseq program is to view backlinks in a nice UI like that).
Up to this point I had not put much thought into how to keep Loam up-to-date with the upstream Foam. Early on, I (perhaps naively) did a search-and-replace of all instances of "Foam" with "Loam throughout the whole codebase. This effectively changed the name of the plugin completely, but also will probably make it difficult to pull in updates from Foam. (This is also the first fork I've tried to maintain, so maybe there's an easy way to do this that I just don't know about.)
I had not previously considered upstreaming my improvements to Foam, but now I'm wondering if that might be a good idea. Most of my changes could be added behind a config setting, and would result in Foam itself becoming more Logseq-compatible.
I'm not sure, I'll have to give this more thought. Thanks for the prodding!
-Cicero
Perhaps turning Loam into a "Logseq Compatibility Mode" for Foam would be beneficial. Merging with Foam would also open the door for other contributions, making the maintenance easier as it would be part of the primary Foam repository.
Ok, so after giving it some thought, I think I'm going to keep Loam separate from Foam, but I will make sure it's set up to allow for easily pulling in updates from upstream. (meaning renaming most of the internal references back to "foam", while leaving the user-facing references as "loam" - see #24)
If either of you have advice or suggestions, though, I'd love to hear them. I don't have a lot of experience maintaining a fork, so any input is welcome.
Also, @Apollo3zehn, if Foam doesn't want to implement your backlinks feature upstream, I'd love to get it pulled into loam :)
Hi @CiceroIsBack, thanks for your feedback! In the meantime since January I was working on a separate VSCode extension because I had the need for features like TODO management and an overview for project related Gitlab/GitHub issues, as well as project related Outlook E-mails, which Foam/Loam do not offer. So what I am trying to say is that I am now focused more on my custom solution (https://github.com/Apollo3zehn/cortex-notes - not yet released and documentation about the required configuration file and anything else is missing but it is working well for me).
However, if you like my proposed backlinks view, here is a good overview of my changes so it would be easy to copy them over to this project: https://github.com/foambubble/foam/compare/master...Apollo3zehn:foam:master
@CiceroIsBack I imagine a workflow would need to be created to resolve merge conflicts, correct?
@Apollo3zehn oh, that sounds like a neat project! Good luck on your endeavors, and I will definitely take a look at your changes.
@slashtechno good thinking. I did a merge last night that pulled loam up to foam's version with pretty minimal pain, but it would be good to have some docs written explaining how that process works. I'll make an issue so I remember to do that next time I merge them.
If you write the docs, I might be able to make a GitHub workflow so the merge doesn't need to repeatedly be done manually.
Another option might be to make it an extension of Foam. I recall there being talk within the Foam community to allow for extensions that extend Foam, itself. The core team is super easy to work with, so it would probably be doable to reach out to them for help exposing whatever hooks you'd need to make that work.
That would allow you to not have to worry about maintaining the main Foam code, itself, or keeping it in sync, and you can focus on the Logseq piece. It also keeps Foam to its paradigm of being rather minimal to support the core of second brain stuff, and paves the way for other Foam extensions.
Hey @ShaunaGordon , thanks for your suggestion! I am definitely interested in the idea of turning loam into a foam extension, especially for labor saving purposes.
Do you by chance remember where that previous conversation about extensions took place? I would like to find that as a starting point before jumping in.
Conversation for it is a little all over, though there is a milestone for it, and the Discord server has some conversation on it. Riccardo has been the main one working on it, I think, and he's really responsive and open to anyone to help refine the API through building extensions like what this could be.
Hi, thanks for your efforts to make Foam more Logseq friendly. I have similar needs and I am glad I found this repo.
However I am wondering on how this repo will keep up with Foam development. One way would be to regularly rebase on Foam master - but maybe a more sustainable approach would be to upstream your improvements back to Foam? Do you think that would make sense or did you already rule that out?
I am working on a Foam feature to quickly peek into all backlinks. I.e. a new readonly editor opens and displays the lines of all files that reference the current wiki note + a few surrounding lines for more context. When positioned under the current note, it is very similar to what LogSeq does with its "x linked references" in the bottom note area. Currently a fixed number of context lines around the reference are shown, but it would be quite easy to make this more dynamically to show the current LogSeq block. I will soon try to contribute this to Foam (if they think its useful) and then it would become available in Loam, too. Or if Foam people don't like it, maybe we can directly integrate it here, into Loam. I don't know, just wanted to share my thoughts :-)
Thank you! Apollo3zehn