Commit Graph

4561 Commits

Author SHA1 Message Date
Jeremy Ruston 6983564194 Merge branch 'master' into demo-alternate-store 2023-12-11 20:39:57 +00:00
Jeremy Ruston 15e53b8cd1 Revert: #7768 Ensure {{}} doesn't cause a recursion error
See https://github.com/Jermolene/TiddlyWiki5/pull/7768#issuecomment-1850578638
2023-12-11 17:56:11 +00:00
Robin Munn 4e06c31022
Move list-join example onto single line (#7877)
It's a little less readable this way, but avoids the whitespace issue.
2023-12-07 08:34:07 +00:00
Mateusz Wilczek 5578fa5f94
Improve `jsonset` operator docs (#7873)
* Update docs of jsonset operator

* Move jsonset examples into a separate tiddler

* Update jsonset operator docs
2023-12-04 15:24:33 +00:00
Saq Imtiaz 2b0675cac5
Docs: fixes typos in conditonal shortcut syntax docs (#7872)
* Docs: Conditional Shortcut Syntax corrections

* Update Conditional Shortcut Syntax.tid

Add a link to Filter Expression tiddler
2023-12-04 08:53:24 +00:00
Jeremy Ruston 155db0f6f8 Improve release note 2023-12-04 08:13:23 +00:00
Jeremy Ruston f7359671aa Defer scrollable widget updating bound tiddler for 100ms
See discussion https://talk.tiddlywiki.org/t/5-3-2pre-scroll-binding/8570/3?u=jeremyruston
2023-11-29 18:06:54 +00:00
Jeremy Ruston c282208668 Fix jsonset crash when applied to primitive types
See https://talk.tiddlywiki.org/t/final-checks-before-release-of-v5-3-2/8560/7
2023-11-29 12:06:40 +00:00
Mateusz Wilczek fc1e9b6c43
Update forum link in update wizard (#7865)
* Update forum link in upgrade wizard

* Update links to forum in es-ES and de-AT editons
2023-11-29 10:06:47 +00:00
Jeremy Ruston 5dc468f1ea Fix release note typo
Apologies again @oflg
2023-11-28 17:43:57 +00:00
Jeremy Ruston 53d493b876 Conditional shortcut docs: highlight use of "condition" variable 2023-11-28 11:51:56 +00:00
Jeremy Ruston a21f45b93a Release note: fix typos 2023-11-28 10:53:38 +00:00
Robin Munn 64812f5c06
Add join attribute to list widget (#7694)
* 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
2023-11-25 09:35:05 +00:00
Jeremy Ruston 22f9df5850 Update release note 2023-11-24 15:11:21 +00:00
Jeremy Ruston 0716ed4c30 Revert "Simplify Permalink/Permaview URLs (#7729)"
This reverts commit 145a8d6992.
2023-11-24 10:13:57 +00:00
Jeremy Ruston 62bb8affa4
Add data attribute support to button and other widgets (#7769)
* 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>
2023-11-22 20:05:40 +00:00
Eric Haberstroh 0cd3c9a8ac
Add usemap attribute to image widget (#7634)
* 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>
2023-11-21 11:44:39 +00:00
Mario Pietsch 37c625384a
add archive HTML wikis, add index.html + css (#7776)
* 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
2023-11-21 11:42:17 +00:00
Scott Sauyet 145a8d6992
Simplify Permalink/Permaview URLs (#7729)
* 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.
2023-11-21 11:24:17 +00:00
Jeremy Ruston 9012d36859
Allow scrollable widget to bind scroll position to a tiddler (#7649)
* Initial Commit

* Update version number
2023-11-21 11:23:10 +00:00
Robin Munn ab72cc7b09
Allow negative indexes in json operators (#7849)
* 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
2023-11-21 11:05:13 +00:00
Saq Imtiaz bf8b3cff03
Fixes Text Parser being impacted by overrides to codeblock widget (#7844)
* fix: overriding codeblock widget should not impact text parser

* fix: whitespace changes
2023-11-20 08:38:04 +00:00
Jeremy Ruston 9493084f95 Merge branch 'master' into demo-alternate-store 2023-11-07 10:26:53 +00:00
Maurycy Zarzycki 4b56cb4298
Add support for running in-browser tests via playwright in GitHub CLI (#7820)
* 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
2023-10-29 09:05:24 +00:00
Jeremy Ruston d98265868e Remove all plugins to simplify benchmarking 2023-10-27 14:11:07 +01:00
Robin Munn 246751be1b
Fix last filter operator when zero items selected (#7809)
Previously, [last[0]] was incorrectly returning the entire list. It now
returns zero items as it should.
2023-10-25 13:14:49 +01:00
Jeremy Ruston 863066d41f Merge branch 'master' into demo-alternate-store 2023-10-23 10:13:44 +01:00
Jeremy Ruston 4ebaba8e89 Tweak wording 2023-10-23 10:13:32 +01:00
Jeremy Ruston fd3d8aef36 Merge branch 'master' into demo-alternate-store 2023-10-21 21:10:08 +01:00
Mario Pietsch efaa8dd1e8
tm-open-window set focus to existing window (#7708)
* tm-open-window set focus to existing window

* tm-open-window: update docs
2023-10-18 16:10:04 +01:00
Robin Munn 326ae61929
Fix encodebase64 and decodebase64 filters (#7683)
* 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
2023-10-18 16:08:56 +01:00
Jeremy Ruston 2ffbfd84a5 Merge branch 'tiddlywiki-com' 2023-10-17 11:38:23 +01:00
Jeremy Ruston faef02df7a
Docs: Add information about the Chinese TiddlyWiki community (#7792) 2023-10-17 11:37:57 +01:00
Jeremy Ruston 4d548580e6 Merge branch 'tiddlywiki-com' 2023-10-16 18:32:37 +01:00
Jeremy Ruston e521ee2133 Update release note 2023-10-16 12:27:56 +01:00
Guang Li a7bd134c35
Docs: Add FSRS4TW plugin (#7770) 2023-10-16 12:23:22 +01:00
Jeremy Ruston 1754be279f Merge branch 'master' into demo-alternate-store 2023-10-15 18:11:28 +01:00
Jeremy Ruston fffbedd6b9 Updated release note 2023-10-14 10:25:16 +01:00
Jeremy Ruston ff1437e439
Fix refreshing of transcluded functions (#7698)
* 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>
2023-10-14 09:44:18 +01:00
Jeremy Ruston 32966c9e91
Introduce jsonset operator (#7742) 2023-10-14 09:43:23 +01:00
Jeremy Ruston 96b0543351
Add barcode reader widget to qrcode plugin (#7746)
* Add barcode reader widget to qrcode plugin

* Don't use a fixed ID
2023-10-14 09:42:34 +01:00
Jeremy Ruston b7562f0c7b
Conditional Shortcut Syntax (#7710)
* 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
2023-10-14 09:41:21 +01:00
Jeremy Ruston 4c9c85aec5
Add support for list-template and list-empty widgets for specifying list widget templates (#7784)
Cherry picked from #7710
2023-10-14 09:31:11 +01:00
Jeremy Ruston 774058912d Update release note 2023-10-09 17:12:22 +01:00
Jeremy Ruston 106e1c68df Merge branch 'tiddlywiki-com' 2023-10-08 16:23:29 +01:00
Jeremy Ruston 12f42ad62f Add a summary for each release, and include in archive listing 2023-10-08 10:29:42 +01:00
Mateusz Wilczek 35e45f3b90
Clean up after #7671 (Change favicon format from ICO to PNG) (#7774)
* Delete editions/tw5.com/tiddlers/_tw_shared/favicons/favicons.svg

* Delete editions/tw5.com/tiddlers/_tw_shared/favicons/favicons.svg.md
2023-10-06 21:39:43 +01:00
Jeremy Ruston 93bc9e4309 Merge branch 'tiddlywiki-com' 2023-10-05 22:29:45 +01:00
Jeremy Ruston 23b75bbc5d Add links to archived versions of TiddlyWiki
@pmario v5.3.0 and v5.3.1 are missing from the archive, would you be able to kindly prepare a PR?
2023-10-05 22:25:07 +01:00
Mateusz Wilczek 68da654eb3
Change favicon format from ICO to PNG, fix #7665 (#7671)
* 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
2023-10-04 22:15:23 +01:00