Skip to content
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

Properties can be appended and overwritten but not removed #5

Open
FlipH19Switch opened this issue Jun 4, 2024 · 5 comments
Open

Comments

@FlipH19Switch
Copy link

When I move a note into a group, then append/overwrite the note properties, the new group is added correctly as a note property.

Moving the note into a new group and overwriting the note properties will replace the group correctly in the note properties list. If I append the note instead, then both groups will be kept in the properties list instead of only the new group.

But if I remove a note from a group without adding it to a new group, then I append or overwrite the note properties, the properties list is not changed. Any groups that were added before moving the note outside of any groups will remain in the properties list.

@FlipH19Switch
Copy link
Author

FlipH19Switch commented Jun 9, 2024

Update - this issue affects connections between notes in the same way

Edited to add:
This makes it difficult to have the same note in multiple canvases. Appending a note's properties only works to add new property values, and overwriting a note's properties in one canvas will clear any property values that were added in another canvas.

Would it be possible to dynamically update properties like Metadata Menu does for canvases? That could make this plugin the obvious choice over Metadata Menu as this plugin requires no real setup. It could also remove the chance of accidentally selecting overwrite instead of append.

@aarongilly
Copy link
Owner

This is a limitation I realized was baked into my code. If you can help me think through the logistics of how it should work, I'd be happy to have that capability. Here are my hesitancies:

  1. If I get into the business of deleting metadata, I introduce the possibility of catastrophic data loss on the part of the user
  2. If a single note was on multiple canvases, you couldn't really have two different views of the notes and their relationships. Having 2 canvases with the same note on it introduces side-effects. Say you had a note on a person and that person was working on Project A and separately on unrelated Project B. If Project A and Project B both had Canvases with that person on it... if you wanted to maintain "Project A and Project B" in their metadata you'd have to include references to the other Project.

Man this got complicated to explain.

Long story short, I think that simply pulling someone out of a group graphically doesn't always constitute removing that group from their metadata. If I could figure out some intuitive mechanism to say "I'm pulling this out because I dont' want this connection any more" - then I'd like to do it. I just can't think of how to do that.

@aarongilly
Copy link
Owner

Good news - I figured out how to tap into the right-click menu for all canvas items. So I can make an explicit "remove this connection from the source note" from the right-click menu. This gives the option to remove properties from notes on a canvas from within the canvas explicitly.

I'm also working on a function to select a note (or all notes) on a canvas and pull the most-current values for all properties of that note to the active canvas.

This was a good technical roadblock - now it's just a matter of doing all the other things. Still gonna be many weeks to months before I dedicate enough free time to push an update. But now I can say one is actually coming.

@FlipH19Switch
Copy link
Author

Awesome. Thanks for the update!

I'm not sure that addresses the core issue though. If I understand correctly, I would still need to right-click on a note and remove a property manually. This is only slightly better than removing the property after clicking into the note.

Ideally, I would be able to update the properties and their values dynamically - no manual work at all. Here is an example scenario:

  • I add Note A and Note B into Canvas A
  • I move Note A into Group A from within Canvas A. "Canvas A - Groups" appears as a new property in Note A with the value "Group A".
  • I add an arrow going from Note A to Note B from within Canvas A. "Canvas A - Connections" appears as a new property in Note A with the value "Note B".
  • I move Note A out of Group A from within Canvas A. "Canvas A - Groups" and its value disappear from the properties list for Note A.
  • I delete Note A from Canvas A. "Canvas A - Connections" and its value disappear from the properties list for Note A.

That's probably asking for quite a lot. But it would likely be easier to get started with than the Metadata Menu - Canvas combination.

As for the catastrophic data loss, maybe an option like the "Remove fields" option in the DB Folder plugin (default = off) could help the user understand what could happen by bypassing the manual work?

@aarongilly
Copy link
Owner

Correct my current approach means you'll still have to right-click and select a menu option.

Also to be clear, I definitely understand why you'd want to not do that. To just move the canvas around and have the current version of the Canvas be always kept up-to-date with the notes that are on it. The real main issue here is that there is not an easy way to trigger updates on canvas changes - which is a big hurdle.

Your idea of essentially using the Canvas name as a "key" to separate out the relationship conflicts you'd have between different canvases would probably be a necessary step on the path toward the fully automated solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants