1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-05-30 17:22:17 +00:00
Commit Graph

2301 Commits

Author SHA1 Message Date
Jeremy Ruston cbd07465f3 Fix test rig shadow tiddler behaviour
The test rig previously used a simplified implementation of shadow tiddlers which broke with the new indexing engine. There was also a problem that made that even if indexers were disabled they were still initialised.

This PR fixes both problems, in preparation for fixing #4082
2019-07-16 16:53:37 +01:00
Simon Huber e2bad34e89 Fix bug and typo in framed.js (#4110) 2019-07-15 10:11:36 +01:00
Cameron Fischer b67e088e55 Reducing function calls across board (#4102) 2019-07-14 16:20:27 +01:00
Jeremy Ruston ac49b4d20c Cancel open popups when inputs get focus 2019-07-14 16:07:36 +01:00
Jeremy Ruston 8e7c0907f8 Add checkactions attribute to Checkbox widget
See discussion at https://groups.google.com/d/msgid/tiddlywiki/526754d5-8786-49cd-aaa1-c77311670116%40googlegroups.com:

The history here is that in v5.1.14 we added an "actions" attribute to the checkbox widget that specified an action string to be specified whenever the state of the checkbox changed. The same action string is executed regardless of whether the checkbox was checked or unchecked.

Then in v5.1.16 we merged https://github.com/Jermolene/TiddlyWiki5/pull/3182 which added the "uncheckactions" attribute. The difference between the two is that the uncheckactions are only executed if the checkbox is unchecked. The main "actions" attribute is executed before any actions in "uncheckactions", which makes it possible to arrange things so that the "actions" attribute sets things to the checked state while the "uncheckactions" attribute overwrites those changes to set things to the unchecked state.

In retrospect, it would have made more sense to have also added a "checkactions" attribute that was executed only if the checkbox was checked. I'll investigate adding it for v5.1.20.
2019-07-14 13:42:43 +01:00
Simon Huber 66dc7df745 Update popup.js 2019-07-14 09:37:53 +02:00
Simon Huber ba2f4822dd Merge branch 'master' into patch-10 2019-07-11 18:19:49 +02:00
Simon Huber ecbbe87a0d popup cancelling - use state reference
in the google group there's a discussion: https://groups.google.com/forum/#!topic/tiddlywiki/_mDDZ1jpMgU

buttons allow setting a state-reference for popups but the popup mechanism doesn't respect that
2019-07-11 07:35:06 +02:00
Simon Huber 345a6a0f90 Update framed.js 2019-07-10 09:57:11 +02:00
Simon Huber c647b42574 Update simple.js 2019-07-10 09:56:34 +02:00
Simon Huber 7811614d53 Update popup.js 2019-07-10 09:55:32 +02:00
Simon Huber 8aa6427d67 Update factory.js 2019-07-10 09:54:35 +02:00
Jeremy Ruston 86286c6fce Don't generate filenames starting with a period 2019-07-09 12:22:52 +01:00
Bram Chen a06acc4eb8 Update core/modules/savers/github.js
Using "$tw.utils.base64Encode()" to encode content of data instead of calling module library directly.
2019-07-05 11:03:05 +08:00
Jeremy Ruston 2a4c60b23d Allow tm-open-window to specify a page title 2019-07-04 15:59:34 +01:00
Jeremy Ruston 3edaa652ee Reveal widget: add option to avoid clamping popup position
Fixes #4041
2019-07-04 15:58:27 +01:00
Jeremy Ruston d489f61f2a include wiki in options sent to generateTiddlerFilePath 2019-07-03 17:54:58 +01:00
Bram Chen 958b3e7b7c Improve the base64 encode/decode utility functions (#4053)
Make good use of "$:/core/modules/utils/base64-utf8/base64-utf8.module.js"
* Add a new base64Encode()
* Both of base64Encode and base64Decode work for Nodejs and Browsers
2019-07-03 17:39:32 +01:00
jed c202ef4201 include wiki in options sent to generateTiddlerFilePath
This adds options.wiki to the object sent to the generateTiddlerFilePath

The function generateTiddlerFilePath can take a wiki in the options object, but generateTiddlerFileInfo doesn't pass the wiki to it.
2019-07-03 12:11:10 +02:00
Bram Chen de04755a0a Fix bug with not definded variable (#4049)
Using the variable "resolveCredentialsFilepath" to provide a good debug information.
2019-07-02 15:40:07 +01:00
Jeremy Ruston ed67f4a88b Add new tm-focus-selector message 2019-06-28 17:27:36 +01:00
Simon Huber 14003b0e88 Make framed editor use tiddler-editor-background color (#3611)
so we can customise it better if we don't like what we see
2019-06-26 14:53:49 +01:00
Simon Huber 69d3a47073 Add escapecss filter (#3546)
* add escapecss filter

this filter would allow creating valid css classes from titles containing special characters

we assign a class to an element using `encodeuricomponent[]` so that the class name is encoded

in a stylesheet we create the classname by `<title>escapecss[]` which applies the uri encoding and escapes characters that need to be escaped

* Update encodings.js

* refactor tagToCssSelector, add escapeCssSelector

* use escapeCssSelector

* escape using CSS.escape if it's available

* Update encodings.js

* revert factoring out escapeCssSelector
2019-06-26 12:32:01 +01:00
Simon Huber e313b0b7ca CSS.escape as startup module (#3574)
* don't know what I'm doing - apply polyfill methods

* don't know what I'm doing add CSS.escape polyfill

* execute polyfills in load-modules

* Delete cssescape.js

* add css-escape polyfill as startup module

* Update load-modules.js

* this was for testing :)

* Update css-escape-polyfill.js

* Update css-escape-polyfill.js
2019-06-26 12:31:22 +01:00
Simon Huber dc9f4e2de7 Pop storyview: animation - don't x-overflow page (#3857)
... this makes the animation when inserting tiddlers / navigating to tiddlers in the pop storyview less jumpy

it simply sets `overflow-x` to `hidden` for the time of the insert-animation
2019-06-26 11:50:52 +01:00
Jeremy Ruston 6582b106ee Fixes to split operator, plus instructions for using it to do search and replace 2019-06-21 10:21:52 +01:00
Jeremy Ruston 90684f9f52 Add support for [is[blank]] to detect empty/blank strings 2019-06-21 10:20:37 +01:00
Robin Munn 9b27f82a80 Fix sentencecase operator, add titlecase operator (#4006) 2019-06-21 08:24:02 +01:00
Jeremy Ruston 2e2ed7902c Add sentencecase operator
Fixes #4000
2019-06-19 12:11:02 +01:00
Robin Munn 62829dc9d3 Add untrunc operator, the mirror of trunc (#3994) 2019-06-17 18:34:30 +01:00
Jeremy Ruston 73eb7fbd4e Maths operators: Remove concat (same as addsuffix) and add splitregexp 2019-06-13 16:52:19 +01:00
Jeremy Ruston 86387a9185 Add some error trapping to maths operators 2019-06-11 17:18:18 +01:00
Jeremy Ruston dd7837d164 Fix issue with allafter operator
Fixes #3962
2019-06-11 09:38:14 +01:00
Jeremy Ruston f02352f6a1 Use default link text when link widget has no content
Fixes #3974
2019-06-10 21:04:21 +01:00
Jeremy Ruston 18fe112da7 Extend the enlist operator to optionally not de-duplicate 2019-06-10 17:54:46 +01:00
Jeremy Ruston 37bb75f0cf Add support for = prefix for filter runs that doesn't remove duplicates 2019-06-10 17:54:20 +01:00
Jeremy Ruston ac1d5b828d Fix regression in 7fcd2f132
Previously we saved tiddlers as .tid files using this template that explicitly excludes the "bag" field:

https://github.com/Jermolene/TiddlyWiki5/blob/master/core/templates/tid-tiddler.tid

Now we generate both .tid and .json files programmatically, and so we have to explicitly exclude the bag field
2019-06-10 17:52:26 +01:00
Jeremy Ruston 8012a3508f Ensure tiddlyspot saver works with local storage disabled
Fixes #3955
2019-06-08 16:38:13 +01:00
Jeremy Ruston 28c732d2be Improve action-createtiddler to return a draft title too 2019-06-04 12:33:01 +01:00
Jeremy Ruston 9c2726c530 Remove $tw.perf.log() banner under Node.js 2019-06-03 13:28:41 +01:00
Jeremy Ruston 5b09881679 Add new deletetiddlers command 2019-05-30 16:54:57 +01:00
Jeremy Ruston a8f70b08a8 Add indexes to the wiki store to improve performance (#3951)
* First pass at modular wiki indexes

An exploratory experiment

* Fix tests

* Faster checking for existence of index methods

We don't really need to check the type

* Use the index for the has operator

* Fix typo

* Move iterator index methods into indexer modules

Now boot.js doesn't know the core indexers

* Fix up the other iterator index functions

* Fix crash with missing index branch

* Limit the field indexer to values less than 128 characters

* Fallback to the old manual scan if the index method returns null
* Sadly, we can no longe re-use the field indexer to accelerate the `has` operator, because the index now omits tiddlers that have field values longer than the limit

Still need to make the index configuration exposed somehow

* Rearrange tests so that we can test with and without indexers

We also need to expose the list of enabled indexers as a config option

* Test the field indexer with different length fields

So that we test the indexed and non-indexed codepaths
2019-05-24 21:07:37 +01:00
Jeremy Ruston 2f8053265e Performance: Add average filter execution time 2019-05-20 12:50:10 +01:00
Jeremy Ruston ff85fcfe93 Fix typo from e8d1fbba6 2019-05-10 16:03:24 +01:00
Jeremy Ruston e8d1fbba6c Performance Instrumentation: Track execution times for individual filters
Fixes #3941
2019-05-10 15:56:01 +01:00
Jeremy Ruston 7869546fef Speed up reveal widget
It turns out that the `localeCompare` function used by `compareStateText()` is very, very slow. Replacing it with a straightforward equality test makes one of my test rigs be 10x faster...

Note that this PR reverts the behaviour of match/nomatch to that before #3157. That change was not backwards compatible in that the switch to localeCompare meant that é === e, now it doesn't again.
2019-05-10 08:47:00 +01:00
Jeremy Ruston 5ae14a16ec Classic Storyview: Optimise for animation duration of zero (part 2)
See fddc5d4ee
2019-05-02 21:21:22 +01:00
Jeremy Ruston fddc5d4ee6 Classic Storyview: Optimise for animation duration of zero (part 1)
Approximtely 50% speed improvement in tests opening a storyview with 8,000 entries.

(I've deferred the indentation adjustments until the next commit so that the git diffs are clearer)
2019-05-02 21:20:24 +01:00
Jeremy Ruston 091864ddaf Browser messaging: suppress logging
Commented out because it can be useful for debugging.
2019-05-02 20:21:58 +01:00
Jermolene b7e0930122 savewikifolder: Fix custom plugin fields
We need to carry across all plugin fields into the tiddlywiki.info file
2019-04-16 11:59:34 +01:00