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

Move Note between vaults should move assets as well #525

Open
2 of 10 tasks
grizz-pl opened this issue Mar 5, 2021 · 6 comments
Open
2 of 10 tasks

Move Note between vaults should move assets as well #525

grizz-pl opened this issue Mar 5, 2021 · 6 comments
Labels
area.structure Keep your knowledge base manageable. e.g. refactoring, multi-vault and schemas. area.workbench kind.crop type.enhancement Extension to a previously shipped feature. Minor functionality update.
Milestone

Comments

@grizz-pl
Copy link

grizz-pl commented Mar 5, 2021

Please Select if your Request is Either something new or an Enhancement

  • Enhancement of an existing Feature.
  • Request of a new feature.

Please select the area your request applys to. (Multiple selections are Possible)

  • UI
  • Workbench
  • Publishing
  • Pods
  • Markdown
  • Hierarchy
  • Graph
  • Misc (Choose this if your not sure)

Is your feature request related to a problem? Please describe

When I use move note command, only note is moved. Assets stay in old vault.

Describe the solution you'd like

There should be an option to move assets as well.

@kevins8
Copy link

kevins8 commented Mar 5, 2021 via email

@suuuz
Copy link

suuuz commented Apr 18, 2021

What if the assets are stored in a folder with the same name as the markdown note? Instead of storing all assets in one folder.
The disadvantage would be that referring to an asset from multiple notes doesn't work anymore. A solution could be to refer to the note instead of to the asset. Or to store that specific asset in a central location.
The advantage would be that moving and removing notes can move/remove the assets as well. And it also makes more sense when browsing through the files manually on the fileserver, outside of VS code.

@kpathakota
Copy link
Contributor

kpathakota commented May 12, 2021

Can we take a phased approach with this one? Write now it feels like it is a bug since image links get broken on a vault move.

  1. If there's only one note linked to the asset, the asset should move to the new vaults asset directory (the majority case). It should throw a warning if more than one note is linked to the asset (IMO the whole point of vaults are to have separate access control/separate data).
  2. If there are many notes linked to the same asset, if one note is moved then I think the right thing is to copy the asset into the second vault as well. People can always go back and delete the asset.
  3. Dendron: doctor command to remove unused assets (so people who run into the situation from 2 can clean up easily).

@suuuz - the main reason I don't think we should have assets per note/folder is it would quickly not scale. There would be lots of tiny folders with only a few files each, which defeats the point of a central folder for media.

@kpathakota kpathakota added area.structure Keep your knowledge base manageable. e.g. refactoring, multi-vault and schemas. size.small Good for newcomers type.enhancement Extension to a previously shipped feature. Minor functionality update. and removed area.workbench status.triage-needed labels May 12, 2021
@kpathakota kpathakota changed the title Move Note beetween valuts should move assets as well Move Note between vaults should move assets as well May 12, 2021
@kpathakota kpathakota added this to the v43 milestone May 12, 2021
@kevinslin
Copy link
Member

Some thoughts here.

  • quick fix - move assets. we could have a confirmation prompt: eg. We found X assets linked to this vault. Would you like to move them as well?
    • potential issues arises if other notes also link to this file, in which case those links will be broken
  • long term - extend reference synta ![ ] to also work with assets
    • when we move a note, assets can stay in the original vault but the link can be converted into a xvault link
    • when we move the asset, the link can be converted in existing notes

@kevinslin kevinslin modified the milestones: v43, v44 May 17, 2021
@kevinslin kevinslin modified the milestones: v44, Backlog May 25, 2021
@kevinslin kevinslin removed the size.small Good for newcomers label Aug 18, 2021
@aleksey-rowan
Copy link
Contributor

This issue was selected by the community in the latest round of CROP.

@enibrn
Copy link

enibrn commented Sep 8, 2024

I made this script for my needs, could be useful for others https://github.com/enibrn/dendron-move-images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area.structure Keep your knowledge base manageable. e.g. refactoring, multi-vault and schemas. area.workbench kind.crop type.enhancement Extension to a previously shipped feature. Minor functionality update.
Projects
None yet
Development

No branches or pull requests

7 participants