1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-26 15:23:15 +00:00
Commit Graph

4187 Commits

Author SHA1 Message Date
jeremy@jermolene.com
5613bcc884 It's 2022 2022-01-03 20:22:52 +00:00
jeremy@jermolene.com
c7e8c87f85 Refine criteria for displaying $:/core/ system tiddlers as code
Fixes #6369
2022-01-03 16:42:50 +00:00
jeremy@jermolene.com
66ae1d6930 Image widget: Add classes for loading/loaded/error 2022-01-02 17:28:54 +00:00
jeremy@jermolene.com
60187dc59e Fix importing/upgrading encrypted single file wikis
The problem was that v5.2.0 trimmed the whitespace from $:/core/templates/store.area.template.html which we'd previously been relying on during the import.

This change still allows v5.2.2 to import encrypted pre-v5.2.0 wikis

Fixes #6330
2021-12-11 19:46:20 +00:00
jeremy@jermolene.com
54cfda76ee ViewTemplateBodyCascade: Add support for code-body field
Missed off #6168
2021-12-09 20:47:51 +00:00
jeremy@jermolene.com
0186c6490f Edit type dropdown: Add whitespace between description and MIME type 2021-12-08 21:25:44 +00:00
jeremy@jermolene.com
853a899c77 Avoid wraping field names in field viewers
Also avoid wikifying field names
2021-12-08 19:29:02 +00:00
jeremy@jermolene.com
d33e0a05e2 Preparing for v5.2.2-prerelease 2021-12-08 12:22:51 +00:00
jeremy@jermolene.com
7b1880404c Preparing for release of v5.2.1 2021-12-08 12:01:56 +00:00
jeremy@jermolene.com
b0f72d0690 Improve sidebar plugin listing
Fixes #6167
2021-12-07 13:17:15 +00:00
jeremy@jermolene.com
9e28356047 Cascades: Ignore draft configuration tiddlers 2021-12-06 16:25:51 +00:00
jeremy@jermolene.com
769778b05b Fix tag of control panel tab for edit template cascade
Missed off a350a76a00 (diff-902fbf6814c65f26a991299f17ef1698df82d1004af8d10d81a11a14660e805c)
2021-12-02 19:25:33 +00:00
Mario Pietsch
c11493ec37
fix TiddlerColorFilters/default ... to return a color name or value (#6283) 2021-11-26 12:10:18 +00:00
jeremy@jermolene.com
6d1d497a63 Tweak docs for #6268 2021-11-25 18:00:32 +00:00
Telumire
6ea7140e8f
Add a snippet to visualise faulty stylesheets (#6268)
* Add a snippet to visualise faulty stylesheets

As discussed in https://github.com/Jermolene/TiddlyWiki5/issues/6176, a faulty stylesheet can propagate and break several other stylesheets. This can be tricky to debug in a wiki with a lot of custom stylesheets.

This wikitext snippet will display a list of the stylesheets created/modified by the user and will display a red cross next to the one causing a parsing error.

* Improve the css code and add a message

This commit add a short message that provide guidance on how to fix the CSS error(s).
2021-11-25 17:49:28 +00:00
Saq Imtiaz
76cdc17f3b
Support macro parameters in filter run prefixes (#6164)
* Support macro params in filter run prefixes and support substitution for variables set by filter run prefixes

* feat: add support macro parameters and variable substitution for all filter run prefixes

* fix: rename options argument to opts for disambiguation

* feat: add support for macro params to cascade filterrun prefix
2021-11-23 13:51:42 +00:00
Saq Imtiaz
7fcc84156e
Fix: issues with drag and drop in Chrome 96 (#6261)
* fix: issues with drag and drop (false positives in detection for files being dropped) introduced by Chrome 96

* fix: call dragEventContainsType method more consistently.

* fix: call dragEventContainsType method more consistently.
2021-11-21 20:48:16 +00:00
jeremy@jermolene.com
dde1e4bc0f Fixed missed icon and colour cascades 2021-11-20 08:55:00 +00:00
jeremy@jermolene.com
122de63b71 Add a cascade for choosing tiddler colour
Following on from #6168
2021-11-19 12:01:32 +00:00
jeremy@jermolene.com
e3ba880e18 Fix tag pill colouring
Fixes #6221
2021-11-19 10:52:13 +00:00
Cameron Fischer
a94f94f352
Trim whitespace is stylesheet viewer (#6241) 2021-11-18 08:43:15 +00:00
Jeremy Ruston
a350a76a00
Add "cascade" filter run prefix and use it to control view templates (#6168)
* Initial Commit

* Set currentTiddler and ..currentTiddler for filter evaulation

* Precompile the filters for performance

* Add explicit test for empty result when no filter passes

* Use the cascade filter run prefix to choose the view template body template

* Use the cascade mechanism to choose between the edit and view templates

* Simplify cascade filter

Thanks @saqimtiaz

* Add control panel UI for inspecting the template cascades

* Refactor import listing and plugin listing as alternate body templates

As suggested by @pmario

* Refer to $:/core/ui/{View|Edit}Template via their associated config tiddlers

* Fix typo in previous commit

* Add demo of custom story tiddler template

* Tweak control panel wording

* Standardise "Story Tiddler Template" nomenclature

* Add a cascade for the editor template body

* Add a cascade for the view template title

* Avoid unwanted whitespace

* Add a cascade for dynamically choosing tiddler icons
2021-11-15 21:06:47 +00:00
jeremy@jermolene.com
9caba544eb Fix refreshing of codeblock widget
Fixes #6171
2021-11-05 08:28:56 +00:00
Saq Imtiaz
b6ce353a7d
Fix: resolved search-replace operator regexp encoding bug (#6162)
* fix: resolved search-replace operator bug with $ character in replacement strings, added test and more examples

* fix: reset regexp after each title
2021-11-01 13:24:30 +00:00
Cameron Fischer
2bfe522b72
Add $let widget (#6148)
* $let widget added and tested

* Documentation for $let, doc improvements for $vars

* let properly avoids refreshing when possible

* $let Changes as recommended by others

* Removed superfluous super method call

Also improved $let test
2021-10-30 11:42:22 +01:00
Saq Imtiaz
c099bf9893
Extends :map filter run prefix to provide missing variables (#6149)
* Extends :map filter run prefix to provide the variables index, revIndex and length to bring it into line with :reduce

* update :maps examples

* docs: fix formatting issue with documentation
2021-10-30 10:04:50 +01:00
Saq Imtiaz
4f65953da9
Added zero based zth[] operator and documentation (#6150) 2021-10-30 09:52:38 +01:00
Simon Huber
3287cf56bb
Make editor-preview open on a per-tiddler basis (#5998)
* make editor-preview open on a per-tiddler basis

* use qualified state for showeditpreview

* fix added p tag

* Make tiddler-preview per-tiddler configurable

* Create ShowEditPreviewPerTiddler.tid

* Update ControlPanel.multids

* Create ShowEditPreviewPerTiddler.tid

* Update body.tid

* Update ShowEditPreviewPerTiddler.tid

* Update ControlPanel.multids

* Delete ShowEditPreviewPerTiddler.tid

* Delete ShowEditPreviewPerTiddler.tid

* Create Hidden Setting ShowEditPreviewPerTiddler.tid
2021-10-28 19:17:15 +01:00
Saq Imtiaz
b5c81d2721
Provide actionValue variable to actions fired by EditTextWidget (#6145)
* feat: provide actionValue variable to actions fired by EditTextWidget

* also extend CodeMirror engine to set actionValue variable when invoking actions
2021-10-28 19:15:50 +01:00
jeremy@jermolene.com
2f3f9de7be Fix typo in d5f72cb282
Fixes #6143
2021-10-28 09:18:54 +01:00
Simon Huber
d695fca301
Add focus-editor text operation and use it where sensible (#6012)
* add and use focus-editor text operation

* add docs
2021-10-27 11:37:40 +01:00
Simon Huber
a0d2392f01
Update link-widget refresh method (#6013)
* update link-widget refresh method

* update link-widget refresh method
2021-10-27 11:37:08 +01:00
Jeremy Ruston
23b4e03cd5
Extend HTML tag parser to maintain an ordered array of attribute names (#6132)
* Extend HTML tag parser to maintain an ordered array of attribute names

* Add some tests for repeated attributes

* Record entire attribute in orderedAttributes array so that we can work with duplicated attributes
2021-10-27 11:35:12 +01:00
Jeremy Ruston
d5f72cb282
Set multiple fields/variables/params using filters (#6130)
* Add action-setmultiplefields and setmultiplevariables, and extend action-sendmessage

* Add getfield operator

* Remove getfield operator

See discussion at https://github.com/Jermolene/TiddlyWiki5/pull/6130#issuecomment-949911439

* Add docs

* Adjust whitespace

* Add support for assigning multiple indexes to action-setmultiplefields
2021-10-27 11:20:11 +01:00
jeremy@jermolene.com
5f57bf81cd Merge branch 'pr/4977' 2021-10-27 11:18:57 +01:00
Joshua Fontany
2a73505508
Fix overwriting of modification fields when PUTting a tiddler #6075 (#6084)
* call self.displayError

* Revert "call self.displayError"

This reverts commit 5d599aa979.

* fix PUT bug with created/modified fields
2021-10-27 11:15:30 +01:00
jeremy@jermolene.com
4d87ef4231 Add a comment on the default value of tv-action-refresh-policy 2021-10-26 09:51:00 +01:00
Telumire
c543036a0f
Add missing parameter to atan2 operator (#6142)
* Added missing trigonometrics filter operators

This PR adds support to trigonometry operators, allowing to create spider graphs and other geometric shapes with filters.

* Adds the missing trigonometric filter operators

This PR adds support to the missing trigonometric filter operators (cos, sin, tan, acos, asin, atan, atan2), allowing to create spider graphs, [pie charts, donut charts, polar charts](https://ffoodd.github.io/chaarts/pie-charts.html) and other geometric shapes with filters, which was previously not possible without add-ons.

Example :

`[[2]cos[]] = -0.4161468365471424`

See also this radar chart made in wikitext by @saqimtiaz using the new trigonometric operators :
https://saqimtiaz.github.io/sq-tw/temp/radar-chart-demo.html

* Add documentation for the Trigonometric Operators 

Accompanies code changes #6127

* Fix formatting of atan2 Operator.tid

Removed two empty lines at the end of the tiddler

* Add examples for the trigonometric operators 

Accompanies code changes Jermolene#6127

* Fix version in the doc for trigonometric operators

This PR fix the content of the documentation tiddlers regarding trigonometric operators (#6131). 

<<.from-version "5.1.20">> was changed to <<.from-version "5.1.21">>

* Fix formatting of atan2 Operator.tid

Removed two empty lines at the end of the tiddler

* Add missing parameter to atan2 operator

The atan2 operator needs two parameters (Binary Mathematics Operators), this PR adds the second one that was missing.

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2 for more technical info on the atan2 function.
2021-10-25 21:13:18 +01:00
jeremy@jermolene.com
8ae4428332 Fix $timestamp ignored for action-setfield widget when setting index values 2021-10-24 20:19:42 +01:00
Joshua Fontany
56dae90425
Fix $tw.utils.decodeURISafe and $tw.utils.decodeURIComponentSafe not available during boot process (#6107)
* call self.displayError

* Revert "call self.displayError"

This reverts commit 5d599aa979.

* fix 5999 URI utils bug
2021-10-20 16:25:05 +01:00
Telumire
1f6ef07860
Add trigonometric filter operators (#6127)
* Added missing trigonometrics filter operators

This PR adds support to trigonometry operators, allowing to create spider graphs and other geometric shapes with filters.

* Adds the missing trigonometric filter operators

This PR adds support to the missing trigonometric filter operators (cos, sin, tan, acos, asin, atan, atan2), allowing to create spider graphs, [pie charts, donut charts, polar charts](https://ffoodd.github.io/chaarts/pie-charts.html) and other geometric shapes with filters, which was previously not possible without add-ons.

Example :

`[[2]cos[]] = -0.4161468365471424`

See also this radar chart made in wikitext by @saqimtiaz using the new trigonometric operators :
https://saqimtiaz.github.io/sq-tw/temp/radar-chart-demo.html
2021-10-19 15:56:08 +01:00
jeremy@jermolene.com
6f61fa07fb Update view template to use whitespace trim 2021-10-02 17:22:10 +01:00
jeremy@jermolene.com
d5d73e02e9 Fix bug with innerwiki template
The problem was that the innerwiki template included the tiddler $:/plugins/tiddlywiki/railroad, which was omitted from the wiki. Unexpectedly, missing tiddlers were rendered by the jsontiddler widget as an empty object {}. The fix is to always include the title when the tiddler is missing.

Also cleaned up the template to remove unneeded tiddlers
2021-10-02 16:17:07 +01:00
Cameron Fischer
9c41fe1d18
JSONTiddler a little more extensible (#6057)
As per discussion #6043
2021-09-27 14:23:52 +01:00
jeremy@jermolene.com
e577cf7302 Render command: verbose mode should print title before rendering
Fixes #6067
2021-09-24 18:40:34 +01:00
jeremy@jermolene.com
ebf563ac70 Additional transliteration pairs
Fixes #6066
2021-09-24 18:29:40 +01:00
jeremy@jermolene.com
59a53e695b Further refine date format tokens for day of year and weekday number
See f223896c26
2021-09-23 10:09:27 +01:00
Jeremy Ruston
36dd8ea1d2
Optimise wiki.sortTiddlers() (#6053)
* Optimise wiki.sortTiddlers()

* Remove local changes to test-filters.js that have now been made on master

Makes the subsequent merge easier

* Fix bug with numeric sorts of textual values
2021-09-22 13:44:35 +01:00
Saq Imtiaz
b965ae926b
Fix(action-confirm): check if event is defined before accessing its properties (#6063) 2021-09-22 13:43:02 +01:00
jeremy@jermolene.com
bdbb884be0 MessageCatcher: Fix stack overflow when re-issuing a trapped message
This makes it possible to trap a message and then re-issue the same message within the action string without an infinite loop.
2021-09-20 16:46:26 +01:00