felixhayashi / TW5-TiddlyMap

Map drawing and topic visualization for your wiki
http://tiddlymap.org
BSD 2-Clause "Simplified" License
863 stars 132 forks source link

Add $:/plugins/Gk0Wk/focused-tiddler #464

Closed linonetwo closed 1 week ago

linonetwo commented 1 month ago

closes #462

I test this locally, live view works fine

linonetwo commented 1 month ago
截屏2024-10-12 17 23 31

And it works well with TidGi setup, despite that it add tmap.id to every existing tiddlers, even those not on the map.

flibbles commented 1 month ago

Okay. I might be going insane.

I can't find this focussedTiddler anywhere. The link I'm seeing in #462 goes to this CPL website that only has a blurb. There's nothing to drag-and-drop, there's no github link. There's no plugin as far as I can tell. Google can't find it either. Am I stupid? I can't find the actual plugin to link to (because the README file for this project would need to be updated to point to it.)

Also, I looked into removing tmap.id. It's a huge endeavor. I partially wrote some of the migrators that would need to be created, and maybe once I finish my current project, I might look into it more. But holy shit would it be a lot of work.

flibbles commented 1 month ago

Okay. I found the plugin in the CPL website, but only by going into its configuration (which it tries to hide). But that's not something to link to. It's hardly forward-facing, and the code is already uglified. Is there a source project somewhere? Even Gk0Wk's github profile itself doesn't have this project.

linonetwo commented 1 month ago

Sorry, it is at https://github.com/Gk0Wk/TiddlySeq/tree/master/src/focused-tiddler , Gk0Wk forget to fill-in the repo field in CPL, I'm going to add it.


Updated on CPL, site update in 10 mins.

flibbles commented 1 month ago

I guess what I should have asked is if there is a link to an actual plugin json file or something they can drag and drop. This repository doesn't have a bundled build. And since it's using ".ts" files (!?!?!??!), I assume it needs to be built, but there is no build file. Also, the README file isn't really markdown. This looks like a very ugly project to direct end-users to.

Are you SURE this is well maintained? I'm a Tiddlywiki power user, and even I would have given up trying to use this plugin if I needed its functionality.

flibbles commented 1 month ago

You know, maybe the proper solution here is to remove Hotzone and focussedTiddler as requirements. Because they're not. You only need them if you want "Live View" to constantly refresh to whatever tiddler you happen to scroll to.

Maybe remove them from the requirements, and just put a comment in TiddlyMap README that you can install them if you want that functionality. And maybe link to HotZone or focused-tiddler.

But focused-tiddler would still need a link to a bundle.

linonetwo commented 1 month ago

I've just wake up.

The JSON can be downloaded from the url in cpl.uri field on tiddler on CPL. And the Readme isn't for Github, only few people read it (see how many star it has), it is only for CPL. At least it looks good on CPL, and even has i18n.

图片

Its TS is build by Tiddly.ModernDev, which is run in the Github Action, you can see the detailed steps in the action file. And I think it use extra steps to build a plugin library

It is only 4.6k, very small dep, and installing it is important to prevent new user complain about things not working.

图片

But we can put a comment to say you can safely uncheck it when install

图片

flibbles commented 2 weeks ago

I have finally found the time and patience to try this focused-tiddler plugin.

I do not like it.

Yes, it works, but why? You say "new user complain about things not working". What? Where? How? I see nothing wrong with it.

Hotzone has a simple repository. It does not require a build process. Meanwhile, focused-tiddler comes with a plethora of unrelated plugins. It requires a build process which, I think, involves npm? I wouldn't know, because there are zero build instructions. the README for the repository just says "View Demo", but not only does the demo not have any build instructions. It doesn't even feature focused-tiddler. I had to dig around in the hidden control panel to even find it.

Maybe I could make this plugin work for people who use tiddlymap with standalone files by providing something they can drag-and-drop. But anyone using Node.JS (like me), will have a hell of a time getting a proper build of focused-tiddler to work. I had to make mine. By hand. By copying over each file individually. (Because again, no build instructions.)

Why does such a simple plugin even require a build process? Wouldn't it be simpler just to fix Hotzone for whatever problems it has? I could fork that and fix it.

linonetwo commented 1 week ago

Well, I don't know why you dislike build process. We have a unified build framework Tiddly.ModernDev, most of TW TS plugins in https://github.com/tiddly-gittly and those from Chinses people are using it, so if you find it needs building, basically you can try following Tiddly.ModernDev's doc. Learn once, and build everywhere.

Why does such a simple plugin even require a build process

Because it auto hot reload the browser when dev, and auto build with Github action when release, so even a simple plugin will worth using it.

Probably because involution (rat race) in web frontend of China is making us all adapting heavy toolchains, I feel Modern.TiddlyDev is a light weight one.

new user complain about things not working

I reconsider this, sorry for being exaggerate. Because TidGi already pre-build with focused-tiddler plugin, so this won't happened. But I'm not sure if Hotzone is also installed, will it cause further bugs.

So maybe just recommend install focused-tiddler or Hotzone in the readme, and not include it in the hard-dependency.

flibbles commented 1 week ago

I will add a link to focused-tiddler alongside hotzone in the documentation, but I don't see it being used by anyone who doesn't already use ModernDev (i.e. most people using TiddlyMap, I think.)

I tried giving Tiddly.ModernDev a chance. It seems very heavyweight. I tried to run the tutorial. The install process took a crazy long time, and I never could get it to work, but it looks like it does stuff like code minifying, (which I don't know if you know this, but I wrote a very robust uglifying plugin for Tiddlywiki explicitly so developers never ever have to do this!!!)

If somebody wanted to use focused-tiddler with NodeJS without installing an entire framework like Tiddly.ModernDev. What do they do?

linonetwo commented 1 week ago

Sorry for confusion, Tiddly.ModernDev is for developer, it runs on development time (on your computer) and compile time (on Github Actions), and its output is on Github Release.

Then CPL repo's Github Actions crawl registered plugins' Github Release url, to get the plugins, save crawled plugin JSON to CPL repo's Github Release Artifact and netlify's website cache. Then user will use CPL to download plugin from it. Or directly download JSON from Github Release and drag into their wiki.

So user don't need to install Tiddly.ModernDev.

I will add a link to focused-tiddler alongside hotzone in the documentation

See my PR for doc.

The install process took a crazy long time, and I never could get it to work

Are you using the CLI? It does install many dependency, but mostly well known tool chain for web frontend. I use pnpm so node_modules are shared across my projects.

A tipical node_modules size is 300-400M, so pnpm comes out. And you will need a 500Mb network connection to install it in few seconds.

flibbles commented 1 week ago

Okay, that works for people using standalone tiddlers, but I use NodeJS.

When I install tiddlywiki plugins, I download the plugin files, not bunched together, but all the tiddlywiki files and javascript files, and I put them somewhere on my TIDDLYWIKI_PLUGIN_PATH, then if a project I'm working on needs it, I add the plugin name to plugin.info in my project's root directory.

What is someone like me supposed to do? All the files that I can find are in ".ts" format. I don't see how I could personally use focused-tiddler (or any Tiddly.ModernDev plugin really) without setting up the Tiddly.ModernDev build framework.

Am I alone? Am I an outlier? Surely this problem has come up before.

linonetwo commented 6 days ago

All TidGi-Desktop users are using NodeJS wiki, even they don't know about it. There might be at least 200+ user like this, I guess, because QQ group have 1.2k members.

They simply use CPL to install plugin, and plugin JSON file will goes into wiki/tiddlers/ folder, that is going to be the standard way. At least de-facto way to install plugins for NodeJS wiki, because I believe now there are more user doing so than no.

BTW, drag plugin from one wiki to another nodejs wiki will also save it as JSON to /tiddlers/ folder.

put them somewhere on my TIDDLYWIKI_PLUGIN_PATH

That is too difficult for ordinary users, and update is more difficult (You will ask them to delete the old folder first, that is going to be hard for most of users!), and if mentioning tiddlywiki.info, this will scary most of users. You can't expect Obsidian and Notion users to do this. And if there is no one-click-install experience, Tidgi Desktop can't stand a chance against Obsidian and Notion.