Conversation
|
Confirmed: Jermolene has already signed the Contributor License Agreement (see contributing.md) |
✅ Deploy Preview for tiddlywiki-previews ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
When updating the flexoki palette, I found that the tag won't display properly unless index But we had better not use it at present since tag pill is often used in UI, which may cause performance issues. |
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. |
📊 Build Size Comparison:
|
| Branch | Size |
|---|---|
| Base (master) | 2528.4 KB |
| PR | 2530.6 KB |
Diff: ⬆️ Increase: +2.2 KB
|
I agree that this could be quite useful... at times. I also agree that there are all sorts of perils in including it. I wonder if TW could reasonably adopt something akin to JS's strict mode where some unobtrusive signal allows the user to use certain features. That is, could we have This may just be crazy talk, but it seems like an interesting possibility. |
I’m currently working on a flashcards plugin for TiddlyWiki that integrates with Anki. In this workflow, wikitext content needs to be wikified (to HTML) and then embedded into a JSON payload sent via HTTP. In this scenario, the
Without the operator, I would need to wikify content multiple times at different stages:
This introduces redundant parsing/rendering overhead. With the
Being able to wikify directly within a filter allows the transformation to remain declarative and self-contained. This reduces the need for additional widgets or procedural workarounds, which helps keep both performance and code complexity under control. It is especially useful when composing JSON payloads, where having wikification available inside the filter pipeline enables a cleaner data transformation flow and avoids unnecessary rendering passes. If performance remains a concern, perhaps the documentation could clarify that this operator should be used thoughtfully in performance-sensitive loops, rather than discouraging the feature entirely. |
📊 Build Size Comparison:
|
| Branch | Size |
|---|---|
| Base (master) | 2486.7 KB |
| PR | 2488.8 KB |
Diff: ⬆️ Increase: +2.2 KB
⚠️ Change Note Status
This PR appears to contain code changes but doesn't include a change note.
Please add a change note by creating a .tid file in editions/tw5.com/tiddlers/releasenotes/<version>/
📚 Documentation: Release Notes and Changes
💡 Note: If this is a documentation-only change, you can ignore this message.
|
Thanks @uzvg that is a cogent and compelling argument. I've taken this out of draft, resolved the merge conflict, and marked it for consideration for v5.5.0. |
|
@pmario there are a lot of eslint errors for this PR. I can see that they are concerned with indentation, but there is no indication that I can find of which file is affected. Am I perhaps missing something? |
core/modules/filters/wikify.js
Outdated
| (function(){ | ||
|
|
||
| /*jslint node: true, browser: true */ | ||
| /*global $tw: false */ |
There was a problem hiding this comment.
Function wrappers should be removed now. I believe they're causing indentation errors.
|
@Jermolene removing the function wrappers in the two new JavaScript modules should resolve the lint errors for indentation. |
|
Doh! Thank you @Leilei332 @saqimtiaz. |
|
Thanks, @Jermolene — I really appreciate it. |
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:
<$list>widget to generate a set of numbers instead of the[range[]]operator. Besides being horribly inefficient, there are pitfalls with unexpected wikificationThis 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?