1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-05 09:36:18 +00:00
Commit Graph

48 Commits

Author SHA1 Message Date
Jeremy Ruston
b95723a022
Fix syncer to handler errors properly (#4373)
* First commit

* Add throttling of saves

Now we refuse to save a tiddler more often than once per second.

* Wait for a timeout before trying again after an error

* Modest optimisations of isDirty() method

* Synchronise system tiddlers and deletions from the server

Fixes two long-standing issues:

* Changes to system tiddlers are not synchronised from the server to the browser
* Deletions of tiddlers on the server are not propagated to browser clients

* Make sure we update the dirty status even if there isn't a task to perform

* Replace save-wiki button with popup sync menu

* Remove the "Server" control panel tab

We don't need it with the enhanced sync dropdown

* Add indentation to the save-wiki button

* Fix spacing in dropdown menu items

* Switch between cloud icons according to dirty status

* Add a menu item to copy syncer logs to the clipboard

* Improve animated icon

* Remove indentation from save-wiki button

@pmario the annoying thing is that using `\trim whitespace` trims significant whitespace too, so it means we have to use <$text text=" "/> when we need a space that won't be trimmed. For the moment, I've removed the indentation but will keep thinking about it.

* Further icon, UI and copy text tweaks

Move the icons and styles from the core into the TiddlyWeb plugin

* Clean up PR diff

* Tweak animation durations

* Break the actions from the syncer dropdown into separate tiddlers

@pmario I think this makes things a bit easier to follow

* Refactor syncadaptor creation and logging

The goal is for the syncadaptor to be able to log to the same logger as the syncer, so that the "copy syncer logs to clipboard" data is more useful.

* Don't transition the dirty indicator container colour, just the SVG's colour

* Only trigger a sync for changes to tiddlers we're interested in

Otherwise it is triggered by the creation of the alert tiddlers used to display errors.

* Restore deleting local tiddlers removed from the server

(I had commented it out for some testing and accidentally commited it).

* Guard against missing adaptor info

* We still need to trigger a timeout when there was no task to process

* Avoid repeatedly polling for changes

Instead we only trigger a timeout call at if there is a pending task (ie a tiddler that has changed but isn't yet old enough to save).

* Lazy loading: include skinny versions of lazily loaded tiddlers in the index.html

* Introduce _is_skinny field for indicating that a tiddler is subject to lazy loading

* Remove savetrail plugin from prerelease

It doesn't yet work with the new syncer

* Make the savetrail plugin work again

* Clear outstanding alerts when synchronisation is restored

* Logger: only remove alerts from the same component

Missed off 9f5c0de07

* Make the saving throttle interval configurable (#4385)

After switching Bob to use the core syncer the throttle interval makes saving feel very sluggish compared to the message queue setup that I had before.
The editing lock that I use to prevent conflicts with multiple users doesn't go away until the save is completed, and with the 1 second delay it means that if you edit a tiddler and save it than you have to wait one second before you can edit it again.

* Tweaks to appearance of alerts

* Exclude temp tiddlers from offline snapshots

Otherwise alerts will persist

* Tweak appearance of status line in dropdown

* Update release note

* Web server: Don't include full path in error messages

Fixes #3724

* In change event handler check for deletions

* Disable the official plugin library when the tiddlyweb plugin is loaded

* Hide error details from browser for /files/ route

See https://github.com/Jermolene/TiddlyWiki5/issues/3724#issuecomment-565702492 -- thanks @pmario

* Revert all the changes to the relationship between the syncer and the syncadaptor

Previously we had some major rearrangements to make it possible for the syncadaptor to route it's logging to the logger used by the syncer. The motivation is so that the "copy logs to clipboard" button is more useful.

On reflection, changing the interface this drastically is undesirable from a backwards compatibility perspective, so I'm going to investigate other ways to achieve the logger sharing

* Make the tiddlyweb adaptor use the syncer's logger

So that both are availavble when copying the syncer logs to the clipboard

* Update release note

* Support setting port=0 to get an OS assigned port

Quite useful

* Update code comment

* UI: Use "Get latest changes from server" instead of "Refresh"

* Add getUpdatedTiddlers() method to syncadaptor API

See https://github.com/Jermolene/TiddlyWiki5/pull/4373#issuecomment-573579495

* Refactor revision handling within the syncer

Thanks @pmario

* Fix typo in tiddlywebadaptor

* Improve presentation of errors

See https://github.com/Jermolene/TiddlyWiki5/pull/4373#issuecomment-573695267

* Add docs for getTiddlerRevision()

* Remove unused error animation

* Update comment for GET /recipes/default/tiddlers/tiddlers.json

* Optimise SVG cloud image

* Add optional list of allowed filters for get all tiddlers route

An attempt to address @Arlen22's concern here:

https://github.com/Jermolene/TiddlyWiki5/pull/4373#pullrequestreview-342146190

* Fix network error alert text translatability

* Fix error code and logging for GET /recipes/default/tiddlers/tiddlers.json

Thanks @Arlen22

* Flip GET /recipes/default/tiddlers/tiddlers.json allowed filter handling to be secure by default

* Validate updates received from getUpdatedTiddlers()

* Add syncer method to force loading of a tiddler from the server

* Remove the release note update to remove the merge conflict

* Fix crash when there's no config section in the tiddlywiki.info file

* Use config tiddler title to check filter query (merge into fix-syncer) (#4478)

* Use config tiddler title to check filter query

* Create config-tiddlers-filter.tid

* Add config switch to enable all filters on GET /recipes/default/tiddlers/tiddlers.json

And update docs

* Fix bug when deleting a tiddler with a shadow

Reported by @kookma at https://github.com/Jermolene/TiddlyWiki5/pull/4373#issuecomment-604027528

Co-authored-by: jed <inmysocks@fastmail.com>
Co-authored-by: Arlen22 <arlenbee@gmail.com>
2020-03-30 15:24:05 +01:00
Simon Huber
5d0e4732b2
Add "none" as an option in the icon dropdown in tag manager (#4361)
* add no-icon option to tagmanager and add ...

... whitespace trims

* Update Misc.multids
2020-01-30 15:52:33 +00:00
Jeremy Ruston
1c23059204
Dynamic loading/unloading of plugins (#4259)
* First pass at dynamic loading/unloading

* Show warning for changes to plugins containing JS modules

* Use $:/config/RegisterPluginType/* for configuring whether a plugin type is automatically registered

Where "registered" means "the constituent shadows are loaded".

* Fix the info plugin

The previous mechanism re-read all plugin info during startup

* Don't prettify JSON in the plugin library

* Indicate in plugin library whether a plugin requires reloading

* Display the highlighted plugin name in the plugin chooser

And if there's no name field fall back to the part of the title after the final slash.
2019-09-16 12:15:39 +01:00
Jeremy Ruston
aa7b18427f
Incorporate “diff” engine to show visual differences (#3112) 2018-03-16 20:38:35 +00:00
Jermolene
29364cbd08 Change http://*.tiddlywiki.com/* to https:// 2017-11-11 11:56:20 +00:00
Xavier Cazin
db8fd9ea74 Amendments to warnings upon loading content via _canonical_uri (#2796) (#2803)
* fr-FR translation of additional error strings

* include SaveTrail

* Amendments to the warnings upon loading content via _canonical_uri

* Typo: add a missing THE

* Clarification on why the browser might refuse to load external content
2017-09-16 15:34:26 +01:00
Jermolene
4b9fcdf958 Enable 'edit' button in body of missing tiddler template 2017-06-09 15:20:45 +01:00
FND
6505e6f448 WebDAV file overwrite protection (#2614)
* putSaver: detect edit conflicts to prevent clobbering, if possible

if the server supplies an ETag, we send it back when saving, allowing
the server to detect edit conflicts and respond with 412 (cf.
https://www.w3.org/1999/04/Editing/)

caveats:
* this only kicks in after the first save, as we don't have access to
  the ETag when first loading the document
* there's no recovery mechanism (e.g. resetting `this.etag` in order to
  force clobbering), other than manually reloading the document

* putSaver: retrieve ETag upon initialization for clobbering protection

this addresses one of the caveats from the previous commit
(2d75cb83af) - while theoretically prone
to a race condition, it seems unlikely that saving will be triggered
before the server responds

* putSaver: simplify URI extraction

this simplifies the approach introduced in
f51f6bf774, with the purpose of removing
the fragment identifier

* putSaver: localize error message

* putSaver: switch to built-in HTTP helper

in the process, fixed ETag assignment in `#save` method (was
`this.etag`, now `self.etag`) as well as a syntax error due to a missing
closing brace

* putSaver: consolidate URI handling
2017-02-17 12:26:15 +00:00
Jermolene
12ecb1fd08 Fix multids formatting 2016-11-29 10:29:32 +00:00
Jermolene
16bb65d17f Introduce tiddler manager 2016-11-29 08:36:07 +00: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
Myeongjin
8afc1e9354 Add localisable strings (#2438)
* Add localisable string for recursive transclusion error

* Add localisable string for count

* Add localisable strings for syncer
2016-05-12 08:44:28 -06:00
Myeongjin
71111550d6 Add localisable strings for vanilla (#2422)
* Add localisable strings for vanilla

* Remove system tiddler for theme tweaks from fr-FR edition
2016-05-05 10:11:06 +01:00
Jeremy Ruston
2adf09129d Introduce text editor toolbar (#2315)
Tada!
2016-04-22 08:36:29 +01:00
Jermolene
0240a8048f Fix default date format 2016-01-04 20:09:06 +00:00
Myeongjin
a0468a5e6c add localisable strings for plugin library 2015-10-18 18:33:59 +09:00
Myeongjin
2fee131aa4 add localisable strings for Internal JavaScript Error 2015-10-18 17:26:42 +09:00
Myeongjin
8e68f904f1 remove unnecessary spaces 2015-10-18 16:49:48 +09:00
Jermolene
acbf87657b Switch to absolute date format
The present implementation of relative dates doesn’t auto-update, nor
does it work effectively in static renderings. Until that’s fixed, I
think it is better to switch to absolute dates.
2015-10-07 18:35:23 +01:00
Jermolene
ecdae4ceff Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
Jermolene
2c9b1ae257 Add warning when trying to use plugins designed for TiddlyWiki Classic 2015-09-04 17:18:34 +01:00
Devin Weaver
7d348b3733 Move counts to TagManager 2015-06-30 23:56:02 -04:00
Andreas Abeck
2c367c5476 added localisation for encryption dialog & de-DE translation 2015-03-18 18:52:33 +01:00
Jermolene
8643278a45 Add support for an integrated plugin library
Fixes #1450

Provides support for an integrated plugin library that can be used to
install plugins from tiddlywiki.com directly to wikis hosted online or
offline. See the Plugins tab of Control Panel.

Todo:

* Error checking(eg libraryserver.js HTTP GET)
* Translatability
* Documentation
** $:/tags/ServerConnection
** savelibrarytiddlers command
2015-02-09 19:04:11 +00:00
Jermolene
aae56f20af Display warning banner when plugins are modified
Fixes #1455

@aelocson have I got the docs right for the new filter?
2015-02-08 19:40:15 +00:00
Jermolene
ba971a2d2b Improved drop message 2015-01-28 09:13:05 +00:00
Jermolene
df891e7110 Further tag manager tweaks
Making it translatable, and changing the icon for “info”
2014-11-04 12:35:46 +00:00
Jermolene
e90e588621 Missed from last commit 2014-10-10 10:13:02 +01:00
Jermolene
353f641bcc Move date-related translateable strings into their own file 2014-10-10 10:12:40 +01:00
Jermolene
c6951ee912 Make date format strings be translateable
Note for translators: I’m planning to release 5.1.3 later today.

Fixes #954
2014-10-09 10:33:08 +01:00
Jermolene
0dcf54c3b5 Add support for action widgets
This is part of the groundwork for fixing #336
2014-10-08 17:45:26 +01:00
Jermolene
ef1d531091 Add confirmation for clearing password
Fixes #925
2014-10-07 14:35:42 +01:00
Jermolene
40567c2f88 Drop the count column from the tag manager
It increases the horizontal width of the table, and isn’t particularly
useful.
2014-09-16 13:14:06 +01:00
Jermolene
25777b147f Make dropzone text translateable
Also make the text sticky for browsers that support it, ensuring that
it is always visible even after scrolling
2014-08-19 13:07:57 +01:00
Jermolene
57ab9f6167 Translatability for the unsaved changes message
Another bit of #491
2014-08-13 19:14:23 +01:00
Jermolene
a4294b55f0 Add banner for binary tiddlers in edit mode
Makes it easier to add tags to a binary tiddler (eg a PDF).
2014-05-02 09:43:39 +01:00
Jermolene
0ac4c2b554 Allow digits in field names 2014-04-28 15:54:32 +01:00
Jermolene
84cd296c58 Minor tweaks to shadow warning infrastructure
1. Moved some methods out of boot.js because they are not needed until
after bootup
2. Added alternate message for editing an overridden shadow tiddler
3. Minor style tweaks
2014-04-28 15:16:31 +01:00
Devin Weaver
d0636f2124 Add a confirmation to edit a shadow tiddler
Should only display the confirmation if the shadow tiddler has not been
overridden in the first place. It checks this by looking for the
existence of a modified field for which the default system based shadow
do not have until a user changes them.

This addresses the second line item on issue #570

We will need new translations for the added string
`ConfirmEditShadowTiddler`
2014-04-27 17:15:42 -04:00
Jermolene
3afa26b9a3 Require confirmation before abandoning edits
Fixes #544
2014-04-12 14:15:49 +01:00
Jermolene
914a536d82 Correct relative date handling of t=1s
We were incorrectly displaying “1 seconds ago”
2014-03-31 12:41:54 +01:00
Jermolene
bca1d55280 Add validation of legal characters for fieldnames 2014-03-26 13:38:43 +00:00
Jermolene
178cfb1084 Make more core strings be translateable
Now we’re translating strings that occur in JavaScript modules.

Partially fixing #491
2014-03-20 20:55:59 +00:00
Jermolene
baa8cf3dd0 Add a warning segment to templates for TWC tiddlers
Now there’s a warning banner on all TWC tiddlers. It includes an
`upgrade` button that currently just flips the tiddler type to TW5
2014-03-15 17:03:50 +00:00
Jermolene
f48701544e Enhance tiddler title for system tiddlers
Now the $:/ part of the name is rendered in grey, making the main part
of the title more prominent.

@tobibeer suggested this a long time ago; good idea!
2014-03-13 17:40:53 +00:00
Jermolene
70d2d4b7a1 Remove the "create" button from the missing tiddler template 2014-03-04 18:55:43 +00:00
Jermolene
2f2a257745 Improve the descriptive text for missing tiddlers
Now we explain that it’s a missing tiddler, and add a “create” button
2014-03-02 18:43:22 +00:00
Jermolene
4ee277f41b Fix some missing translateables 2014-02-21 14:27:49 +00:00