TiddlyWiki / TiddlyWiki5

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

Add wikify operator #8730

Open Jermolene opened 2 weeks ago

Jermolene commented 2 weeks ago

This PR adds a "wikify" operator that has the same functionality as the wikify widget. I regard this as quite controversial because while it unlocks some important capabilities, it also suffers from performance issues and invites users to adopt patterns that can be dangerous:

This PR is cherry picked from #8702; I plan to refactor the work there to not require the wikify operator because of the performance issues.

The question now is what are the use cases for the wikify operator, and are there any other ways to accomplish those use cases?

github-actions[bot] commented 2 weeks ago

Confirmed: Jermolene has already signed the Contributor License Agreement (see contributing.md)

netlify[bot] commented 2 weeks ago

Deploy Preview for tiddlywiki-previews ready!

Name Link
Latest commit 55cf0b29657e3560526534f172d5de684f048ffe
Latest deploy log https://app.netlify.com/sites/tiddlywiki-previews/deploys/672ceaf559d3f800081fab88
Deploy Preview https://deploy-preview-8730--tiddlywiki-previews.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Leilei332 commented 2 weeks ago

When updating the flexoki palette, I found that the tag won't display properly unless index background, foreground and tag-background 's value is hardcoded. So the wikify operator should be used in the tag macro.

But we had better not use it at present since tag pill is often used in UI, which may cause performance issues.

Jermolene commented 1 week ago

When updating the flexoki palette, I found that the tag won't display properly unless index background, foreground and tag-background 's value is hardcoded. So the wikify operator should be used in the tag macro.

Ouch. I suspect that the compiled palette idea under investigation in #8702 will resolve a number of issues like this, and ultimately should allow us to significantly improve the stylesheet refresh performance.