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

[BUG] TW Add plugin "modal" doesn't show library icons #5460

Open pmario opened 3 years ago

pmario commented 3 years ago

To reproduce:

This plugin will be activated, without a reload. So you can see what's going on.

grafik


I did identify the code, that causes the problems, but we will need to discuss, HOW we want to solve it.

pmario commented 3 years ago

reserved

pmario commented 3 years ago

a) TW icons don't have a type:

  1. open https://wikilabs.github.io/#%24%3A%2Fplugins%2Fwikilabs%2Flink-to-tabs%2Ficon
  2. change type to: image/svg+xml
  3. TW doesn't show it anymore

b) The plugin librarys are prepared / created using the following code.

https://github.com/Jermolene/TiddlyWiki5/blob/12f18474755c94362eef7191eafb532bafb743b1/core/modules/commands/savelibrarytiddlers.js#L72-L81

As you can see in line 79 it uses: if(iconType && iconText) { ... So both icon-text and an icon-type have to be there, to create a library file, that contains an icon

BUT due to a)3. this isn't possible!

So the question is: What's the best way to solve this problem?


But there is more!

pmario commented 3 years ago

I think I have an idea

pmario commented 3 years ago

@Jermolene What do you think?

all except markdown-it using SVGs. Markdown-it uses a gif ONLY for testing here

https://github.com/Jermolene/TiddlyWiki5/pull/5418/commits/1c6e6e8f4a1d05aa2ae3dad97ce7ff3520cef849 fixes the problem

grafik