* docs: abount modern frameworks
(cherry picked from commit 783547bac2d1bfaa20def3eeda0dc10b6b465d8d)
* docs: modified time
(cherry picked from commit c8db907fe273a414768f5292f61986800e092dfe)
This avoids breaking existing code that expects to be able to import the core macros with just $:/tags/Macro
@pmario - I suggest that future updates use the same approach
Thanks to @ericshulman for reporting the problem
* feat: add transcludes and backtranscludes filter and its relying indexer
* feat: add test about backtranscludes
* docs: add doc about transcludes and backtranscludes Operator
* refactor: merge backlinks and backtranscludes indexer
* fix: test not executed
* fix: latest transclude use $tiddler instead of tiddler
* feat: A tiddler transclude with template will still use the tiddler as result.
* docs: wrong comment
* Improve Filter Syntax documentaion / navigation
* update links and missing diagrams
* rename legacy prefix to shortcut prefix
* Update editions/tw5.com/tiddlers/filters/Filter Operators.tid
Co-authored-by: yaisog <m@rcuswinter.de>
* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid
Co-authored-by: yaisog <m@rcuswinter.de>
* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid
Co-authored-by: yaisog <m@rcuswinter.de>
* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid
Co-authored-by: yaisog <m@rcuswinter.de>
* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid
Co-authored-by: yaisog <m@rcuswinter.de>
* Update editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid
Co-authored-by: yaisog <m@rcuswinter.de>
* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid
Co-authored-by: yaisog <m@rcuswinter.de>
* add most changes a suggested by yaisog
* fix copy / paste from-version
* replace operand with parameter in the docs
* fix typo
* fix typos and improve railroad diagrams consistency
* move "new from version" info for filter run prefixes below the table
* fix typo transclusion and substitution
* Move Filters tiddler to the top level in the TOC
* wip-breadcrumbs
* breadcrumbs & breadcrumbsList macro final
* remove files that do not belong to this PR
* restore release banner
* add simple / story mode to breadcrumbs
* .breadcrumbs macro update comments
* new breadcrumbs CSS, woks with small screens
* make CSS configurable using hidden-settings
* improve CSS fro small screens
* remove the initial: recursiveParentTag macro
* improve location info for breadcrumbs nav. add "alt-text" for Edge ::after element
* breadcrumbs add mode=field
* bc add initial docs
* breadcrumbsField will also respect the story ordering
* add configurable global filterMode setting
* improve arrow CSS for browser zooming
* add bc links use bc-caption if caption field is non-empty
* breadcrumbs improve comments
* breadcrumbs aria-lable uses caption if there is one
* breadcrumbs improve documentation
* breadcrumbs improve docs for sort param
* fix showArrows docs
* remove .bc-link aria-label .. it's not needed if caption is resolved properly
* use subfilter instead of enlist to evaluate the "excluded" variable. Be consistent with toc-macros
* remove breadcrumbs macros - they have their own PR now
* resolve conflict
* add back doc-macros tiddler
* integrate :then filter run prefix
* remove .breadcrumbs macros and their config tiddlers
* fix typos as requested
---------
Co-authored-by: yaisog <m@rcuswinter.de>
* First commit
* Typo
* Add support for delay parameter
* Add confetti widget
* Add tour plugin
* Add element spotlight to dynannotate plugin
Useful for highlighting on screen elements for the user
* More and bigger confetti by default
* Use new element spotlight to provide hints
* Adjust hint selectors for create tiddler tour step
* Include confetti plugin in prerelease
* Clarify wording of confetti demo
* Don't link TiddlyWiki in the tour panel
* Tweaks to tour buttons
* Mark dependents of the tour plugin
* Add full screen section of tour and tour edition
* Remove Anna Freud references from welcome tiddler
* Build the tour edition in the preview
* Fix typo in build script
* Populate tour edition with solar system data
From Simple English Wikipedia
* Missing tag
* Add page control button to start tour
Also make the tour controls visible in full screen mode
* Refactor to use global procedures to control the tour
* Change "startup-actions" field to "enter-actions" to avoid confusion
* Add a tour logo
* Refactor to allow multiple tours to be loaded at once
* Remove wikification from welcome tour step
* Update docs
* Simplify styles for top bar
* Tours should have a $:/tags/Tour tag
* Tour should autostart in the tour edition, but not in the main wiki
* Better labelling for the main preview
* Fix build process
We build a separate tour.html wiki, but can include the tour in other wikis too
* Remove obsolete text
* Add "using tags" as a separate tour
* Remove old debugging code
* Add tour chooser
* Ensure that the current tour isn't listed as an option in the final step
* Use whitespace trim
Note that the setting is inherited by procedure and widget definitions
* Simplify tour step format
* Remove obsolete state tiddler
Not needed because now we initialise it in startup actions
* Fix gap between navigation buttons
* Clean up tiddler titles within the introduction tour
* Finish allowing the name "TiddlyWiki" to be customised
Some of the code was in the previous commit. Next we'll wire up the user interface
* Clarify docs
* Add a settings pane giving a birds eye view of a tour
* Avoid having to embed confetti in the final step
* Update docs
* Tweak styling of tour chooser dropdown
* Add a button to launch tour steps directly, and give them captions
* Expose custom tour settings
* Use the tour step caption as the heading
* Fix initialisation when jumping to a tour step
* Introduce step about tags
* Improve wording
* Improve styling of task call-to-action and nav buttons
* Adopt new conditional shortcut syntax
* Wording and ordering tweaks
* Fix typos
Thanks @pmario
* Simplify styling of tour overlay
* Use custom palette colours
Makes it easier for people to use their own colour scheme for the tour
* More custom colours
* Tour wording tweaks
* Extends the tour plugin with a condition field (#7861)
* feat: support condition field to determine whether a step should be shown
* feat: add support for overriding the hint text using the field 'hint' from the step tiddler
* fix: roll back tour display procedure for now until an override mechanism has been discussed
* fix: renamed advance-criterion field and associated variables to step-success-filter
* fix: renamed hint field to hint-text and selector to hint-selector
* refactor: to create function to get all tour tiddlers filtered by their condition field
* refactor: rename globals tiddlers to variables and avoid making any of the tour procedures global
* fix: also rename globals.tid file to variables.tid
* docs: cover all tour steps tiddler fields
* fix: improve spacing in Tour HUD
* WIP
---------
Co-authored-by: Jeremy Ruston <174761+Jermolene@users.noreply.github.com>
Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
* Added some passing macro definition parsing tests
* Added two failing tests to illustrate bug #3460
* Allow \end to end an whitespace only/empty macro definition. Fixes#3460
* Added some passing procedure definition tests
* Added two failing procedure tests to illustrate bug #3460
* Allow \end to end a whitespace only/empty procedure/function/widget definition. Fixes#3640
* Fixed wording of comment
* Update ViewWidget.tid to include common varients
The provision of common variates to the view widget provides new an experience user examples of the different variants of the ViewWidget. The copy to clipboad method allows each variant to be quickly accessed and pasted into their wiki.
To facilitate this a new macro wikitext-example-compact has being added to
$:/editions/tw5.com/wikitext-macros
* Update ViewWidget.tid
Two colons added to maintain indenting in new content.
Adding the line
Use the [[ActionDeleteTiddlerWidget]] to delete a named tiddler without getting the "Do you wish to delete the tiddler" prompt.
However If someone knows how to make "WidgetMessage: tm-delete-tiddler" do this please explain.
* Add join attribute to list widget
* Use new join attribute in HTML saving templates
This simplifies the logic involved in saving tiddlers in JSON format
into TW html files, and should also slightly speed up the saving process
depending on how often that list widget gets refreshed.
* Unit tests for list widget's new join attribute
* Add `<$list-join>` widget
Allows specifying complicated join text more easily than an attribute
* Add data attribute support to button widget
* Fix typo
* Refactor ready for making mechanism more generic
* Apply more generic implementation to multiplate widgets
* Refactor to use existing widget.assignAttributes() method
* Fix typo
* Clarify docs
* Update docs
* Update select widget to support style.* attributes
* Remove obsolete comment
* Fixes refresh issues for checkbox and links widgets for data attributes (#7846)
* fix: refresh issues with checkbox and links widgets
* fix: indenting
* Feat: add support for data attributes to Draggable and Droppable widgets (#7845)
* Docs clarification
* docs: add style and data attributes to Draggable and Droppable widget docs (#7850)
* Refactors Select widget to directly create DOM node (#7848)
* fix: refactored SelectWidget to directly create DOM nodes
* fix: refactored SelectWidget to directly create DOM nodes
* fix: improve refresh handling for select widget
* Fixes issues in the PR "Button widget data attributes" (#7852)
* fix: fixed ordered attributes handling and improved tests to catch event attributes
* fix: clean up code from testing
* fix: more tests and refactoring
* fix: use lowercase when checking for event attribute prefix
* fix: use lowercase when checking for event attribute prefix
* fix: changed comment wording
* fix: minor refactoring
* refactor: for brevity
---------
Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
* Modify SetWidget to include use to set global variables.
* Make sample variables easier to read.
* Change text to indicate use of pragma whitespace trim.
* Make compliant with 5.3.1 (?) release
* Add usemap attribute to image macro
Allow for a usemap attribute on the $image macro call which is passed through to the resulting img tag. This makes the use of HTML image maps [1] possible.
[1]: <https://www.w3schools.com/html/html_images_imagemap.asp>
* Document new usemap attribute in ImageWidget
* Update version docs
---------
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
* add archive HTML wikis, add index.html + css
* only build archive for release version
* tested and add more docs
* fix indent
* fix spacing
* add $TW5_BUILD_OUTPUT_ARCHIVE env variable for testing
* use $TW5_BUILD_OUTPUT_ARCHIVE to check if archive should be built
* use TW5_BUILD_ARCHIVE as requested
* Simplify Permalink/Permaview URLs
* Fix lint warnings by removing arrow functions
* Remove commented sample code
* Remove post-ES5 code
* Add many more allowable non-percent-encodedcharacters
* Fix more ES6+ stuff, add end-of-sentence padding character.
* Fix to match standards
* Move the new code from boot to util
* Change from custom map/filter to $tw.utils.each
* Make `each` blocks multi-line
* Move the permalink handling to its own file
* Remove auto-navigation
* Revert "Remove auto-navigation"
This reverts commit ca1e5cf387.
* Add unit tests for negative indexes in json ops
* Allow negative indexes in JSON operators
Negative indexes will be treated as counting from the end, so -1 means
last item of the array, -2 means next-to-last item, and so on.
* Add documentation for negative indexes
* Add support for running in-browser tests via playwright in GitHub CLI
* `ci.yml` was updated to store the report so that it can be inspected on failure
* `ci-test.sh` was added as an expansion to `test.sh` which installs and runs playwright
* `playwright.spec.js` does the actual verification of opening the test TW edition in browser, waiting for the tests to finish and then verifying it has indeed passed
* `playwright.config.js` Playwrifht configuration
* Add support for running in-browser tests via playwright in GitHub CLI
* `ci.yml` was updated to store the report so that it can be inspected on failure
* `ci-test.sh` was added as an expansion to `test.sh` which installs and runs playwright
* `playwright.spec.js` does the actual verification of opening the test TW edition in browser, waiting for the tests to finish and then verifying it has indeed passed
* `playwright.config.js` Playwrifht configuration
* Fix file permissions for `ci-test.sh`
* Increased node version for github actions to support playwright
* Add installation of the required @playwright/test library during CI test execution
* Fix encodebase64 and decodebase64 filters
The documentation for encodebase64 says that the input is treated as
binary data, but in fact the input is being treated as text data, with
an extra UTF-8 encoding step being performed first.
Likewise, the decodebase64 documentation says that it outputs binary
data, but in fact it will do a UTF-8 decoding step before producing
output, which will in fact garble binary data.
This commit changes the behavior of encodebase64 and decodebase64 to
match what the documentation says they do. It also adds an optional
`text` suffix to both filters to keep the current behavior.
Finally, an optional `urlsafe` suffix is added to both filters to allow
them to use the "URL-safe" variant of base64 (using `-` instead of `+`
and `_` instead of `/`).
* Try to fix failing test
Turns out a little more than this is going to be needed.
* Fix binary base64 encoding, including unit tests
* Update base64 filter documentation
* Can't use replaceAll, too new
Have to use String.replace with a global regex instead
* Replace uses of window.btoa() in rest of code
Since window.btoa() is not available under Node.js, we'll replace all
uses of it with the $tw.utils.base64encode() function that now works
correctly for binary data.
* Add link to UTF-8 glossary definition at MDN
* Passing test
* Failing test
* Fix test
It still fails, but now fails correctly
* Fix refreshing transcluded functions (#7755)
We store the previous result of the filter function and recalculate it
when the transclude widget needs to be refreshed, refreshing the widget
if the result is different.
---------
Co-authored-by: Jeremy Ruston <174761+Jermolene@users.noreply.github.com>
Co-authored-by: Robin Munn <rmunn@pobox.com>
* Initial Commit
* Update docs
* Add support for elseif blocks
* Another test
* WIP
* Change from `{%if%}` to `<%if%>`
See discussion here - https://talk.tiddlywiki.org/t/proposed-if-widget/7882/64
* Don't use the widget body as the template if a list-empty widget is present
See discussion here - https://github.com/Jermolene/TiddlyWiki5/pull/7710#issuecomment-1717193296
* List widget should search recursively for list-template and list-empty
* Allow block mode content within an if/then/else clause
* Update docs
* Add from-version tag to docs
* Change favicon format from ICO to PNG
* Revert renaming `./favicon.ico`
Keep the backwards compatible file name `./favicon.ico` (though they will actually be in PNG format now).
* Add SVG template for creating favicons
Add `favicons.svg`, the template for creating the current PNG favicons, along with some helpful information about it in `favicons.svg.md`.
* Add source Inkscape SVG
Add source Inkscape SVG as an example of image tiddler in tw-com
* Add failing test for list widget with counter-last
The failing test appends a value to a list without changing the rest of
the list, and the counter-last value doesn't get updated correctly when
that happens. Also added another test, which passes, testing removing
the last item of the list, just in case of a regression.
* Improve unit tests for counter-last list widget bug
The unit tests were looking very similar to each other, so I factored
out the common code and made them into simple data-driven tests.
* Fix bug where counter-last fails in list widget
The only scenario that was failing was when counter-last was used, but
the list was strictly appended to with no other changes made. The one
unit test that was failing now passes with this fix.
* Improve bugfix to list widget counter-last
Now we only refresh the last item if it was truly necessary.
Currently I'm building these files myself for use on tiddlyhost.com.
I'm thinking it would be nicer if they were built and distributed by
TiddlyWiki's own build automation, so this is a step towards that.
The two new files that are created, "empty-external-core.js" and
"tiddlywikicore-<version>.js" will appear alongside the existing
"empty.html" and "empty.hta" when the TiddlyWiki site is deployed.
I noticed these inconsistencies in the tiddlywiki.info json files
while working on the previous commit and thought I'd fix them for
the sake of neatness and tidiness.
This contains whitespace changes only, so git diff -b should be
empty.
Includes:
- Remove some trailing whitespace in several files
- Fix incorrect indenting in one file
- Add end of file newlines in two files
* Update _Timimi_ Extension and executable by Riz.tid
Include the line
* The native host requires a component installed on the host computer, outside the browser.
So it is clearer there are two components to be installed and access to the local machine is implied.
* Update _Timimi_ Extension and executable by Riz.tid
Added blank line
* Use 'translink' macro on widget attribute 'subtiddlers' to make it browsable by scrolling
* Avoid the styling of the translink macro by directly transcluding
---------
Co-authored-by: btheado <btheado@mailinator.com>
* Factored out variable invocation tiddlers into separate tiddlers
* Document the variable attribute value behavior more completely
---------
Co-authored-by: btheado <btheado@mailinator.com>
* Update Widgets in WikiText.tid
Added Minimalist link to [[Substituted Attribute Values]] so the new method is also listed.
* Update Widgets in WikiText.tid
removed see also
* Refactor parse mode out of getTransclusionTarget
* Refactor missing transclusion target
* Add a test to avoid regressions on the handling of macros vs procedures
* Refactor condition logic
* Preparing to split getTransclusionTarget into two separate functions
* Split getTransclusionTarget into getTransclusionTargetIncludingParseTreeNodes
* Resolve another inefficiency
The transclusion target was sometimes being parsed twice when transcluding as text/plain
Associated test results are also made more consistent
* Simplify method naming
* Neatening up
With a demo courtesy of https://random.dog/
@rmunn you recently worked on the base64 utilities. I tried to use $tw.utils.base64Encode instead of window.btoa, but found that it didn't work. It's concerning because we expose that utility method as a filter operation, and it would be frustrating if we were not base64encoding things properly.
* Added failing test for #7604
* Fix attribute substitution regexp
Use the same regexp in wiki.getSubstitutedText as is used in
Widget.prototype.substituteVariableReferences. Fixes#7604.
* Added a test for a variable name containing spaces
Fixing error in
* [[a transclusion of a macro/variable|Transcluded Attribute Values]]
Which should be;
* [[a transclusion of a macro/variable|Variable Attribute Values]]
* Initial commit
* Replace previous result only when non-empty
* Add doc tiddler
* Small change in rp-output description
* Update FRP title
lowercase with colon prefix
* Integrate with other doc tiddlers
* Add two doc-styles for reuse
* Add tests
* Add another test
* Correct indentation in stylesheet
* Change title and tags, add example to doc tiddler
* Replace leading spaces with tabs
* Improve docs text and structure
* feat: new text substitution support, first pass
* fix: use the widget method instead of evaluating a filter
* revert to earlier implementation that emulates macro syntax
* fix: capitalize comments
* feat: add support for triple backticks for substituted attributes
* docs: added docs for substitute operator
* chore: more docs tweaks
* docs: substituted attributes, refactored docs for widget attributes
* docs: fixed typo
* docs: more examples for substituted attributes
* docs: updated prior documentation on concatenating text and variables
* docs: documentation corrections
* Update editions/tw5.com/tiddlers/filters/examples/substitute Operator (Examples).tid
Co-authored-by: btheado <brian.theado@gmail.com>
---------
Co-authored-by: btheado <brian.theado@gmail.com>
* Add support for \dir pragma
* Add "dir" attribute to reveal, edit, edit-text and edit-codemirror widgets
* Add $:/config/DefaultTextDirection hidden setting
* Revert accidentally commited test data
This reverts some of commit b83c1d160f.
* Remove Codemirror plugin from Prerelease
Makes it easier to test things
* Fix framed text editor directionality in Firefox
* Add direction attribute for edit body template
* Missed closing brace
* Add docs for \dir pragma
* Templates should set text direction from a variable, not a transclusion
* Updates to framed.js in the light of PRs that have been merged since this
* Restore whitespace trim
* Docs dates
* Fix typo
* Clarify docs
* Update ShadowTiddlers.tid
main change is added section about "overriding shadow tids"
* The word "extracted" might be confusing
---------
Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
* toc make exclude a proper macro parameter using subfilter instead of enlist
* add exclude parameter to TOC documentation tiddler
* add exclude parameter to toc-tabbed-xx macros
* add from-version to exclude parameter
* Initial Commit
* HttpClient object shouldn't need to know about events
* Add support for cancelling HTTP requests
* Make the number of outstanding HTTP requests available in a state tiddler
* Add a network activity button
Click it to cancel outstanding requests
* Fix typo
Thanks @btheado
Co-authored-by: btheado <brian.theado@gmail.com>
* Fix crash when cancelling more than one HTTP request
Thanks @saqimtiaz
* Further fixes to cancelling outstanding HTTP requests
* Fix missing body
---------
Co-authored-by: btheado <brian.theado@gmail.com>
* Disable camelcase by default
* New parse rule for ~CamelCase
For backwards compatibility with text that includes ~ to suppress camelcase links
* Enable CamelCase for main documentation wikis
Will take us a bit longer to convert all the links over
* Fix tests
* Release note update
* feat: added deserialize operator, tests and documentation
* fix: correct typo in lingo file
* fix: remove test that fails on node but succeeds in browser due to different availability of DOM deserializer
* fix: CJK in header has to be urlEncoded
* refactor: use $tw.utils.decodeURIComponentSafe
* docs: about chagne in this field
* docs: update
* docs: use less "field"
* Update ParametersWidget and add Examples
This PR updates the ParametersWidget.tid and adds several examples
* Update Procedure and Parameters Pragma
This PR improve documentation for using parameters inside procedures
* Update Pragma_ _procedure.tid
A caution when use parameters inside procedures
* Resolved conversation
All comments by Jeremy were implemented.
* Checkbox widget should not affect date fields
If a date field like `created` or `modified` is passed as the listField
attribute of the checkbox widget, it will be left unchanged and actions
on the checkbox widget will *not* fire.
Includes unit tests to ensure that the "created" and "modified" fields
will not be touched by checkboxes and will continue to be Date objects.
* Replace const with var in checkbox tests
* Update Using Excise.tid
Rephrase the last paragraph (note).
Fix some minor formatting.
* Update WidgetMessage_ tm-edit-text-operation.tid
Add link to `translink Macro`
* Create TranslinkMacro.tid
* Create translink.tid
* First Pass Implementation
* Fix Check
* Fix Style
* Update drag-drop interop example to support copy tiddlers to clipboard
---------
Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
* Create timestamp.js
Taken verbatim from @ericshulman.
* Add description of the timestamp suffix
* Add an example for timestamp use
I also snuck it a couple of cosmetic corrections, because I was too lazy to open a new PR. 😢
* Correct example 4 to use the right date formats
* Correct description of the default date format
* Add a test for the timestamp suffix
* Add more format:timestamp tests
* Drop invalid input
* Update version tag in docs
---------
Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
* Initial Commit
* Change of mind: Do not blank thisTiddler within macros
* Revert previous implementation
* Somewhat simpler implementation
* Add docs
* Add docs version tag
* external-js file naming adjusted. import docs form tw5.com. make external-js more visible
* add comment about doc usage in server-external-js edition
* add changes suggested by cdruan
* change modifed date to start vercel rebuild process
* Add searchModes: literal, some and words
* Add additional search modes
Description of selection tracker config tiddlers was also changed.
* Update simple.tid
* Improve View Template examples
Transcludes a sample tiddler for demonstration instead of the dynannotate view template code.
Adds an example for usage with $genesis to add state tiddler controlled per-tiddler highlights.
* Make search highlights not case sensitive
* Remove created and modified fields
* Add another example text (Searching in Tiddlywiki)
* Add dynannotate for vercel deployment
This should probably not be merged...
* Create LegacySelectionTracker.tid
* Create SelectionTracker.tid
* Revert putting the SelectionTracker config titles in code blocks
* Replace inline styles with CSS class
* Add class for view template examples
Class name is tc-dynannotate-example-frame.
* Remove some <br> line breaks.
* Remove first example transclusion and fix some tab spacing
* Add class to override control panel table layout
* Add class to settings table
* More tab shenanigans
Great Scott!
* Add explanatory comment to example macro
* Change defaults to match widget behavior
* Make previous macro comment more concise
* Change example to transclude CP tiddler
$:/core/ui/ControlPanel/TiddlerFields
* Delete unnecessary example tiddler
* Add 'filepath' source attribute to tiddlywiki.files
Adds a new source attribute to facilitate importing subdirectories with
the `searchSubdirectories` attribute.
The `filepath` atttribute is like `filename` except it includes the full
pathname relative to the directory path. Consequently it only works with
`directories` sections (not `tiddlers`).
* Add `subdirectories` source attribute to tiddlywiki.files
Adds another new source attribute to facilitate importing subdirectories
with the `searchSubdirectories` attribute.
The `subdirectories` source attribute is only usable with `directories`
sections (not `tiddlers`). It resolves to an array containing all the
directories in the file's path relative to the directory path. Eg, if
the directory path is `files`, `{ source: 'subdirectories' }` for a file
in `files/images/photos` would resolve to `['images', 'photos'].
This commit also adds an example to the "tiddlywiki.files Files"
documentation tiddler that demonstrates using the `filepath` and
`subdirectories` source attributes to import and auto-tag image files
as external-image tiddlers.
* Initial commit
Everything is draft.
* Fix test execution
* Fix and test missing target handling
* Use the ubertransclude widget for the wikitext transclusion syntax
* Changed transclude widget in binary parser to ubertransclude
* Add a test for custom action widgets
* Don't worry about ordered attributes
The changes in 0bffae2108 mean that we don't need to explicitly maintain the ordered attributes
* Remove need to explicitly clear widget mapping variable when invoking overridden widget
* Use ts- prefix for system slot names
* Add a definition for the value widget just so that it doesn't cause errors
Of course, it doesn't actually need to be a JS widget, it could be a wikitext widget...
* Add support for positional parameters
* Ubertransclusion positional parameters should be based on name, not position
* Add support for shortcut syntax for positional transclusion parameters
* Importvariables should skip parameters widgets
* Refactor transclude widget before uberfying it
* Refactor ubertransclude functionality into transclude widget
* Replace ubertransclude widget with transclude widget
* Add wikitext shortcut for new-style function definitions
* Allow brackets to be omitted for function definitions with no parameters
* Add pragma rule for parameters declarations
* Remove erroneous "tag" property
* Add support for accessing function parameters as name/value pairs
* Be as permissive as possible with parameter names
Previously restricted to upper and lower case, digits and dash and underscore
* Rewrite some tests to use the shortcut syntaxes
* Mustn't allow commas in parameter names
* Fix crash when transcluding an undefined variable
Thanks @pmario
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1114692359
* Unquoted parameters should not eat a succeeding comma
Fixes#6672
* Remove extraneous code
* Allow the let widget to create variables starting with $
* Fix addAttributeToParseTreeNode handling of ordered attributes
* Reuse attribute objects when executing custom widgets
* Fix importing of function definitions
* Fix parameter handling
* Introduce genesis widget for dynamically creating widgets
See the "RedefineLet" test for a contrived example of usage
* Change tiddler separator used in wikitext tests
Underscore looked ambiguous; I kept typing dashes by accident
* Cache parse trees when transcluding variables
* Fix bug with empty strings ignored in $tw.utils.stringifyList/parseStringArray
I will pull this out into a separate PR. Fixing it doesn't cause problems for the core but I imagine it might cause issues for 3rd party code.
* Fixes to enable the transclude widget itself to be overridden
There are two big changes here:
Replace the previous "ts-wrapper" mechanism, which we had been using to redefine custom widgets inside their definitions to prevent recursive calls. Now we've got the genesis widget we can instead control recursion through a new "$remappable" attribute that allows the custom widget mechanism to be skipped.
We also extend the slot widget to allow a depth to be specified; it then reaches up by the indicated number of transclusion widgets to find the one from which it should retrieve the slot value.
* Fix genesis widget example
* Use enlist:raw to preserve duplicates
* Don't create variables with value undefined for missing parameters
* Fix variable retrieval bug with test harness
* Improve recursion detection
While retaining backwards compatibility
* Experimental support for custom filter operators
Just as we can define custom widgets we can also define custom parameterised filter operators
* Add visible transclusions component and demo
Very useful to see transclusions explicitly
Makes a good demo of a super-complicated widget override.
* Genesis widget should pass raw attributes onto child widget...
...so that it can more efficiently handle refreshing itself.
* Use consistent parse tree node property for params
* Extend transclude widget to work with old-style macros and use it for the macrocall shortcut syntax
* Clarify that the recent changes allow functions to be invoked with the double bracket syntax
In other words, the transclude widget distinguishes between functions and macros and handles the parameters appropriately
* Make the macrocall widget delegate to the transclude widget
* Switch to using \procedure to define new-style macros, and \function for custom filter operator functions
I now need to update the OP!
* Fix visible transclusion example
* Remove obsolete code
Left over after refactoring
* Better backwards compatibility for legacy recursion marker
Fixes the problem with tag dropdowns @btheado
* Fix stringifying/parsing string arrays containing newlines
A very old bug.
Fixes the ActionListOpsWidget problem @btheado
* Transclude: replace paramNames/paramValues with more robust JSON payload
More details at https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1123719153
* Rename internal "unknown" filter operator so that users cannot invoke it
* Detect recursion by tracking widget tree depth
The old recursion marker approach was very slow, and didn't catch test cases like editions/test/tiddlers/tests/data/transclude/Recursion.tid
* Use \widget for custom widget definitions, and remove need for angle brackets
Need to do some refactoring of all those isFunctionDefinition/isProcedureDefinition/isWidgetDefinition flags into a single property
* Rename <$value> widget to <$fill>
* Require $$ for custom widgets, and that overridden JS widgets must exist
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1133637763
* Fix invocation of JS macros
* Experimental update of the parse-tree preview visualisation
An experiment to try out using the new JSON operators for rendering the JSON parse tree that we get back from the wikify widget.
As usual with these experiments, this one is going to require quite a lot more work to finish up:
* The formatting is via direct styles rather than classes
* The formatting for attributes and properties is not yet completed
* The same thing needs to also be done to the widget tree preview
* Procedures and widgets inherit whitespace trim setting from their definition
* Missed off 22e7ec2381
* Require period prefix for custom filter operator functions
To ensure that custom filter operators cannot clash with future core operators.
* Allow custom functions to be invoked as attributes
* WIP
* Remove unneeded test tiddler
* Make is[variable] and variables[] operators resilient to fake widgets
* Fix importvariables to work with setvariables as well as set (they are aliases)
* Add support for $:/tags/Global
* Remove accidental commit 6cc99fcbe3
* Add utility function for parsing macro parameter definitions
* Introduce true global variables
The basic idea is that if we don't find a variable `foo` then we fallback to retrieving the value from the tiddler `$:/global/foo`, if it exists.
This allows us to replace the usual importvariables-based mechanism for global definitions, avoiding cluttering up the variable namespace with every macro.
In order to permit subprocedures to be overridden, we also introduce a mechanism for conditional definitions: preceding the word definition|procedure|function|widget with a + causes the definition only to occur if the specified variable doesn't already exist. In the next commit we'll apply this mechanism to the tabs macro
* Convert the tabs macro into a global
So far it appears to be totally backwards compatible... In practice, I think maybe this and the conversion of the other macros should go into a separate subsequent PR.
* Change to `?` for conditional definitions
* Fix tabs global so it doesn't crash when viewed directly
* Test showing how to un-override a core widget
* Cleaning up after f636349007
* Minor cleanups
* Clean up unknown filter
* Introduce function operator for calling functions
Can invoke any functions, not just those start with a period. And can pass zero parameters (in contrast when invoked as a custom filter operator there's no way to omit the first parameter).
* Use underscores for new system fields for global variable tiddlers
For consistency with `_canonical_uri`; unlike many system fields, the behaviour of these fields is baked into the core JS code.
* Refactor $parameters widget
The objective is to add a $depth attribute so that it is possible to reach up to retrieve the parameters of ancestor transclusions. However, doing so requires changing the encoding of parameter names so that it is not possible for a user parameter to clash with an attribute like $depth. So now we have to double up dollars on any attribute names seen by the parameters widget, just like with the transclude widget itself.
* Fix refreshing of global variables
Global variables access within attributes will automatically trigger a refresh if the attribute text changes, but that wasn't happening for transclusions.
* Remove support for $:/tags/Global
It is not needed now that we have true global variables
* Typo from f513b403fe
* Make slot fill data available to transclusions
Allows transcluded content to dynamically process <$fill> widgets within the calling transclusion
* Mark docs as v5.3.0
* Simplify metaparameters implementation
* Fix typo
* Adjust naming of transclusion metaparameter
* Fix up handling of slot/fill for custom widgets
Previously we were wrapping the body in an implicit `<$fill $name="ts-body">` widget
* Add format:json operator
I've been finding this useful for debugging, and it kind of goes with the JSON operators
* Docs: JSON operators and tweaks to genesis widget
* Docs: format:json
Also tweak to the behaviour of format:json if the input string is not valid JSON
* Fix#6721
* Revert "Fix #6721"
This reverts commit b216579255 which was committed to the wrong branch
* Fix new selection tracker to return relative coordinates
* Make use of type attribute consistent
* Docs: Transclude widget
* Simplify the fill widget
We can rely on the default processing in the base class
* Slot widget: be more defensive about negative depth values
* Parameters widget: Be defensive about negative depths
* Protect against excessively recursive functions
* FIx transcluding of functions
This first implementation concatenates the results of the filter (with no separator) and then wikifies the result.
The test in this commit is quite interesting...
* Tweak semantics of JSON operators to match #6932
This allows us to later bring in the optimisations without breaking backwards compatibility.
* Revert obsolete changes to boot.js
* Fix inadvertent whitespace change
* Remove tests related to obsolete changes to boot.js
Should have been part of 2f494ba152
* Revert changes to parse tree preview
This implementation requires #6666
* Add test to show that global widgets need not use the _parameters field
* Disable overriding core widgets in safe mode
* Coding style tweak
* More comments
* Fix caching of parse variables/macros/procedures
* Transcluded functions should operate on the entire store
* Refactor filter recursion detection to avoid an unneeded wrapper function
* Fix error in 25312b3e32
* WIP
* Revert "WIP"
This reverts commit 8654dfc679.
* When transcluding functions, pass an empty item list to the filter, and just return the first item
* Rejig genesis widget to be easier to use
* Parameters widget: protect against negative $depth
* Docs updates
* Docs updates
* Tweak comments
* Add custom view template body for globals, and a new sidebar tab under "more"
And also a custom view template title that greys out the $:/global/ part of the title
* Update function operator to return the input list if the function is missing
* Remove negation from function operator
This implementation was not useful.
* Tests and docs for function operator
* Docs tweaks
* Improve indentation
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#discussion_r967655251
* Missing tests for parameters widget
* Fix visible transclude
* Docs update
* Docs typo
* Huge Documentation Update
Not quite finished, but definitely on the home stretch
* Slight optimisation to user defined widgets
* Remove implementation of $:/globals/
Performance with this implementation is inherently poor because of the need to perform a wiki lookup for each child widget created.
* Docs clarification
* Docs update
* Some widget.js cleanups
* Remove support for conditional definitions
It was introduced for use cases associated with the global mechanism that was dropped in e3d13696c8
* Docs updates
* Revert change to setwidget docs
* Docs update
* Docs updates
* Clarify/simplify some tests
* More docs updates
* Fix doc file locations
* Docs updates
* Revert modified date of docs that have only had minor tweaks
* Docs typo
https://github.com/Jermolene/TiddlyWiki5/pull/6666#discussion_r990811220
Thanks @btheado
* Transcluding functions: fix missing parameters passed as undefined
Thanks @btheado – see https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1276187372
* Parameter parenthesis should be mandatory in function/procedure/widget definitions
See https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1280404387
* Attempt to build this branch with CI
* Add release note etc for 5.3.0
* Temporary new release banner for v5.3.0
* New New Release Banner
* New test for undefined parameters
* Adjust modified times of docs tiddlers to make them easier to find
* Update release note
* Add parenthesis to the visible transclusion definition
Parenthesis were made mandatory in 5194b24108Fixes#6998
* Fix macrocall refresh issue
It turns out that this.transcludeTitle is always truthy, even if we are transcluding a variable
Fixes#7001
* Filter run prefixes should use widget.makeFakeWidgetWithVariables
* Docs typo
Thanks @twMat
* Docs: clarify function operator invocation
See discussion at https://github.com/Jermolene/TiddlyWiki5/issues/6991#issuecomment-1301703599
* Docs: Update \define pragma to cover named ends
* Docs: move tiddlers to correct directory
* Add support for named end markers for procedures, functions and widgets
* Docs note about nested macro definitions
* Rename test
* Fix detection of empty transclusions
See https://talk.tiddlywiki.org/t/exploring-default-tiddler-links-hackability-in-v5-3-0/5745/25?u=jeremyruston
* New test missed off a45349cc99
* Refactor wikified function tests
* Refactor function invocation
* Introduce new widget helper function to evaluate variables.Functions are evaluated as parameterised filter strings, macros as text with textual substitution of parameters and variables, and procedures and widgets as plain text
* Refactor the function operator and unknown operator to use the new helper
* Use the new helper to evaluate variables within filter strings, thus fixing a bug whereby functions called in such a way were being returned as plain text instead of being evaluated
* Refactor the transclude widget to use the new helper
* Update tests
* Fix positional parameters in widget.evaluateVariable()
This should clear up the remaining anomalies in #7009, let me know how you get on @btheado
* Remove 5.2.8 release note
* Fix nonstandard initialisation code for fill/parameter/slot widgets
* Update modification times of doc tiddlers
So that they are at the top of the recent tab
* Update 5.3.0 release note
* Remove custom CI step for this branch
* Restore standard sitetitle
* Restructure and optimize `CheckboxWidget` docs
* Minor improvements
* Use new tab macros and some reformatting
* Fix bug in widget-attr-link tooltip
* Minor layout tweaks
* First try at a Widget Documentation Style Guide
* Add new tabs-related macros to overview
* Update CSS, add tm-scroll and rename macros
* Avoid RSoE with tm-scroll, improve CSS for tab-links
* Handle doc-tab-links within tab tiddlers better
* Reflect macro name changes in their docs
* Update Widget Doc Style Guide
The list-links by default show caption of listed tiddlers instead of their title. So in the example here
```
<$macrocall
$name="wikitext-example-without-html"
src="""<$set name="digit-pattern" value="[0-9]{2}">
<<list-links "[regexp:title<digit-pattern>]" field:"title">>
</$set>"""/>
```
you need to use field:"title" to see the correct results visually.
* Initial Commit
* Fix crash with invalid patches
See https://github.com/Jermolene/TiddlyWiki5/pull/7290#issuecomment-1453155311
Thanks @yaisog
* Add words and lines options to makepatches (#7326)
* Prevent infinite loop for single-word texts (#7327)
* Add docs and examples for the new operators (#7328)
* Create makepatches Operator.tid
* Improve wording
* Doc and examples for the new operators
---------
Co-authored-by: yaisog <m@rcuswinter.de>
* Changed headings under Content
Made them H2 and changed the wording a bit.
* Move the list of filters to another tiddler
There is a tiddler for Extended Listops Filters, and the list should go there, so that the Widget tiddler does not get too overcrowded.
* Rework comparison to ActionSetFieldWidget
* Add notes on de-duplication
* Update link to Extended Listops Filters
* Updated link to Extended Listops Filters
* Update link to Extended Listops Filters
Duh. This was the most important one.
* Remove repeated links to widgets within one section
* Re-create original tiddler with a redirect notice
* Excised the examples into a separate tiddler
Also created an "examples" subdirectory under tw5.com/tiddlers/widgets.
* improve Formatting in Wikitext
* formatting add more info about semantic meaning
* back to 1 tiddler Formatting in Wikitext
* single backtics are used for code - fix typo
* Add description of field date format
* Add description of field date format and improvements
Due to the re-creation of the PR all changes to this file got mushed together.
* Improve 'Formatting in WikiText.tid'
Add highlight formatting example.
Simplify code formatting example to be single line without nested list.
Improve bold, italic, and underscore formatting examples to be consistent with others.
* Improve 'Styles and Classes in WikiText.tid'
Add more examples, including the default highlight styling when no style or class is defined, as introduced in #6877
* Add initial tm-import-tiddler test
* Add failing test for tm-import-tiddlers importTitle #7234
* Add failing test for tm-import-tiddlers autoOpenOnImport #7234
* Use event.paramObject instead of event to access tm-import-tiddlers options. Fixes#7234.
* Added a clarifying comment
* Allow mixing tm-import-tiddler params in both event and event.paramObject
* Added import test using tv-auto-open-on-import variable
* Removed stray punctuation
* Update BrowseWidget.tid
Made sure all references to use of the `<$browse>` widget were changed to `<$browse/>`
Which possibly caused this problem, now closed https://github.com/Jermolene/TiddlyWiki5/issues/7223
If not closed other widgets may work
* To documentation standard
Replaced `The content of the `<$browse>` widget is ignored.`
`The content of the <<.wid BrowseWidget>> widget is ignored.`
To restore documentation standards as per @Jermolene