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

185 Commits

Author SHA1 Message Date
Jermolene
d6c5e51501 Fix popup handling in Cecily and Zoomin view
Cecily and Zoomin story views use a document.body that is smaller than
the document.documentElement. We were just clearing the popups on
clicks on the document.body Clicks on the document element (ie, on the
background of the page) were not being trapped, meaning that you
couldn’t dismiss a popup.
2014-11-22 10:19:03 +00:00
Jermolene
1f82ebc7c3 Fix problem with parsing text references 2014-11-21 18:16:22 +00:00
Jermolene
b882a0dff1 Fixes to make nested popups work
Thus making the export button a lot more useful
2014-11-21 17:07:03 +00:00
Jermolene
91a7c39791 Update modal handling to allow variables to be passed
@felixhayashi I’m afraid I haven’t used your pull request as there were
a few details that I wanted to do differently. The main change is that
these changes allow both a param string and hashmap to be specified.
2014-11-07 14:54:46 +00:00
Jermolene
0bb8e08edc Provisionally make tag pill foreground colour be responsive
With this commit tag pills will now choose for the foreground colour
either the current palette “foreground” or “background” colours,
according to which has the higher contrast. It’s something @gernert has
expressed an interest in in the past, and I’ve tended to agree that it
is a nice piece of polish. It opens up the possibility of paler colours
for tag pills than are currently possible.

The trouble is that in order to implement it I’ve had to bring in a
third party library for parsing CSS colours. It weighs in just over
9KB, making quite a lot of weight for such a small feature. I don’t see
any other immediate uses for the colour parsing library either.

So, I’m undecided at the moment whether this should stay in the core.
2014-11-06 13:35:48 +00:00
Jermolene
5d600ce31b Coloured warnings and errors under Node.js 2014-10-21 19:30:27 +01:00
Jermolene
564457de1c Update to KaTeX v0.1.1 2014-10-17 20:10:38 +01:00
Jermolene
612e05a247 pushTop should return resulting array 2014-10-09 17:28:39 +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
3b69b7b6e8 Coding style tweak 2014-10-08 14:07:48 +01:00
Jermolene
63c174d7ed Update KaTeX wrapper to support operation under Node.js
Now we can generate static HTML containing mathematical typesetting
2014-10-06 21:20:19 +01:00
Jermolene
cbe2a53d6a Extend fakedom for KaTeX on Node.js
To make KaTeX work on the server we need to add support for the style
attribute and for setting the textContent of an element.
2014-10-06 21:10:35 +01:00
Jermolene
e2046ce4ff Treat HTTP 201 response code as success 2014-09-24 16:19:23 +02:00
Jermolene
f87ce7e98a Fix tiddler keyboard shortcuts
Maddeningly, I broke them in 5.0.16-beta…
2014-09-02 22:09:28 +01:00
Jermolene
7b1a9d84a1 Missed corrections of tm-auto-save-wiki message 2014-09-02 11:16:06 +01:00
Jermolene
b25351e834 Extend keyboard handling
To cope with the Mac’s “meta” key (ie command/⌘) preparatory to
trapping command-S
2014-09-02 10:41:48 +01:00
Jermolene
3a67fdb768 Obeisance to JSHint for core modules
There are still some warnings about making functions in a loop, but
I’ll fix those as a separate pull request because the fixes are more
than typographic errors.
2014-08-30 20:44:26 +01:00
Jermolene
2952afe7af Fix for autosave
Re-introduces the “tw-auto-save-wiki” message. The previous approach of
automatically triggering autosave whenever a tiddler changed meant that
changing configuration changes in control panel was triggering an
autosave. Using the explicit message gives us better control of the
situations in which we’ll autosave.

Now we solve the earlier problem of there being outstanding tiddler
change events at the time that we process the “tw-auto-save-wiki” by
deferring the autosave until the outstanding change event comes in.
2014-08-29 09:58:30 +01:00
Jermolene
2f69ea362c Rename "tw-*" messages to "tm-*" 2014-08-28 21:43:44 +01:00
Jermolene
f223310d34 Yet more "tw-*" -> "tc-*"
Part of #764
2014-08-28 19:41:29 +01:00
Jermolene
787481a804 Change more "tw-*" classes to "tc-*"
Part of #764
2014-08-28 18:21:08 +01:00
Jermolene
54591100b5 Rename "modal-*" classes to "tc-modal-*"
Part of #764
2014-08-28 17:34:02 +01:00
Jermolene
d8c3691bd1 Removed unneeded CSS classes
Part of #764
2014-08-28 17:17:50 +01:00
Jermolene
13c4e028b1 Refactored autosave mechanism
Previously we were using a message `tw-auto-save-wiki` to trigger an
autosave. The message was generated by certain UI actions such as
saving a tiddler. The trouble was that the message was being processed
before the wiki change event for the accompanying change had had a
chance to percolate. The end result was that the dirty indicator was
staying lit when using autosave.

The new approach abandons the autosave message and instead triggers the
autosave in the wiki change event when a relevant change occurs.

One happy side effect of these changes is that the dirty indicator now
works as expected with the client server edition - ie, when typing in a
draft tiddler the dirty indicator will flash briefly, and then clear
when the sync mechanism has completed saving the draft.
2014-08-27 10:04:54 +01:00
Jermolene
3529625a6c Fix full screen button not supported 2014-08-03 12:35:53 +01:00
Jermolene
799a5b059a Move fullscreen button into core from plugin 2014-08-01 16:52:12 +01:00
Jermolene
5f018c2092 More defensive dom utility hasClass()
It was failing on SVG elements such as `<path>`
2014-07-28 14:19:52 +01:00
Jermolene
e40a0c07b8 Fix support for upgrading encrypted wikis
Importing an encrypted wiki ordinarily doesn’t place the password in
the password vault on the basis that one ought to be able to import
from a file without automatically inheriting its password.

Now there’s a configuration option that can be used by the upgrade
plugin to cause the password vault to be updated with any password
entered by the user. The end result is that the user only needs to
enter their password once.
2014-07-16 10:06:24 +01:00
Jermolene
3351ae7e29 Fix issue with localStorage error on Firefox
Firefox raises an error if window.localStorage is accessed when cookies
are disabled:

https://bugzilla.mozilla.org/show_bug.cgi?id=771890
2014-07-06 10:11:21 +01:00
Jermolene
465f4ac469 Fix problem with refreshing modal dialogues
Previously any refreshing of the content of a modal would cause a
crash. The problem is the way that we steal the root widget for the
render trees used in the modal. The root widget is tied to the
container DOM node for the main content area, which isn’t actually a
parent of the modal DOM nodes, hence the confusion for the refresh
mechanism.
2014-07-04 21:07:35 +01:00
Jermolene
c9c1b0fbb4 Get rid of the tweakParseTreeNode() hack
It’s an embarrassing hangover from a refactoring of the parsing
mechanism last year.
2014-05-14 08:51:08 +01:00
Jermolene
7c8c5cf745 Fix problem with parsing main UI boot tiddlers
We were parsing the boot tiddlers, making them into a widget and then
refreshing the widget tree. The problem is that subsequent chances to
the boot tiddlers themselves wouldn’t be picked up as part of the
refresh.

Now we indirectly parse those UI boot tiddlers through a transclusion,
which does get refreshed in the desired way.
2014-05-06 10:14:22 +01:00
Jermolene
3cce12e13f More refactoring of startup.js 2014-05-05 14:41:46 +01:00
Jermolene
749582ede0 Split module loading into a separate startup task
Still a work in progress.
2014-05-03 17:10:55 +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
Jermolene
f7e50e0950 Add --build command
First pass at the build system described in #356.

To test it, move to a new, empty directory and try `tiddlywiki
editions/tw5.com --verbose --build`
2014-04-25 22:41:59 +01:00
Jermolene
e366aa3746 Use Date.now() instead of new Date()
Just for when what we actually want is a millisecond counter.

Interesting video about this:

https://www.youtube.com/watch?v=Vo72W1HWeFI
2014-04-14 09:02:52 +01:00
Jermolene
be5f6f6700 Allow spaces in property names in text references 2014-04-12 17:14:09 +01:00
Jermolene
272a4bbe61 Filtering optimisations 2014-04-05 17:31:36 +01:00
Jermolene
d402d3c5a6 Add performance measurement features
This is an experimental module to help us measure the performance of
the refresh cycle and the filter mechanism. Not intended to replace the
performance measurement features in browser developer tools, just to
make it easier to automate performance checks cross-browser.

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

I’m still not convinced that this stuff should be in the core, and may
well end up removing it after the present refactoring cycle.
2014-04-01 08:33:36 +01:00
Jermolene
dcce487934 Add support for platform dependent high resolution performance timers
For profiling filter performance
2014-03-31 18:42:30 +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
535837e017 Use client bounding rect rather than offset positions for computing scroll positions 2014-03-24 22:31:03 +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
db35bc36aa Disable storyviews when rendering to the fake dom 2014-03-10 18:41:11 +00:00
Jermolene
3636744d4f Add support for retrieving formatted text content from the fake dom
The idea is to convert HTML block elements into newlines, so that the
output is readable on a terminal.
2014-02-25 14:49:07 +00:00
Jermolene
f3930ad69c Add init command to initialise a wiki folder
Fixes #362
2014-02-23 22:58:17 +00:00
Jermolene
260080164f Update setTiddlerData() to preserve tiddler dictionaries
Previously, data tiddlers were always being saved in JSON format,
regardless of the original format.
2014-02-23 12:33:00 +00:00
Jermolene
cb5b95add2 Extend fakedom to support .value property
So that 88ffb2ad12 will work on the server
2014-02-21 15:43:25 +00:00