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

Font Awesome 5 Free SVGs in the core? #4073

Closed
morosanuae opened this issue Jul 5, 2019 · 26 comments
Closed

Font Awesome 5 Free SVGs in the core? #4073

morosanuae opened this issue Jul 5, 2019 · 26 comments

Comments

@morosanuae
Copy link
Contributor

Hi to all,

How about integrating Font Awesome 5 Free SVGs into the core images collection? I can make a plugin but that will create a dependency relation for those who will use them in their plugins. I've spoken with someone from FA5 and he said it's OK to convert the free SVGs to TiddlyWiki format because the free SVG collection it's open source.

@Jermolene what do you think?

@twMat
Copy link
Contributor

twMat commented Jul 5, 2019

A //very// selected set of them in that case - #3388

BUT I would love to see many more icons individually "pickable" from tiddlywiki.com or some other place. The presumption here is that we can't use Font Awesome icons straight away and that they should first be adapted to tiddly context. Other than the actual svg content this would also include appropriate tiddler fields.

@morosanuae
Copy link
Contributor Author

@twMat sorry, I dont't understand very well what you are saying. Could you be more explicit?
I personally prefer as many icons we can get into the core. A plugin will create "unwanted" dependency. My only concern is performance. Font Awesome 5 Free has about 1500 icons and I don't really know how this will impact performance. Displaying all of them slows down the wiki for sure because I already implemented this in my personal wiki.

@twMat
Copy link
Contributor

twMat commented Jul 5, 2019

If you want performance then you should be really careful with what is in the core and ensure it is only what is needed.

Displaying all of them slows down the wiki for sure because I already implemented this in my personal wiki.

I would think the mere fact of having them in the wiki, shown or not, would slow things down.

@morosanuae
Copy link
Contributor Author

This is a tricky situation indeed. But having only a handful of images is not very productive. Maybe each image as a separate plugin? That way one can download only the images that are interested in. But I would like to have the same prefix as original images to seamlessly integrate with the others (e.g. $:/core/images/).

@twMat
Copy link
Contributor

twMat commented Jul 5, 2019

Maybe each image as a separate plugin?

Well, it could be a big plugin with all of them and you can still drag over individual tiddlers on a need basis. Once they enter your wiki the become system tiddlers of course.

I'm not sure what "seamlessly integrate" means but it should be no big deal to crate copies of the core images and just rename them as the rest.

@morosanuae
Copy link
Contributor Author

I'm not sure what "seamlessly integrate" means but it should be no big deal to crate copies of the core images and just rename them as the rest.

Exactly! It means that I don't want to rename the imported image or to operate any other modifications. Just drag it and that's it. To behave like the others.

Well, it could be a big plugin with all of them and you can still drag over individual tiddlers on a need basis. Once they enter your wiki the become system tiddlers of course.

The problem with the big plugin is that once you drag over individual tiddlers you loose track of them, especially with default naming scheme ($:/core/images/). My opinion is that everything should be a plugin for efficient organization.

@morosanuae
Copy link
Contributor Author

But then again the plugins will create dependencies and that's not good either.

@twMat
Copy link
Contributor

twMat commented Jul 5, 2019

My opinion is that everything should be a plugin for efficient organization.

Actually how big is that free fontawesome set? Add to that the overhead to make each each one a tiddler. ...and add to that the aspect that you'll use a fraction of them.

once you drag over individual tiddlers you loose track of them

Why? Obviously there's a common tag or sth on them. The plugin could even have a manager of some sort that you drag over to begin with.

Actually, it would be much better if we had a font-awesome-to-tiddler mechanism. Dragging a font awesome svg into some droparea tags it and strips it of unnecessary stuff and adds tiddlytweaks to it. I'm assumging all icons are fully standardized. I would really like this actually.

@twMat
Copy link
Contributor

twMat commented Jul 5, 2019

Just posted this request in the google dev group.

@morosanuae
Copy link
Contributor Author

morosanuae commented Jul 5, 2019

Actually, it would be much better if we had a font-awesome-to-tiddler mechanism. Dragging a font awesome svg into some droparea tags it and strips it of unnecessary stuff and adds tiddlytweaks to it. I'm assumging all icons are fully standardized. I would really like this actually.

Actually I have a "font-awesome-to-tiddler mechanism" consisting of a series of windows batch (.BAT) scripts that process and converts the original files. It's a 15 min. task because of CMD limitations that add some manual editing. Anyway I haven't processed them manually. The problem is of course to be able to select and use only those we need.

@twMat
Copy link
Contributor

twMat commented Jul 5, 2019

Oh, then maybe you have the know-how to create such a mechanism in TW?

The problem is of course to be able to select and use only those we need.

To select icons? ...that's not a problem, it's a luxury :-)

@morosanuae
Copy link
Contributor Author

Oh, then maybe you have the know-how to create such a mechanism in TW?

In TW directly I don't think it's possible because AFAIK JavaScript doesn't have access to local filesystem.
I currently work on a Node.js version of the script but I've initially planned to use it internally to circumvent the CMD limitations not for making it public. And I don't know if I can put it online and where. I have more questions than answers for the moment.

To select icons? ...that's not a problem, it's a luxury :-)

It would be a luxury if we'll find a very simple and intuitive way :-)

@morosanuae
Copy link
Contributor Author

I'm closing this because I think adding that many SVGs into the core it is not a viable (performant) solution. I'll publish them as a plugin or as simple collection.

@Jermolene
Copy link
Member

To add a link to the discussion on the mailing list, where I commented:

Perhaps the simplest way to distribute FontAwesome icons for TW5 users would be to have a web page that allows them to be dragged and dropped into a wiki (that page would itself be a wiki behind the scenes).

I understand why people want to add the icons to a plugin or even the core to make it possible to share them between plugins, but that just creates more problems. Better in almost all cases to embed them directly in the plugins that need them.

@morosanuae
Copy link
Contributor Author

@twMat (and others) please, check out my Font Awesome 5 collection online: http://fa5-free-svg.tiddlyspot.com.

@twMat
Copy link
Contributor

twMat commented Jul 6, 2019

check out my Font Awesome 5

@morosanuae - that is excellent! And I note you have in deed done some tiddly tweaking on to them!

For a plugin, this is my super proposal: Make the plugin as an iframe (or possibly some kind of plugin library). This will be very light weight and the user can access everything and just DnD directly from it.

Here's an example from @tobibeer using an iframe.

EDIT: Sorry, specifically an iframe is not a good idea after all. You can't dragndrop directly from it. So I guess a plugin library is the solution. (Interestingly you can drag something from an iframe to the browser bookmarks bar which can then be dragged into the tw, but it is not the tiddler.)

@morosanuae
Copy link
Contributor Author

@twMat

Sorry, specifically an iframe is not a good idea after all. You can't dragndrop directly from it.

OK. Thanks for the info. I guess it would have been a shortcut version for DnD from my site.

So I guess a plugin library is the solution

So, do you want each image as a separate plugin?

@twMat
Copy link
Contributor

twMat commented Jul 6, 2019

So, do you want each image as a separate plugin?

No, just as they are... or are you implying that a plugin library can only display tiddlers of type "plugin"? Regardless, what is "needed" is a plugin that the use can install which - somehow - gives him access to your svg tiddlers. This would make it very simple to get those plugins, no one has to remember that tiddlyspot url and there is no leaving ones own wiki.

Maybe a plugin library is not the right term. I guess a "tiddler library" is better?

@morosanuae
Copy link
Contributor Author

or are you implying that a plugin library can only display tiddlers of type "plugin"?

That's what I've presumed.

Maybe a plugin library is not the right term. I guess a "tiddler library" is better?

I don't know if such thing exists. Anyway, I understand what you want, and it makes sense, but I don't really have a solution for this at the moment.

@twMat
Copy link
Contributor

twMat commented Jul 6, 2019

"tiddler library"

Maybe @inmysocks has some insight into this (considering both that he's built a plugin library but also the current Bob and TWederation developments).

@inmysocks
Copy link
Contributor

The Bob server has the functionality for this, and a similar thing will be added to the core after 5.1.20 (see #4055)

For what exists in Bob currently the only thing needed is a simple view template on top of it to display the icons nicely while you decide which ones you want to import into your wiki.

You can already pick a remote server and fetch a filtered list of tiddlers from the server, this would just be a filter that only returns the icons (or some subset of icons) and then you get a preview in your wiki and can decide which ones to import. Right now the preview template wouldn't display the images but making a new one wouldn't take too long.

@twMat
Copy link
Contributor

twMat commented Jul 6, 2019

BTW, @inmysocks if you're willing to host @morosanuae icons on your server then I guess I could add such a UI for fetching them! Morosanuae, I'm at this very moment building a UI for some of inmysocks/Jeds things as part of TWederation. We will need to "fill it" with some cool stuff so people have an initial incentive to try it out once released. You're more than welcome to join in (I'd update you best I can) or just be willing to put your icons on Jeds server and I'll do what I can myself.

@morosanuae
Copy link
Contributor Author

@twMat please excuse me, but you are speaking a "foreign" language to me. I don't know what @inmysocks is saying also. Bob server, TWederation, etc. It looks like I need some basic training first :-) Anyway I would gladly help you with what I can.

@twMat
Copy link
Contributor

twMat commented Jul 6, 2019

LOL! Sorry. Bob is Jeds creation. There is much discussion about it on the boards because it brings multi-user functionality to TW.

TWederBob is also Jeds creation but I'm engaged it in also designing a UI for it. The purpose is TWederation - i.e a federated system to connect wikis for sharing stuff. The internet of TiddlyWikis. One main purpose is to (finally) have the infrastructure for a plugin repository that doesn't decay. It will be great but most people don't manage to envision it so they don't yet get it. If you're really interested I could tell you more. If you're not, that's fine too. You will be, later on anyway ;-)

@inmysocks
Copy link
Contributor

Bob is a plugin I made for managing multiple wikis that has lots of features, one of which is a more advanced server component than the built-in core server.

One thing that is possible because of this is you can put another plugin, called TWederBob, in any wiki and then use that to fetch tiddlers from a Bob server into your local wiki.

The end result is you can store the icons on a publicly viewable wiki where people can browse, and if a person has TWederBob in their wiki they can see a preview of the icons on their own wiki and import the ones that they want without having to leave their own wiki.

The easiest way to see Bob is probably using BobEXE here: https://github.com/OokTech/TW5-BobEXE

It is the node version of tiddlywiki packaged into an executable with the Bob and TWederBob plugins included.

The wikis on Ooktech.xyz are hosted using a modified server (available here: https://github.com/OokTech/SecureWikiServer) that lets you fetch like on a normal Bob server.

Sorry about dumping a lot of info on you, I don't have complete documentation for all of this written up yet and the federation parts are still pretty rough around the edges.

If you would like to try hosting the svgs so that they can be remotely fetched it sounds like a good narrow use case for testing and developing everything.

@morosanuae
Copy link
Contributor Author

@twMat, @inmysocks this sounds very interesting indeed. Thanks for taking your time to explain. Of course I'll give you the SVGs. You can export them from my site or if you want I can send you the import JSON file. Just tell me exactly what you need and how I should fulfill your request.

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

4 participants