Commit Graph

35 Commits

Author SHA1 Message Date
Mario Pietsch e5566543c9
Make tag-macro and tag*-templates human readable for future improvements (#7559) 2023-06-24 14:52:43 +01:00
jeremy@jermolene.com 9e28356047 Cascades: Ignore draft configuration tiddlers 2021-12-06 16:25:51 +00:00
jeremy@jermolene.com 122de63b71 Add a cascade for choosing tiddler colour
Following on from #6168
2021-11-19 12:01:32 +00:00
jeremy@jermolene.com e3ba880e18 Fix tag pill colouring
Fixes #6221
2021-11-19 10:52:13 +00:00
Jeremy Ruston a350a76a00
Add "cascade" filter run prefix and use it to control view templates (#6168)
* Initial Commit

* Set currentTiddler and ..currentTiddler for filter evaulation

* Precompile the filters for performance

* Add explicit test for empty result when no filter passes

* Use the cascade filter run prefix to choose the view template body template

* Use the cascade mechanism to choose between the edit and view templates

* Simplify cascade filter

Thanks @saqimtiaz

* Add control panel UI for inspecting the template cascades

* Refactor import listing and plugin listing as alternate body templates

As suggested by @pmario

* Refer to $:/core/ui/{View|Edit}Template via their associated config tiddlers

* Fix typo in previous commit

* Add demo of custom story tiddler template

* Tweak control panel wording

* Standardise "Story Tiddler Template" nomenclature

* Add a cascade for the editor template body

* Add a cascade for the view template title

* Avoid unwanted whitespace

* Add a cascade for dynamically choosing tiddler icons
2021-11-15 21:06:47 +00:00
jeremy@jermolene.com e157d16b72 Add data-tag-title attribute to tag pills
Fixes #5543
2021-03-13 13:19:12 +00:00
BurningTreeC 62cbbf1db4 fix textnodes between tags in viewtemplate (#3587)
this removes additional text-nodes in the dom after each `tc-tag-list-item` caused by the last empty line
we could also just remove that line but I don't know if that's a permanent solution or if some mechanism will re-add that line at some point, so I go with the `whitespace trim` pragma
2018-11-29 09:49:29 +00:00
BurningTreeC 545c508138 fix tags-dropdown link (missing-tiddlers ) (#3589) 2018-11-27 20:51:54 +00:00
Jermolene 8f1114960a Refactor draggable stuff for easier reuse
And in the process, make the button widget draggable.

Unfortunately, Firefox has a bug that prevents buttons from being
dragged (see https://bugzilla.mozilla.org/show_bug.cgi?id=568313 and
https://bugzilla.mozilla.org/show_bug.cgi?id=646823). So we have to use
the “tag” attribute to make it use a different element.
2017-03-23 14:23:33 +00:00
Jermolene 5ed7ade44f Add some handy drag-and-drop macros
And refactor the tag template to use one of them
2017-03-20 22:11:06 +00:00
Jermolene eba1c3c160 Improve support for drag and drop
Documentation TBD
2017-03-19 19:33:56 +00:00
Jermolene 28591965b1 Yet more refactoring of the tag macro vs template
This change re-instates the existing behaviour whereby omitting the
parameter to the “tag” macro will default to the current tiddler
2016-12-16 17:25:06 +00:00
Jermolene f07e0f981a Refactor tag template into an underlying macro
By refactoring the innards of the tag template into global macros, we
make it easier to re-use elements of the tag template
2016-11-28 19:17:25 +00:00
Jeremy Ruston a9b54d6fce Revert "Add provisional version of new tagger manager" 2016-11-28 10:40:55 +00:00
Jermolene e98d324e66 Add provisional version of new tagger manager
For discussion
2016-11-26 12:48:47 +00:00
Andrew J Harrison f76c7e9560 Refactor $:/core/ui/TagTemplate using sub-tiddlers (#2477)
The Open All by tag feature should really be in a plugin.
2016-06-14 16:46:40 +01:00
Jermolene e3f381ed8d Remove extraneous whitespace between tag pills
Fixes #2170
2015-12-29 15:21:53 +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 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 d0cbd34bf9 Rename "btn-invisible" class to "tc-btn-invisible"
Part of #764
2014-08-28 17:28:32 +01:00
Jermolene 0fae9ee992 Improve handling of popup state
An improvement to 6fb992690d

By making sure that all the popup state tiddlers have the prefix
$:/state/popup/ we can be more selective and just exclude popup state
tiddlers when we save. The end result is that once again other kinds of
state are persisted as expected (eg tabs, and sidebar visibility).
2014-06-22 11:14:11 +01:00
Jermolene b7f674c51a First pass at refactoring filter execution
This is the beginning of addressing #523.
2014-04-03 20:49:16 +01:00
Jermolene 06a0d21734 Use double linebreaks to indicate content of a widget or html element should be parsed in block mode
Fixes #82.

The old behaviour was to parse the content of a widget or html element
in block mode if the opening tag was followed by a line break. The new
behaviour requires two line breaks.

This makes it possible to include linebreaks more liberally within
wikitext, although care must still be taken to only use double line
breaks when the block mode behaviour is desired.

The code change here is very simple, just a single line change in
html.js. Most of the other changes are to convert various single line
breaks into double line breaks.
2014-02-20 21:42:31 +00:00
Jermolene 939ad11eae Rename the 'setvariable' widget to 'set'
Sleeker.
2013-11-15 18:31:39 +00:00
Jeremy Ruston fd70aa8c45 Get rid of the qualifyTiddlerTitles hack
Now, finally, we can implement qualifyTiddlerTitles as a macro.
2013-11-02 15:42:24 +00:00
Jeremy Ruston 1c2c6ca63f Animation dropdown menus
I don't know whether this is a good idea; the menus feel too slow and
puffy to me.
2013-11-02 09:21:54 +00:00
Jeremy Ruston 9e3618bdcf Rename the 'title' attributes of various widgets to 'tiddler'
The change is to avoid confusion with the HTML 'title' attribute. The
name 'tiddler' better emphasises the purpose of the attribute, too.
2013-10-30 13:36:44 +00:00
Jeremy Ruston c621339729 More fixes to the missing tiddler dropdown and the tag dropdown 2013-10-14 21:57:00 +01:00
Jeremy Ruston 707024a118 Set the colour of the tag pills
We no longer need the old setstyle widget
2013-10-14 21:38:12 +01:00
Jeremy Ruston be06257430 Split "transclude" widget into a separate "tiddler" and "transclude" widget
Belatedly realised that the design would be clearer without these two
separate concepts being conflated into a single widget.

As a result of this change, any other widget or template that generates
transclude widgets has needed adjustment.
2013-08-24 16:45:45 +01:00
Jeremy Ruston a9a2ae2223 Add sorting by tiddler lists
The tag and tagging filters now sort their results by the list field of
the tag, if present
2013-08-08 17:39:34 +01:00
Jeremy Ruston 08f278624b Allow tag tiddlers to specify the title of an icon tiddler
Demonstrated on the "done" tag
2013-07-05 08:53:09 +01:00
Jeremy Ruston 28b0b58a11 Make a distinction between templates and UI
Templates are the low-level bits and pieces that allow TW5 to generate
HTML and CSS renderings of tiddlers. The UI folder contains the
user-visible UI of TW5
2013-05-31 15:38:27 +01:00
Jeremy Ruston 905945ee26 Start rearranging the core plugin
Lots of inconsistencies have crept in
2013-05-31 15:22:34 +01:00