TiddlyWiki / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
7.98k stars 1.18k forks source link

[IDEA] Fast import mode (toggle in setting) to skip the import dialog #7535

Closed linonetwo closed 8 months ago

linonetwo commented 1 year ago

Is your feature request related to a problem? Please describe.

I recently chat with @pimgeek about why Obsidian is popular than Tiddlywiki, he said:

  1. Ob team previously developed another business software Dynanote, so they already have money&channel to broadcast their new product Ob
  2. Ob is as easy as Word for new user, for example, drag to import image, is just like Word. While Tw involves extra steps, make it scary for new users (have many new elements to learn), and make @pimgeek feels unstable (may cancel import by mistake, may forget to click Ok of rename before import by mistake...)

So for first step, I want to make improvement for import process, make it as simple as Word.

Describe the solution you'd like

  1. Directly import, without any prompting.
  2. Add the current editing tiddler as a tag to the image (or create a backimage filter to find out usage) so that image won't be lost.
  3. Autorename for name collition
  4. ctrl + z to trigger deletion of image (revoke the import), with a prompt showing "delete" and "rename"

I think "import without prompt" + "revoke with prompt", is much smoother than current "import with prompt".

Describe alternatives you've considered

Maybe this can be implemented as a plugin, but requires some hook for hijack all progress of importing. (maybe they already exist? But why no such a plugin exist...)

Additional context

I just always feeling not smooth for adding images to tiddler. This also makes me afraid of adding images to tiddlywiki.

Related: Changing image.png for importing images?

pmario commented 1 year ago

I probably would be OK for a toggle for some filetypes like images. But we cannot rely on the extension. There needs to be a validation on the file data level.

But every file type that can import executable code should go through the import dialogue OR should be sanitized. So remove the elements that make it executable.


Needing the OK button to accept import file renaming is annoying but should be fixable. IMO should be raised as a different issue

linonetwo commented 1 year ago

I probably would be OK for a toggle for some filetypes like images

I think there can be a config to toggle "import without prompt" + "revoke with prompt" for each individual mime type, and enable this for images by default.

Needing the OK button to accept import file renaming is annoying but should be fixable. IMO should be raised as a different issue

Aftet "import without prompt" + "revoke & rename with prompt" is made, this won't be a problem, the design will be a completely new one.

pimgeek commented 1 year ago

Let me make some supplement notes to @linonetwo 's sharing: 😊

  1. Ob team previously developed another business software Dynanote...

Ob team had developed Dynalist.io which is an alternative to WorkFlowy

  1. While Tw involves extra steps, make it scary for new users...

I should say this is not the biggest concern from my experience, the biggest concern is, I'm afraid too much multimedia file import will dramatically increase TiddlyWiki's size & loading time, which will make it less responsive both for the author and readers. This make me feel less confident when promoting TiddlyWiki to new users --- I'd rather suggest them avoid importing image / video / pdf files, until they totally & intuitively understand the performance tradeoff.

If you have read my previous issue #4401 , you will know an ideal solution for me is uploading image / video / pdf files via browser into a separate folder (which means I will stick to Node.js Server or Desktop Client version), and then reference them with [ext[./files/xxx.yyy] syntax.


Latest update: #4401 is closed, I will try using lazy-all option to decrease loading-time.

linonetwo commented 1 year ago

I'm afraid too much multimedia file import will dramatically increase TiddlyWiki's size & loading time

I don't think so (at least in nodejs wiki / TidGi desktop), we can discuss this in a new Discussion ,not here. Currently my wiki is 100M+ with many png and pdf, performance issue mainly comes from widget & filter operator that rerender too much #7151 https://github.com/bimlas/tw5-kin-filter/issues/1

But it is related to this issue, if import is more easy, we can encourage user add more image/pdf to the wiki, just like what Obsidian can do.

saqimtiaz commented 8 months ago

@linonetwo you may find this of interest: https://talk.tiddlywiki.org/t/towards-a-friendlier-workflow-for-images-in-notes/8811

linonetwo commented 8 months ago

@saqimtiaz Although I think this is worth being the default behavior of TiddlyWiki, I found recently none of my PR gets merged, so it is good to develop as a plugin rapidly.

linonetwo commented 8 months ago

Close as we have a plugin for this! I will continue watch it, and add it to TidGi's default plugin set when it is stable.