1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-21 11:49:44 +00:00
Commit Graph

1075 Commits

Author SHA1 Message Date
Jeremy Ruston
8a209d643f Fix typo 2024-03-01 18:58:17 +00:00
Jeremy Ruston
755a09be10 Tour plugin: Fix selector for "Recent" tab button 2024-02-29 09:43:38 +00:00
Jeremy Ruston
1a28ec7ea4 Rename upload manager to multipart form manager 2024-02-28 18:36:19 +00:00
Jeremy Ruston
5fe41fc896 Reorder test tiddlers 2024-02-28 18:19:22 +00:00
Jeremy Ruston
4f9ff1ae81 Missed closing tag 2024-02-28 18:19:01 +00:00
Jeremy Ruston
9facf4a067 Fix incorrect encoding of description when creating bags and recipes 2024-02-28 17:46:19 +00:00
Rob Hoelz
de4fe132a7
Unconditionally decrement transaction depth (#8008)
…otherwise we may end up in a situation where we're always stuck in an
"already in a transaction" state and often neglect to actually enter a
real transaction!
2024-02-26 11:02:55 +00:00
Jeremy Ruston
dd9a3bfeeb Re-enable loading the tw5.com docs tiddlers 2024-02-25 18:04:54 +00:00
Jeremy Ruston
6724fa804b Run the tests on both node-sqlite3-wasm and better-sqlite3 2024-02-25 17:58:53 +00:00
Jeremy Ruston
630b98520f Add note about transaction handling 2024-02-25 09:48:24 +00:00
Jeremy Ruston
d5aa74d9af Improve manual transaction handling
Thanks @hoelzro
2024-02-24 09:31:59 +00:00
Jeremy Ruston
343cc33bbe Add a test tiddler with emoji title
Useful for testing
2024-02-24 09:30:20 +00:00
Jeremy Ruston
b1edbed6a5 Fix bag static HTML to show emoji correctly 2024-02-23 17:47:00 +00:00
Jeremy Ruston
066e553f84 Introduce command to load tiddler folders into a bag 2024-02-23 12:51:29 +00:00
Jeremy Ruston
61b54125be Rename mws-load|save to mws-load|save-archive 2024-02-23 12:51:07 +00:00
Jeremy Ruston
3276703edd Fix failing tests 2024-02-23 09:30:12 +00:00
Jeremy Ruston
f9265169fd Commands to load and save tiddlers, bags and recipes as a JSON archive
@linonetwo the resulting archive should be suitable for storing in git
2024-02-23 09:27:53 +00:00
Jeremy Ruston
2361880c45 createBag should optionally set access control data 2024-02-23 09:26:45 +00:00
Jeremy Ruston
3ad87df154 Allow wiki engine to be configured 2024-02-22 17:58:30 +00:00
Jeremy Ruston
3c58788e37 Merge branch 'master' into multi-wiki-support 2024-02-22 17:39:51 +00:00
Jeremy Ruston
6d721c728f Confetti Plugin: Don't pass undefined for missing parameters 2024-02-22 17:17:38 +00:00
Jeremy Ruston
310b5f058a Whitespace 2024-02-22 12:13:53 +00:00
Jeremy Ruston
a33705e348 Fix error
It appears that not all statements can be finalized.
2024-02-22 12:09:36 +00:00
Jeremy Ruston
3fca82321e
MWS: Add support for node-sqlite-wasm alongside better-sqlite3 (#7996)
* Switch from better-sqlite3 to node-sqlite3-wasm

Seems to be slower, but might make cloud deployments easier by not having any binary dependencies

* More logging

* Temporarily use a memory database

We will make this configurable

* Revert "More logging"

* Resume loading demo tiddlers

* Cache prepared statements

Gives a 20% reduction in startup time on my machine

* Some more logging

* Update package-lock

* More logging

* Route regexps should allow for proxies that automatically decode URLs

Astonishingly, Azure does this

* Go back to a file-based database

* Less logging

* Update package-lock.json

* Simplify startup by not loading the docs edition

* Tiddler database layer should mark statements as having been removed

* Re-introduce better-sqlite3

* Make the SQLite provider be switchable

* Support switchable SQL engines

I am not intending to make this a long term feature. We will choose one engine and stick with it until we choose to change to another.

* Adjust dependency versions

* Setting up default engine

* Make transaction handling compatible with node-sqlite3-wasm

https://github.com/tndrle/node-sqlite3-wasm doesn't have transaction support so I've tried to implement it using SQL statements directly.

@hoelzro do you think this is right? Should we be rolling back the transaction in the finally clause? It would be nice to have tests in this area...

I looked at better-sqlite3's implementation - https://github.com/WiseLibs/better-sqlite3/blob/master/lib/methods/transaction.js

* Default to better-sqlite3 for compatibility after merging
2024-02-22 11:57:41 +00:00
Rob Hoelz
790f431df0
MWS: Use transactions when modifying multiple resources (#7991)
* Use transactions when modifying multiple resources

This prevents partial changes from entering the database, and also
nets a nice speed-up.

* Keep track of transaction depth

…so we could someday potentially leverage SQL implementations that don't
implement nested transactions
2024-02-22 10:48:39 +00:00
Jeremy Ruston
1eecfb6b3a Less logging 2024-02-21 17:55:13 +00:00
Jeremy Ruston
b8c1c6c8de Allow backslashes in trailing API path components
To make us more tolerant of proxies that "helpfully" decodeuricomponent for us (looking at you Azure)
2024-02-21 17:54:56 +00:00
Jeremy Ruston
6503fb4a04 Simple performance logging 2024-02-20 09:33:39 +00:00
Jeremy Ruston
bab14b7053 Logging 2024-02-19 16:29:14 +00:00
Jeremy Ruston
6f8a3b9261 mws-load command: more validation tiddler files 2024-02-16 16:41:39 +00:00
Jeremy Ruston
8edefffbc5 WIP: Support for streaming multipart form data to the file system 2024-02-16 16:02:40 +00:00
Jeremy Ruston
c26acfdb42 Add NOT NULL constraint to all columns
Thanks @hoelzro
2024-02-05 16:15:35 +00:00
Jeremy Ruston
f925f036c9 Introduce $tw.mws for MWS globals 2024-02-05 14:49:08 +00:00
Jeremy Ruston
6675358e85 WIP: Add a multipart/form-data convenience function
This is the start of adding support for large attachments.

We have a new endpoint for POSTing tiddler data. The idea is that it will take any kind of data and figure out how to extract tiddlers from the upload and save them in the nominated bag.

The next step is to move the attachment files into a special folder and reference them from the database so that we can construct _canonical_uris for them.
2024-02-02 15:42:02 +00:00
Jeremy Ruston
262a730534 Move the database file into a "store" directory inside the wiki folder 2024-01-29 18:11:50 +00:00
Jeremy Ruston
4b6872aa42 Fix typo 2024-01-29 08:29:26 +00:00
Jeremy Ruston
3283d38867 First draft of a command to read tiddlers, bags and recipes from an archive
The archive format is a legacy format that I used with Xememex, and will need to be updated to iron out the wrinkles
2024-01-28 21:27:12 +00:00
Jeremy Ruston
4204ff367e A few more tests 2024-01-28 17:11:53 +00:00
Jeremy Ruston
51e646690c Allow tilde character in bag and recipe names 2024-01-28 17:11:44 +00:00
Jeremy Ruston
85607f7846 Query fixes 2024-01-28 17:11:23 +00:00
Jeremy Ruston
41a5bcc3a1 Fix canonical URI handling 2024-01-26 15:48:39 +00:00
Jeremy Ruston
84c8a9be9b Fix typo 2024-01-26 15:01:07 +00:00
Jeremy Ruston
62b2fe3e2f Add an error when creating a recipe with no bags 2024-01-26 14:42:43 +00:00
Jeremy Ruston
f5fdd79c7f Refresh when creating bags and recipes to get the change instantly 2024-01-26 14:42:17 +00:00
Jeremy Ruston
541c166863 Error handling for bag and recipe handling 2024-01-26 14:03:32 +00:00
Jeremy Ruston
8290d853c9 Merge branch 'master' into multi-wiki-support 2024-01-26 12:54:40 +00:00
Jeremy Ruston
a9f9ffd409
Introduce Tour Plugin and Confetti Plugin, improve Dynannotate Plugin (#7734)
* 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>
2024-01-25 12:53:35 +00:00
Jeremy Ruston
b0a67300cc Add support for bag descriptions, validate bags and recipes, and complete the UI for creating bags and recipes
Styling to come
2024-01-24 22:24:24 +00:00
Jeremy Ruston
0b9749f3a4 Add favicon to bag listing page 2024-01-24 20:58:57 +00:00
Jeremy Ruston
8d95c92bfb Use $:/state/ tiddler for server entity state tiddlers 2024-01-24 10:56:23 +00:00
Jeremy Ruston
41ab94978f Renaming tiddlers for consistency 2024-01-24 10:55:14 +00:00
Jeremy Ruston
26e198b7d8 First pass at MWS icon 2024-01-23 22:05:58 +00:00
Jeremy Ruston
d16746ab38 Extend image widget to support alternate content if a remote image fails to load
...and use it to add an image for bags/recipes that do not have a $:/favicon.ico
2024-01-23 22:05:22 +00:00
Jeremy Ruston
627c3e20cc Add docs bags 2024-01-23 16:53:12 +00:00
Jeremy Ruston
4d42d4a190 Escape less than sign
Otherwise tiddlers containing `</script>` will break TiddlyWiki
2024-01-23 16:52:49 +00:00
Jeremy Ruston
ff184822ca Don't wikify recipe descriptions 2024-01-23 16:52:11 +00:00
Jeremy Ruston
ddbd6d1e82 Fix favicon aspect ratio 2024-01-23 16:51:57 +00:00
Jeremy Ruston
f6d6478944 Add support for recipe descriptions 2024-01-23 14:29:50 +00:00
Jeremy Ruston
239ace0c07 Avoid clients of sqlTiddlerStore having to call updateAdminWIki() explicitly 2024-01-23 12:53:06 +00:00
Jeremy Ruston
c1312100aa Admin UI styling 2024-01-23 12:52:40 +00:00
Jeremy Ruston
e343eccdc3 Refactor _canonical_uri handling out of route handlers 2024-01-23 10:51:12 +00:00
Jeremy Ruston
da5b316358 Split SqlTiddlerStore into SqlTiddlerStore and SqlTiddlerDatabase
The motivation is to encapsulate knowledge of the SQL queries
2024-01-22 22:08:55 +00:00
Jeremy Ruston
dc8692044c Use SQLite's AUTOINCREMENT to give us tiddler version identifiers
This commit fixes sync within hosted wikis
2024-01-21 18:18:29 +00:00
Jeremy Ruston
f7914db019 Add bag and recipe favicons to dashboard 2024-01-20 21:50:12 +00:00
Jeremy Ruston
11ecaff7db Fix typo 2024-01-20 21:48:40 +00:00
Jeremy Ruston
d832bbcc70 Order the results of getRecipeTiddlers 2024-01-20 21:48:33 +00:00
Jeremy Ruston
59aed49e98 Make getRecipeTiddlers return the bagname as well 2024-01-20 20:22:46 +00:00
Jeremy Ruston
e9f83ca735 Add missing LIMIT 1 2024-01-19 22:03:07 +00:00
Jeremy Ruston
afa9ad3cde Update store.getRecipeTiddler to also return the bag from which the tiddler came 2024-01-19 20:35:47 +00:00
Jeremy Ruston
01d29ed11e get bag tiddler and put recipe tiddler should return the bag name 2024-01-19 20:12:29 +00:00
Jeremy Ruston
8f9ae7e4d5 Clarify method name 2024-01-19 19:52:57 +00:00
Jeremy Ruston
70b048f356 Fix bag links 2024-01-19 19:36:36 +00:00
Jeremy Ruston
5fddd3b104 Add support for retrieving tiddlers from bags 2024-01-19 19:33:58 +00:00
Jeremy Ruston
02afbb4000 Rename some of the routes more logically 2024-01-19 19:27:54 +00:00
Jeremy Ruston
54432485e7 Add an HTML view of bag listings 2024-01-19 19:25:58 +00:00
Jeremy Ruston
26ede2839b Add support for _canonical_uri tiddlers
Currently hard wired to kick in for tiddlers over 10MB (in base64 representation for binary tiddlers)
2024-01-19 14:46:21 +00:00
Jeremy Ruston
4b0df1a7ae Basic support for creating bags and recipes
Cannot yet specify the bags for the new recipe
2024-01-19 11:03:58 +00:00
Jeremy Ruston
9767e7d3b7 Update entity state tiddlers on startup to read bag and recipe info 2024-01-19 11:03:27 +00:00
Jeremy Ruston
4133e7d6d6 Stream wiki generation
Avoids "string too long" errors when working with big tiddlers (>100MB)
2024-01-19 10:52:12 +00:00
Jeremy Ruston
4f37355a9f Tests should use a dummy admin wiki 2024-01-19 10:28:04 +00:00
Jeremy Ruston
82fae45656 Admin styling 2024-01-18 21:48:09 +00:00
Jeremy Ruston
2f09c32d2d Fix getTiddler query 2024-01-18 21:47:57 +00:00
Jeremy Ruston
a16338ce11 Merge branch 'master' into multi-wiki-support 2024-01-18 16:43:43 +00:00
Jeremy Ruston
50d0b1412d Fix CI tests 2024-01-18 09:02:41 +00:00
Jeremy Ruston
83dfec471d
Fix TiddlyWiki Classic Build Process (#7933) 2024-01-18 08:56:18 +00:00
Jeremy Ruston
8941bd1747 Server extension framework
May not actually be needed
2024-01-17 22:42:01 +00:00
Jeremy Ruston
615dc0c4a3 First pass at admin user interface 2024-01-17 22:41:41 +00:00
Jeremy Ruston
1fb8b2e279 Fix broken test 2024-01-05 15:45:40 +00:00
Jeremy Ruston
0799177cf4 Add another recipe, improve docs 2024-01-05 15:40:39 +00:00
Jeremy Ruston
1eed61397b Fix create recipe SQL bug 2024-01-05 15:37:48 +00:00
Jeremy Ruston
3f1f7c7ef7 Remove debugging code 2024-01-05 11:08:33 +00:00
Jeremy Ruston
8543dda4aa Fix broken test 2024-01-05 11:01:10 +00:00
Jeremy Ruston
68a89b615d Use a persistent disk-based database 2024-01-05 10:58:07 +00:00
Jeremy Ruston
e9d3f67c5c Add new multiwikiserver edition 2024-01-03 16:47:20 +00:00
Jeremy Ruston
a980390870 Implement APIs for client wikis to sync with the server
It is now possible to create and edit tiddlers, using the existing tiddlywebadaptor syncing mechanism. There are a lot of hacks and lumpiness to make things compatible, so I think I will end up with an independent implementation
2024-01-03 16:27:13 +00:00
Jeremy Ruston
299781bdba Update docs 2024-01-02 21:47:08 +00:00
Jeremy Ruston
f42d3e0536 Update usage instructions 2024-01-02 21:41:25 +00:00
Jeremy Ruston
12d84c43c9 Initial Commit 2024-01-02 14:39:14 +00:00
Jeremy Ruston
6fa81feeba
Restore comma before skinny tiddlers (#7897)
* Restore comma before skinny tiddlers

Fixes #7896

* Fix problem that showed up in CI tests
2023-12-21 10:36:29 +00:00
Jeremy Ruston
4a9b3009dd Further fix for d1c7f79dd2
The plus sign needs escaping on some regex engines
2023-12-11 15:21:03 +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
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
d1c7f79dd2 Correct fix for Windows line endings in wiki based tests 2023-11-24 10:42:53 +00:00
Jeremy Ruston
862cb01be7 Revert "Fix wiki based tests with Windows-style line endings"
This reverts commit f22e047fa2.
2023-11-24 10:41:23 +00:00
Jeremy Ruston
f22e047fa2 Fix wiki based tests with Windows-style line endings 2023-11-24 10:31:11 +00:00
Simon Huber
902c7f55ba
Fix overflow issue of codemirror editor within grid container (#7794)
* fix overflow issue of codemirror editor within grid container

* tiddler preview needs overflow: auto, too
2023-10-26 11:43:24 +01:00
Guang Li
c6604c0c56
Add floating popup to Dynannotate (#7790) 2023-10-16 18:21:26 +01:00
lin onetwo
d3f5695601
Fix: Evernote .enex image import (#7785)
* feat: add modifier info

* feat: replace image and attachment with [img[] and [[]]

* feat: import as wikitext tid

* fix: a few resources don't have title

* fix: use hash as random name for images

* fix: Firefox's DOMParser have problem in some cases

* fix: bad char in title, and useless xmlns

* Update sample-enex-with-image.xml.enex

* Update enex-deserializer.js

* Update readme.tid

* fix: some dont have modified
2023-10-15 12:40:38 +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
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
Timur
def508a220
Fix offline upgrade download link (#6088)
* Fix offline upgrade download link

In Firefox (92.0.1) `href="#"` does not allow to start downloading of `upgrade.html` (Chrome has no such problem). Making href completely empty fixes the issue.

* Update plugins/tiddlywiki/upgrade/UpgradeWizard.tid
2023-10-04 18:24:45 +01:00
Jeremy Ruston
1be8f0a933 Comments plugin should use palette colours 2023-09-26 17:55:01 +01:00
Jeremy Ruston
a7bafd8840 Google Analytics: tweaks 2023-07-14 12:41:55 +01:00
jeremy@jermolene.com
6954fbee51 Fix comment missing from previous commit 6c7c21a87b 2023-07-06 12:01:39 +01:00
jeremy@jermolene.com
6c7c21a87b Fix overeager onload handler in Jasmine plugin
All of this is needed to enable the Jasmine plugin to work in environment with an asynchronous startup, as seen in the sqlite3 wiki store
2023-07-06 11:52:33 +01:00
Mario Pietsch
16ef1d84cd
Change arrow-function to function call for HTA (#7552) 2023-06-28 09:54:27 +01:00
Jeremy Ruston
9b8db5dbb1
Update to Google Analytics 4 (#7554)
* Adopt Google Analytics 4 tag code

* Fix typo

* Temporarily add Google Analytics tracking to tw5.com

So that we can test everything is working with the Vercel preview

* Remove test configuration
2023-06-22 08:48:48 +01:00
jeremy@jermolene.com
a05302da10 Revert "Bidirectional text improvements (#4541)"
This reverts commit f90eb386ae.
2023-06-21 17:13:33 +01:00
jeremy@jermolene.com
d8124ee82d Menu bar plugin: Hide menu bar in static renderings
Fixes #7476
2023-06-17 08:58:50 +01:00
cdruan
b61c01d8b0
Update widget name policy (#7510) 2023-06-14 09:55:16 +01:00
Jeremy Ruston
f90eb386ae
Bidirectional text improvements (#4541)
* 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
2023-06-13 16:36:07 +01:00
btheado
86d45f1c3d
Request permission to protect local storage from eviction (#7398)
* Request the browser to never evict the persistent storage

* Store browser storage persisted state in a tiddler

* Factor out some code into helper functions

* Display status of persistence request in the settings page
2023-06-13 10:50:00 +01:00
jeremy@jermolene.com
a12a9bd939 Fixes to browser storage plugin icon 2023-06-12 09:22:20 +01:00
GameDungeon
578e883bdc
Add Tabs To Settings (#7524)
* Move to Core

* List-Before

* Update core/ui/ControlPanel/Settings.tid

* Proper list-before
2023-06-11 10:28:52 +01:00
Tavin Cole
4e7a6ffc22
Add codemirror option to show trailing space (#7493)
* codemirror edit/trailingspace addon (default off)

* refactor as codemirror-trailingspace plugin

* copy cm-trailingspace styles from cm demo
2023-05-27 18:28:27 +02:00
btheado
74e0619782
Protect codemirror.css from wikitext parsing, otherwise 'CodeMirror' is considered a wikilink (#7500) 2023-05-27 18:22:31 +02:00
jeremy@jermolene.com
990909c310 Revert "Feat: destroy() method for widgets to do custom cleanup (#6699)"
This reverts commit 474b73bdbe.
2023-05-18 17:27:05 +01:00
jeremy@jermolene.com
3da0a9431c Introduce $:/tags/Global tag
And also $:/tags/Global/View and $:/tags/Global/View/Body
2023-05-09 15:46:54 +01:00
Mario Pietsch
18d7d3d8c0
Improve the wording for the core-plugin in the upgrader-editioin (#6878) 2023-05-07 17:47:13 +01:00
lin onetwo
474b73bdbe
Feat: destroy() method for widgets to do custom cleanup (#6699)
* feat: inform child widget to do some custom cleanup

* fix: type

* refactor: restore old removeChildDomNodes

* refactor: make destroy() a separate method

* refactor: make destroy call removeChildDomNodes

* refactor: call destroy instead of removeChildDomNodes in each core widgets

* fix: refreshSelf does not mean destroy

* refactor: use old var insteadof const

* docs: about subclass
2023-05-06 12:19:11 +01:00
Arlen22
2b95daf59b
Change evalSandboxed to use only one context for all modules (#4624)
* Run modules in one new context

* Fix polyfill running on require

* Add code to check for global assignments

* Allow globals in separate context

This lets the caller request a separate context which may be polluted.

* Jasmine needs to pollute the global

* Formatting

* Add polyfill and cleanup code

* Convert to ES5

* One bug fix

* Some formatting

* Remove console.log line!

* Cleanup

* revert css-escape-polyfill.js to hopefully remove it from the PR

* Remove JSDOC directives
2023-05-06 12:11:18 +01:00
Jeremy Ruston
2bfefe3880
Parameterise core icons (#7413)
* Parameterise all the icons

* Improve splash screen macro for rendering icons

* Add new example from @kookma
2023-05-06 12:08:46 +01:00
btheado
3ee5f10362
BrowserStoragePlugin: Do not save shadow tiddlers to local storage (#7365)
If a tiddler is only a shadow tiddler, then do not save it
to local storage. Otherwise when installing a plugin, each
individual tiddler will be expanded and saved individually.
In order to uninstall such a plugin, the plugin tiddler and
each tiddler needs to be deleted.

This can be prevented by including a run like `-[is[shadow]!is[tiddler]]`
in the save filter, but that has the side effect of preventing
overwritten shadow tiddlers from being deleted from local storage.
2023-05-06 11:41:22 +01:00
yaisog
2340d48844
Add additional searchModes to Dynannotate (#7260)
* 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
2023-05-06 11:30:21 +01:00
Mario Pietsch
416a2fae7a
Add syntax docs to railroad plugin (#7334) 2023-03-06 16:12:26 +00:00
jeremy@jermolene.com
3f478f5689 Naming tweak to #6047
@linonetwo I realised on review that we refer to boot.files as the "tiddler file info"
2023-03-05 17:40:04 +00:00
cdruan
f9604c40d3
Add wikiparser.js dependency (#7330) 2023-03-05 10:34:41 +00:00
lin onetwo
d14e775b90
Allow deleteTiddler to not modify fs (#6047)
* feat: allow deleteTiddler to not modify fs

* refactor: add new function that merely delete file in cache, and let old func calls it

* fix: self is undefined
2023-03-03 21:56:40 +00:00
Saq Imtiaz
5bce35d90b
Fix: add twEditor attribute to paste events handled by codemirror (#7281) 2023-02-28 08:35:15 +00:00
cdruan
eb8f4d66b9
Markdown Plugin: Handle non-string attr values in tw_image() (#7284) 2023-02-24 15:41:29 +00:00
jeremy@jermolene.com
ef03a4a5df Markdown Plugin: Default to recognising TiddlyWiki-format links
Fixes #7275
2023-02-24 09:51:45 +00:00
jeremy@jermolene.com
81f5141166 Dynannotate: Don't crash when used in the fake DOM
Fixes #7258
2023-02-10 09:00:52 +00:00
jeremy@jermolene.com
524cee1489 XLSX plugin: Add support for numeric fields 2023-01-30 21:42:44 +00:00
jeremy@jermolene.com
93abe5e3a6 xlsx-utils plugin: Update to latest version of xlsx.js 2023-01-30 09:43:18 +00:00
jeremy@jermolene.com
c0bca18cab Dynannotate: Fix searchCaseSensitive default in docs
Fixes #7245
2023-01-29 16:43:01 +00:00
jeremy@jermolene.com
6404d5652e Minor tweaks for fe2c677ac4 2023-01-27 20:49:34 +00:00
fkmiec
fe2c677ac4
Docs for #7169 - update readme tiddlers for TiddlyWebAdaptor and BrowserStorage plugins (#7240)
* Update readme to reflect optional use of browser storage with tiddlyweb sync adapter

* Fix typos in readme
2023-01-27 20:39:13 +00:00
cdruan
51cbf83c23
Fix data-tiddler field duplications in server snapshots (#7130) 2023-01-19 17:47:49 +00:00
fkmiec
005dfdadf0
Automatic sync of tiddler changes in browser storage when sync connection is re-established (#7169)
* Add automatic sync of tiddler changes in browswer-storage on restoration of server connection in tiddlywebadaptor

* Fix issue with new tiddlers not being synced.

* Fix issue with new tiddlers not being synced.

* Added logging

* Modified browser-storage plugin. Refactored into utility class.

* Modified browser-storage plugin. Refactored into utility class.

* Fix: browser storage config tiddler created on load only if not already exists

* Fix: Removed extra indent in util.js
2023-01-17 22:12:18 +00:00
jeremy@jermolene.com
c39ef398bf Share plugin: decode the URI component before checking for the leading hash sign
Should compensate for the mangling we get from Discourse – see https://talk.tiddlywiki.org/t/revived-share-plugin/5887
2023-01-15 18:55:36 +00:00