Wykres commitów

62 Commity (master)

Autor SHA1 Wiadomość Data
Saq Imtiaz 041c3e817c
Support for macro params in filter operands (#5836)
* Exploratory pass at adding support for macro params in filter operands

* whitspace correction

* rename varInfo to varTree for disambiguation

* Refactored parseMacroInvocation to be re-usable, performance improvements for variables with no params and tests

* Revised regular expression and removed spurious white space changes

* Revised regular expression and removed spurious white space changes

* More whitespace cleanup and added more tests for edge cases

* Added test for macro params with square brackets
2021-06-29 22:21:39 +01:00
Joe Bordes 82ec63e711
style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
jeremy@jermolene.com 485779f5b2 Fix crash when accessing variables in filters that don't have a widget context
This should catch a large number of crashes, including:

Fixes #5716
2021-05-22 20:00:24 +01:00
Saq Imtiaz 8203ee06c3
Allow suffixes for filter runs (#5252)
* Make filter run prefixes extensible

* Make filter run prefixes extensible

* Support rich suffixes for filter runs

* merged conflicts

* Pass suffixes to filterrunprefix
2021-04-25 19:37:47 +01:00
jeremy@jermolene.com 7b1a0c6e6a Fix ES5 issue
Fixes #5545
2021-03-14 10:27:05 +00:00
Dyllon Gagnier 3eefb3cce6
Fix backtracking issue with regex (#5401)
There was an unnecessary
2021-01-29 15:26:25 +00:00
Cameron Fischer 6ca89304a1
Fix for LinkedLists when using bad filter prefix (#5251) 2020-12-10 18:25:53 +00:00
Cameron Fischer a857b4ab9a
use a linked list for filter runs. (#5206)
* Changed the filterrunprefixes to use LinkedList

* Testing for Linked List

* Finishing touches to LinkedList

* Minor corrections to link-list coding style

* Corrected for sneaky bug in linkedList
2020-12-06 08:54:57 +00:00
Cameron Fischer fbe5bb229a
Fix for filterrunprefixes using $tw.wiki (#5202)
* Fixed runprefix 'and' to use widget wiki

* Made widget arg of filterTiddlers optional again

* Switched to passing {wiki: wiki} to prefixes
2020-12-05 16:12:40 +00:00
jeremy@jermolene.com 64ac29adca Fix typo preventing filter run prefix modules from being cached
This had a significant impact on performance.
2020-11-25 13:58:54 +00:00
saqimtiaz 2b31c7a509
Multiple operands for filter operators (#4964)
* Firt pass at adding multiple operands to filter operators

* Optimized parsing of multiple operands and added more tests. Need more flexibility for interpreting multiple operands as variables/text references

* Add support for parsing text references and variables in multiple operands

* Added string-replace filter for testing multiple filter operands

* Added more tests for variables and text references in operands

* Removed string-replace operator and some whitespace corrections

* Removed string-replace operator and some whitespace corrections

* Added test with comma in operand
2020-11-07 09:47:08 +00:00
saqimtiaz c9efa23f02
Named filter run prefixes (#4915)
* First pass at refactoring filter code to support named filter run prefixes

* Remove filter prefix for now

* renamed module type and filter run prefixes

* Moved inline handling for no filter run prefix to 'or' filter run prefix.

* Added error handling for undefined filter run prefixes
2020-10-27 12:24:18 +00: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 e8d1fbba6c Performance Instrumentation: Track execution times for individual filters
Fixes #3941
2019-05-10 15:56:01 +01:00
Jeremy Ruston 09330968cc
New "else" prefix for filters (#3558)
* Experimental "else" prefix for filters

See #3557

* Docs updates for "else" filter runs
2018-11-20 13:29:44 +00:00
Jeremy Ruston 6dcdc2049a
Enhance search operator (#3502)
* Enhance search operator

* Add support for searching all fields

and also searching all fields except nominated fields.

* Docs tweaks

Thanks @pmario

* Error message improvements

* Improve error message formatting
2018-10-30 17:39:18 +00:00
Tobias Beer bf253a603b Removed unused vars + some whitespace (#2106) 2016-10-08 13:32:14 +01:00
Myeongjin 6388f859d1 Add localisable strings for error (#2447)
* Add localisable strings for error

* Update tiddler Transclusion Basic Usage in fr-FR
2016-05-17 21:58:47 +01:00
Astrid Elocson 07c1dcb685 Improve a couple of comments 2015-01-14 20:09:15 +00:00
Astrid Elocson 82c0152e04 Fix #1346: Quotes around filter steps 2015-01-14 20:06:51 +00:00
Jermolene 7ed1a2ebc7 Ensure that deprecations are clearly marks
So that we can easily remove them before we come out of beta.
2014-09-10 09:20:43 +01:00
Jermolene d45c417c18 Add deprecation warning for regexp filter operators 2014-09-09 23:05:58 +01:00
Jermolene cb0eba73c2 Typo 2014-07-28 14:20:18 +01:00
Jermolene be040ea8a2 Add support for variable filter operands
Fixes #583
2014-07-25 15:26:44 +01:00
Jermolene 21b2d6fdc7 Allow filter operators to return an iterator
Previously filter operators were only permitted to return an array of
tiddler titles
2014-04-30 22:50:17 +01:00
Jermolene 385c7e207c Refactor wiki.filterTiddlers()
Now we pass a widget instead of the current tiddler title. We can use
widget.getVariable(“currentTiddler”) to get the current tiddler.
2014-04-27 20:03:33 +01:00
Jermolene b7f674c51a First pass at refactoring filter execution
This is the beginning of addressing #523.
2014-04-03 20:49:16 +01:00
Jermolene d402d3c5a6 Add performance measurement features
This is an experimental module to help us measure the performance of
the refresh cycle and the filter mechanism. Not intended to replace the
performance measurement features in browser developer tools, just to
make it easier to automate performance checks cross-browser.

The immediate purpose is to help in refactoring the filter mechanism.
The recent change to encapsulate the wiki store “tiddlers” object has
hurt the performance of filters, and it’s going to be helpful to have
decent measurements while refactoring that code.

I’m still not convinced that this stuff should be in the core, and may
well end up removing it after the present refactoring cycle.
2014-04-01 08:33:36 +01:00
Jermolene 721e333a20 Starting to make the members of $tw.Wiki be private
We want to avoid plugins from directly accessing the tiddlers hashmap.
Later we’ll do pluginTiddlers, pluginInfo and shadowTiddlers.
2014-03-16 21:23:10 +00:00
Jermolene 70a120d4a6 Expand the logging mechanism to support alerts overlaid on the main screen
Now we get decent visual indication of sync errors, for instance. Still
work to do to coalesce alerts so that the screen doesn’t fill up with
them after an interval. And probably we should add a button to clear
all alerts.
2014-02-14 07:53:41 +00:00
Jeremy Ruston 523eae83ff Merge pull request #407 from Skeeve/regexp_filter
fixed an awful typo in the regexp
2014-02-12 21:38:54 +00:00
Stephan Hradek 0dc8de9dd2 fixed an awful typo in the regexp
The regexp fails when backslashes are used in the search-regexp. The closing bracket was at the wrong position.
2014-02-12 22:34:13 +01:00
Jermolene a76da88380 Rename the operator portion after the colon to "suffix" 2014-01-24 19:15:27 +00:00
Jermolene e6a7a0db1e Style tweaks 2014-01-24 18:54:50 +00:00
Stephan Hradek 14ca91a949 implemented the new regexp syntax 2014-01-14 22:08:05 +01:00
Stephan Hradek 0338c36610 implemented the field: syntax 2014-01-14 16:19:34 +01:00
Stephan Hradek a5d75db8d2 Thinking about your mail led me to this new push -> Mail follows 2014-01-13 08:44:53 +01:00
Stephan Hradek 8ef520ef37 Created regexp search for milestone 5.1 2014-01-10 10:32:49 +01:00
Jermolene a45f64e738 Trap filter syntax errors
Now a syntax error on a filter just causes the filter to return the
error message as it’s single result.

Fixes #189
2013-11-21 08:52:41 +00:00
Jeremy Ruston f4a3b25d3e Extend the filter mechanism to allow operands to be indirected through a tiddler text reference
In other words, as well as `[sort[myfield]]` to sort by the field
called `myfield`, one can do `[sort{MyTiddler}]` to sort by the field
whose name is in the text of the tiddler `MyTiddler`.
2013-05-27 17:57:37 +01:00
Jeremy Ruston 0cf5dc699e Refactor the filter mechanism
Long overdue rewrite to make it simpler, and break the filter operators
out into individual modules.
2013-05-25 17:26:22 +01:00
Jeremy Ruston e42a062dcc Fixed bug with negated title filter 2013-04-25 10:03:37 +01:00
Jeremy Ruston dc00e584fb Add support for filtering shadow tiddlers 2013-04-03 14:29:12 +01:00
Jeremy Ruston 952f1b3900 Add tiddler info dropdown
Including backlinks
2013-03-19 16:45:07 +00:00
Jeremy Ruston 7cb65a3816 Add 'missing' and 'orphan' tabs 2013-03-19 10:14:44 +00:00
Jeremy Ruston 623a3ec8f8 Rename "shadow" tiddlers to "system" tiddlers
What we have at the moment isn't really the same as TiddlyWiki
classic's shadow tiddlers, it's a much simpler system for excluding
tiddlers. We'll use the term "shadow" instead to refer to the way that
tiddlers in plugins behave, which is exactly like TiddlyWiki classic's
shadow tiddlers.
2013-03-15 22:00:19 +00:00
Jeremy Ruston 1b2cdf9cd0 Use string.charAt(n) instead of string[n]
Safari doesn't seem to like the string indices in some circumstances
2013-02-05 19:12:05 +00:00
Jeremy Ruston 9612aac296 New implementation for shadow tiddlers
Now shadow tiddlers are any tiddler whose title starts with "$:/"
2012-11-11 14:31:45 +00:00
Jeremy Ruston 9f6909ddc4 Appeasing the gods of JSHint 2012-11-06 17:21:56 +00:00
Jeremy Ruston 950b46276e Start updating the browser prefix stuff
The old way led to code that was too long and unreadable.
2012-10-25 14:58:32 +01:00