-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse notebook properties and allow linking to notebooks #442
Parse notebook properties and allow linking to notebooks #442
Conversation
848db12
to
7555252
Compare
7555252
to
4fca46f
Compare
4fca46f
to
164a837
Compare
Great! I use org-roam extensively and would like to test as well. Is there an APK I can test? |
Soon. I need to correct a few things, but some real testing would be great. I'll ping you! |
8eaae1d
to
1ab34bf
Compare
@credmp F-droid and Play Store test APKs can be downloaded from the bottom of this page: https://github.com/orgzly-revived/orgzly-android-revived/actions/runs/12510540561 |
1ab34bf
to
d090034
Compare
Thanks! Initial comment, on a store with existing notebooks the app instantly closes. Removed the data and did a clean install, it opens then. Will report back when I have my existing repo hooked up again. |
@credmp Sounds like potentially an issue with the database migration script. Big thanks for reporting -- I'll do some manual testing as well. |
After reloading my notebooks from scratch, the id links are working beautifully! I will continue testing various scenarios, but so far it works as intended. Would be good to be able to create new IDs in node editing screen. Attachment links seem to be fixed in the other pull request. |
This presupposes orgzly-revived/org-java#6. Linking to notebooks via their "ID" property now works. I did not touch the handling of the preface, so the book properties are visible as part of the preface content. This means they can be shown and edited in Orgzly without changing the current GUI. It feels a bit hacky, but it could be a first, simple implementation of book properties, which I suppose could later be improved by adding a "edit book properties" menu choice, similar to today's "edit preface". Book properties are stored in a separate DB table, just like note properties. They are only parsed and stored when loading books from files and when the preface has been edited.
to prevent collisions if the user mixes upper and lower case. We don't touch the formatting when storing properties. This way, we avoid unnecessary writes if we ever start writing book properties back to files.
d090034
to
13794d4
Compare
I found the problem in the DB migration script. Upgrades seem to work well now. I fixed the main commit and force-pushed. |
@credmp It seems to me like it would be nice to aim for #441: an option toggle to add the "ID" property with a UUID value to all new notes created by Orgzly. This should be pretty easy to implement. The auto-complete feature for linking to existing notes discussed in #441 also sounds really nice, but I suspect it's slightly more work. |
New test APK available here. Install on your own risk -- not guaranteed to play nice with future app updates. |
Also tested heading based ids, works very nicely! Great work!
[will x-post this to the issue] |
Thanks, that's very useful input, as I don't use roam myself. |
Additional not on linking to headings: it currently follows the link to the edit screen of the heading, perhaps it is better to jump to the heading in the reading screen to see it in context? |
That makes a lot of sense, but this behavior was not touched here, so it should be a separate enhancement. If you'd care to create an issue, that would be great! |
Docs update PR: orgzly-revived/documentation#7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with both notebooks and heading, did not find any issues. Initially I was surprised by the edit screen for the heading link as well. However, the notebook view can be easily accessed from there, so it is not a problem. I agree opening it in the notebook view as for notebook links could be an additional option in the future. 👍
If I understand the problem right, there's already an issue for this in #399. But apparently it's solved by the 'link target' setting in the options, which is named kinda tersely and unintuitively. |
So this linking to notebooks is different from file: links? Because those already work, just fyi. Regarding creating an ID for a heading — perhaps this should be implemented like in Org: an item in the three-dot menu on the edit screen and maybe also in the swipe overlay, that both adds the ID and copies the link to the clipboard, preferably in full Org syntax. (Still idk if Org has a function that does all this together, but I hacked one for myself by calling |
Yes, I should have named it "allow linking to notes by ID".
So far there is only (in 1.8.36) the toggle to add IDs to all new notes. But check #441 for some more discussed ideas. It's partly what you describe, but the clipboard thing sounds good to me, unless we risk replacing clipboard contents in an unexpected way. |
Happy holidays to all org-roam users. :)
I am working on some tests, but I want to get feedback on this as early as possible,
so I'll probably add those in a separate PR.