Commit Graph

75 Commits

Author SHA1 Message Date
Jeremy Ruston ece8b0ee01
Add <$testcase> widget (#7817)
* Initial Commit

* Add note to preview build

* Fix whitespace and indenting

Thanks @pmario

* Fix crash with unset $tiddler attribute on <$data> widget

Thanks @CodaCodr

* Don't duplicate "description" field in test cases

* Use different background colours for nested testcase widgets

* Extend the testcase widget to run tests

* Add testcases to control panel

* Add a view template body template to render testcase tiddlers

* Test edition should display testcases

* Whitespace fixes

* Make testcase tiddler tempalte link to itself

* Styling tweaks

* Docs improvements

* Styling tweaks

* Run the new tw5.com testcases in the test edition

* Update data widget to display its content in JSON

* Add testcase convenience procedure

* Clearer testcases for data widget, and docs tweaks

* Don't expect our intentionally failing test to pass

* Extend testcase default template so that the display format can be chosen

It is selected by setting the variable "displayFormat"

* DataWidget docs typo

* Fix data widget not refreshing

* Links in testcase output switch to the tab containing that tiddler

Thanks to @btheado for the suggestion

* Docs update for 648855e8a5

* Wording tweak

* Add support for narrative tiddlers in test cases

* Documentation improvements

* Cleanup comments

* Remove obsolete code comments

* Simplify template

* Docs update

* Rename $:/core/ui/testcases/DefaultTemplate/SourceTabs from $:/core/ui/testcases/DefaultTemplate/Source

* Use the view template body for failing tests

* Don't reference the geospatial plugin

* "Test case" should be two words

* Fix handling of currentTiddler variable

Fixes problem reported by @btheado in https://github.com/Jermolene/TiddlyWiki5/pull/7817#issuecomment-2103704468

* Prepare for merging
2024-05-20 11:30:30 +01:00
Mario Pietsch 3bd8c5d50d
Add code-body to unsafe templates, and new cascade for tiddlers with system tags (#7583) 2023-07-15 18:12:10 +01:00
Jeremy Ruston d1f90f075f
Add tm-http-request message for making HTTP requests (#7422)
* Initial Commit

* HttpClient object shouldn't need to know about events

* Add support for cancelling HTTP requests

* Make the number of outstanding HTTP requests available in a state tiddler

* Add a network activity button

Click it to cancel outstanding requests

* Fix typo

Thanks @btheado

Co-authored-by: btheado <brian.theado@gmail.com>

* Fix crash when cancelling more than one HTTP request

Thanks @saqimtiaz

* Further fixes to cancelling outstanding HTTP requests

* Fix missing body

---------

Co-authored-by: btheado <brian.theado@gmail.com>
2023-06-13 10:35:55 +01:00
lin onetwo 272ba6a4b7
Add layout switcher page control button (#7076)
* feat: add layout switcher page control button

* feat: use icon from https://morosanuae.github.io/tw-icons/

$:/images/tabler-icons/layout

* fix: trigger switcher

* feat: beautify button icon

* fix: caption

* feat: group palette theme and layout buttons together

* fix: review

* fix: style issue
2022-12-04 16:25:13 +00:00
jeremy@jermolene.com 53c5cc535e Put hide-body at the start of the view template body cascade 2022-07-29 14:20:26 +01:00
jeremy@jermolene.com f891eacddc Ensure code-body field can override new stylesheet view
See https://github.com/Jermolene/TiddlyWiki5/issues/6813#issuecomment-1199108091
2022-07-29 11:16:20 +01:00
Jeremy Ruston 1ca6305acb
Split the tiddler subtitle into individual segments tagged $:/tags/ViewTemplate/Subtitle (#6779) 2022-07-15 17:37:25 +01:00
Jeremy Ruston 338dc11436
Show stylesheets as rendered plain text with highlighting (#6778)
* First commit

* Enable syntax highlighting when highlight plugin is installed

* Use highlighting for the control panel stylesheet listings
2022-07-14 09:00:56 +01:00
jeremy@jermolene.com 54cfda76ee ViewTemplateBodyCascade: Add support for code-body field
Missed off #6168
2021-12-09 20:47: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 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 fba993502d Revert some of the UI changes for downloading external-js
See https://github.com/Jermolene/TiddlyWiki5/pull/5570#issuecomment-892127428
2021-09-12 10:48:17 +01:00
Mohammad Rahmani 737685149c
Plugins tab in control panel display tabs using tag filter instead of hardcoded list (#5694)
* Plugins tab in control panel display tabs using filter instead of hard coded list

* Update ControlPanelPlugins.tid

The two entries `[[$:/core/ui/ControlPanel/Plugins/Installed]] [[$:/core/ui/ControlPanel/Plugins/Add]]` were removed from list filed as per @Jermelon confirmation!

* Create SystemTag_ $__tags_ControlPanel_Plugins.tid

Update the SystemTags documentation tiddler
2021-08-29 17:35:18 +01:00
cdruan 23fec9e390
Fix faulty external-js single-file wiki (#5570)
* Fix problems with building single-file wiki using external-js template

* core/templates/external-js/tiddlywiki5-external-js.html.tid,
  core/templates/external-js/save-all-external-js.tid,
  core/templates/external-js/save-offline-external-js.tid
  core/templates/external-js/load-external-js.tid:
  Fix #5343. Exclude client-server plugins in tiddler imports and to
  specify a working URL for loading tiddlywiki5.js from local disk.
  Mirror save/all and save/offline templates in the regular server
  edition.

  Fix #4717 (tiddlywiki5-external-js.html.tid)

* core/modules/saver-handler.js:
  Need the change to make single file autosave work with the external-js
  template.

* editions/server-external-js/tiddlywiki.info:
  Provide external-js related build targets.

* core/language/en-GB/Snippets/ExtJSReadme.tid:
  Temporary doc to supplement TW5.com's external-js section. Demonstrate
  that upgrade could be done on single-file wikis with an externalized
  TW core.

* core/language/en-GB/Snippets/GetTiddlyWikiJS.tid:
  Documentation. Meant to be included in every wiki and to help end
  users acquire tiddlywiki5.js.

* Pre-configure save-wiki template for end-users

* Remove the newline character at the end of the file.

* Trim "template" value in saveWiki()

* Safeguard the code from extraneous whitespaces in transcluded result.

* Rename and add versioning to downloaded tiddlywiki core JS

* Rename "tiddlywiki5.js" to "twcore-VERSION.js"

* Preload $:/config/SaveWikiButton/Template tiddler with the required
  external-js template value.

* Update external-js user documentation

* Add "download tiddlywiki core JS" menu item to the "cloud" button.

* Update build's target defintions associated with external-js template.

* Move the user doc to the tw5.com edition.

* Coding style update

* Undo template name changes

* Correct text & fill colors on some disabled buttons

* Add new "export tiddlywiki core" button under page control tools

This new button can export tiddlywiki's core JS from user's wiki as
long as the wiki is served with the regular "root" template. The
button will be ineffective, thus disabled, if the core has already been
externalized by the "external-js" template.

With this button, a full standalone html wiki can obtain the matching
core JS without TiddlyWiki on node.js. Once this is done, the html wiki
can be converted to using the "external-js" template.

* Alternate version of "save tiddlywiki core for offline use"

This version will fire up a "Save File" dialogue box when clicked,
instead of directing the user to a helper doc for further instruction.
It achieves this by using the "download" attribute of the <a> html tag.
It works on most modern desktop browsers, but older browsers (e.g. IE)
may display the file instead.

* Adjust font-weight to match other menu items

* Merge two user documentations into one

* Add user-browser-cache=yes to --listen command

* Update "export tiddlywiki core" button hint

* Simpler implementation for switching btw online/offline core URL

Shave off one template by using filtered transclusion to control
online/offline core URL.

* Update user doc

Update the user doc to clarify that build index step is not needed to
initialize a new wiki.

* Rename twcore to tiddlywikicore

* Reformat the user doc

* Rework export-tiddlywikicore button

Popup an error message instead of disabling the button when export
core cannot be performed.

* Revert "Correct text & fill colors on some disabled buttons"

This reverts commit e7dbb7e712.
2021-07-06 15:02:21 +01:00
Jeremy Ruston 4bbc58dd24 Plugin Chooser: Ensure official plugin library is shown first 2020-04-13 11:45:06 +01:00
Jermolene 097c87fa7b Modularize the sidebar
Fixes #2758
2018-08-02 13:22:21 +01:00
Jermolene 6e2b4ebf3e Remove print-tiddler-window button for v5.1.17
We'll reconsider it for v5.1.18
2018-05-12 11:20:43 +01:00
Jermolene e11282cc08 Fix name of print tiddler button 2018-05-10 11:36:57 +01:00
Jermolene 2beae0db2e Tweaks for the new print tiddler toolbar button 2018-05-10 11:35:18 +01:00
Jermolene c0569849d2 Add rotate-left button to bitmap editor toolbar 2018-03-12 12:45:56 +00:00
Jermolene 9c57ebb05d Minor tweaks to new tiddler Explorer 2017-06-09 15:31:55 +01:00
Jermolene 16bb65d17f Introduce tiddler manager 2016-11-29 08:36:07 +00:00
Jeremy Ruston a9b54d6fce Revert "Add provisional version of new tagger manager" 2016-11-28 10:40:55 +00:00
Jermolene f67777161d Make manager sections be expandable 2016-11-27 23:04:54 +00:00
Jermolene 117bf0a0de Refactor the sidebar items into separate tiddlers
With some better styling too
2016-11-27 22:34:46 +00:00
Jermolene e98d324e66 Add provisional version of new tagger manager
For discussion
2016-11-26 12:48:47 +00:00
Jermolene 7a6d7e2a15 Refactor user interface for plugin tiddlers
* Refactored control panel “Plugins” tab to make the elements more
reusable
* Refactored the display of plugin tiddlers to use the same format as
the control panel (as suggested, I think by @danielo515), adding the
shadow tiddler listing as an overridable extension tab
* Added a new tab in the “More” sidebar providing quick access to all
installed plugins
2016-10-18 09:23:19 +01:00
Jermolene 72fb1e22ed Remove undo/redo formatting toolbar buttons
There have been long standing problems with the buttons not working in
Firefox, and now a [further
problem](https://groups.google.com/d/msg/tiddlywiki/GlsruQyPOag/BAhnI2mt
BgAJ) has come to light, and been similarly hard to resolve.

On balance, I’ve decided to remove the undo/redo buttons from the
toolbar (the ctrl/cmd-Z shortcut is still operational), thus avoiding
the problems, and saving some space in the core.
2016-05-01 13:51:45 +01:00
Jermolene 7224fea961 Introduce "link" editor toolbar button
As proposed by Alex Hough
2016-04-29 18:54:44 +01:00
Jeremy Ruston 2adf09129d Introduce text editor toolbar (#2315)
Tada!
2016-04-22 08:36:29 +01:00
Jermolene adf45b3468 Add a bulk delete button
I needed this in my day job, but think we need to do better on bulk
operations
2016-02-05 18:44:43 +00:00
Jermolene cf00658ddf Add full-width "unfold" button for folded tiddlers
And also a full-height “fold” button for unfolded tiddlers.

Trying to address #1908
2015-09-18 19:45:34 +01:00
Jermolene b641cb402d Add banner for unfolding tiddlers 2015-09-18 19:45:34 +01:00
Jermolene ac08dc2e35 Added fold/unfold all buttons
More translations, @BramChen, apologies…
2015-08-09 17:25:01 +01:00
Jermolene 16c69bb419 Tweaks to fold button 2015-08-09 16:11:37 +01:00
Jermolene 5d43cd7408 Add fold tiddler toolbar button
Addressing this tweet:
https://twitter.com/s_stryjecki/status/629349768280604672
2015-08-09 11:10:04 +01:00
Jermolene 7dddc925ae Allow delete button to be used in view toolbar
Fixes #1871
2015-07-08 15:33:18 +01:00
Jermolene 789069bb6b Add palette page control button 2015-05-05 18:53:35 +01:00
Jermolene 41d5031279 Position and hide the open-window button 2015-05-03 08:49:49 +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
Tobias Beer 7ec42f93ec updated $:/tags/PageTemplate
reverted topleftbar & toprightbar
2015-01-28 01:13:29 +01:00
Jermolene e0041d8483 Move page export button next to import 2014-11-13 21:39:38 +00:00
Jermolene 6fc5c70ace First pass at export button
New export button appears as a page control toolbar button, a tiddler
toolbar button, and a button in the advanced search filter tab.

Initially supports exporting as static HTML, CSV, JSON or `.tid` file.

Still to do:

* Made the exporter descriptions translatable
* Hide the export button by default
* User docs
* Cleaning up the existing templates (eg,
`$:/core/templates/alltiddlers.template.html` should work by
transcluding `$:/core/templates/exporters/Static`)
* Docs for the new macros `exportButton`, `csvtiddlers` and
`jsontiddlers`

Issues:

* OS X Numbers refuses to open CSV files that have been generated in
Chrome, because it thinks they’ve been downloaded from the Internet.
Firefox works OK
* The export button won’t work within the tiddler info panel, or from
the *more* popup (this is because we don’t support nested popups)
2014-11-10 20:59:15 +00:00
Jermolene 6681a8e1f2 Add an advanced search toolbar button 2014-10-22 16:30:41 +01:00
Jermolene d6dc4c14d7 Add new-journal-here button to viewtoolbar ordering 2014-10-09 17:36:33 +01:00
Jermolene 70984aa39f Add "new here" button
This is a basic “new here” tiddler toolbar button that just creates a
new tiddler tagged with the title of the current tiddler.

@pmario is there anything else required?
2014-10-08 22:02:32 +01:00
Jermolene e872f17842 Add a new journal page toolbar button
Spot the easter egg with the toolbar button…

Fixes #336
2014-10-08 17:46:34 +01:00
Jermolene 6f4af4fc27 Reorganise control panel tabs 2014-09-04 09:58:14 +01:00
Jermolene 920e11e792 Introduce refresh button and revert home button
Now the home button behaves as it did in 5.0.13, and the new refresh
button does a full page refresh.
2014-08-19 12:12:36 +01:00
Jermolene 4b05608ad5 Add tag manager button 2014-08-14 08:49:03 +01:00