1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-01 09:43:16 +00:00
Commit Graph

4503 Commits

Author SHA1 Message Date
jeremy@jermolene.com
8ef6d78bef Filesystemadaptor: Use json format for tiddlers with fieldnames containing hash
Fixes #7144
2023-01-19 21:16:46 +00:00
Mario Pietsch
e6189078ff
Make tag-picker and keyboard-driven-input macros human readable (#7118)
* make tag-picker and keyboard-driven-input macros human readable

* fix indentation as requested
2023-01-19 20:44:00 +00:00
Cameron Fischer
c20c35c0a6
Fully committing core to the $genesis widget (#7129) 2023-01-19 17:48:23 +00:00
Télumire
1441138d5c
Correction of the toc and toc-body macro (#7121)
* correction of the toc and toc-body macro: tiddler without toc-link field can now be overriden + nested the macros

* reverted macro nesting

.. to be able to override the toc-body macro

* reverted tabs to spaces
2023-01-19 17:46:50 +00:00
Jeremy Ruston
a5894946de
Extend encodeuricomponent to process additional characters (#7128)
* First commit

* Fix version number in docs

* Add code comment
2023-01-19 17:45:54 +00:00
Matthias Bilger
a3a1eceb4a
Use iframe to embed PDF (#7102)
`<iframe>` is kind of preferred over `<embed>` and widely supported.
2023-01-19 17:01:53 +00:00
cdruan
aa8f7f77d6
External.js: Allow boot code to remain as tiddlers in tiddlywikicore.js (#7210)
* Allow boot code to remain as tiddlers

* Sync up with tiddlywiki5.html

* Add \whitespace trim

* Add download-full-wiki button

* Simplify ExportTiddlyWikiCore code

No longer needs the if-boot-code-is-missing part of the code.

* Replace space btw icon and button text with CSS
2023-01-19 16:52:12 +00:00
jeremy@jermolene.com
5d650e87dd Remove savers for Beaker Browser now it is archived
See https://github.com/beakerbrowser/beaker/blob/master/archive-notice.md
2023-01-19 16:45:30 +00:00
jeremy@jermolene.com
586d44f6ce Allow missing tiddlers to be deleted (ie closed)
Fixes #7217
2023-01-18 16:50:58 +00:00
Mario Pietsch
c51816e826
Fix pasting of multiple types at once (#6622)
* wip fix dropzone closure variable problem

* just a new commit to autocreate at test wiki
2023-01-17 15:02:57 +00:00
Mario Pietsch
e41511c652
make core/ui/MoreSideBar/Tags look nice in the story river (#7212) 2023-01-17 14:57:49 +00:00
jeremy@jermolene.com
fecb7edca4 Fix typo in messagecatcher widget
I think this was a copy-paste error, but would appreciate other eyes on this...
2023-01-16 19:34:02 +00:00
jeremy@jermolene.com
34643a4279 Add icon to default page layout and show in switcher
Thanks @linonetwo

Fixes #7197
2023-01-16 13:21:40 +00:00
Saq Imtiaz
dd6e00687b
Adds support for indenting pragmas with whitespace (#7185)
* feat: first pass at allowing pragmas to be indented

* Added documentation
2023-01-08 13:17:01 +00:00
Cameron Fischer
7b7063a7b2
Added documentation for neglected core fields (#7191) 2023-01-08 13:13:04 +00:00
jeremy@jermolene.com
8ca0bf10e4 Lazy loading a tiddler should trigger a sync
Fixes #7138
2023-01-03 14:28:48 +00:00
btheado
6f9cf20e77
Fixes reduce, filter, and sortsub operators undefined variable exception (#7156)
* Added failing tests for #7155

* Pass getVariable options through to the widget method. Fixes #7155

* Whitespace fix

* Added tests to verify macro parameters work inside filter, reduce, and sortsub operators
2023-01-03 13:48:20 +00:00
jeremy@jermolene.com
04810667e6 It's 2023 2023-01-02 15:47:24 +00:00
jeremy@jermolene.com
42a408146d Empty or missing type on genesis widget should not render an element/widget
Fixes #7153
2022-12-30 21:42:07 +00:00
jeremy@jermolene.com
3bdc18ab84 Fix json operators retrieving properties of strings and numbers
Fixes #7160
2022-12-30 15:28:34 +00:00
Jeffrey Zhang
18d3ea9d14
Support obsidian external link (#7149) 2022-12-24 15:56:46 +00:00
jeremy@jermolene.com
95e6168839 Fix logout triggering 404 error
See https://talk.tiddlywiki.org/t/logout-error-xmlhttprequest-error-code-404/5590/5 for details

We can't POST to the logout endpoint without triggering authentication, so we report in advance whether logout is supported.
2022-12-24 12:13:01 +00:00
jeremy@jermolene.com
a5afed9384 Fix crash with illegal tag names for element widget
Fixes #7122
2022-12-20 17:31:51 +00:00
jeremy@jermolene.com
b37a356b5e Crash with <$genesis $type="" />
Fixes #7140
2022-12-20 16:45:29 +00:00
jeremy@jermolene.com
55d9a5e16d Preparing for v5.2.6 2022-12-19 18:52:03 +00:00
jeremy@jermolene.com
8d48964aca Preparing for v5.2.5 2022-12-13 16:42:40 +00:00
Jeremy Ruston
0ce5788747
Fixes for JSON operators (#7105) 2022-12-09 18:31:23 +00:00
Maurycy Zarzycki
a899aac92c
Change first letter in two plugin-related buttons to be uppercase to be consistent with the button that appears earlier (#7103) 2022-12-08 13:48:45 +00:00
jeremy@jermolene.com
bef11fe6a2 Allow overriding the coreURL for the external JS builds
Fixes #7096
2022-12-07 22:02:58 +00:00
FlashSystems
80442b7f7f
Fix for bug #7054 (#7092)
* Fix Bug #7054: Reuse of $:/core/ui/EditTemplate/fields broken

This fixes Bug #7054 by creating a new variable
`safeNewFieldValueTiddlerPrefix` that is always set to a valid,
temporary prefix. This variable is used within `$action-deletetiddler`.
If the passed `newFieldValueTiddlerPrefix` variable is empty a new
prefix will be generated by the same logic that creates the original
`newFieldValueTiddlerPrefix` variable.

To be even more defensive, the prefix-filter was prepended with another
prefix filter that limits matches to `$:/temp/NewFieldValue`. This
prevents a bogus but non empty value in `newFieldValueTiddlerPrefix`
to delete arbitrary tiddlers.

* Add a default for `newFieldValueTiddlerPrefix`

This fixes a problem that was identified while fixing bug #7054. If the
tiddler `$:/core/ui/EditTemplate/fields` is transcluded directly and
`newFieldValueTiddlerPrefix` is not set, it will be generated. This
makes sure that this value is defined. It can not be redefined
unconditionally because if this tiddler is transcluded from
`EditTemplate.tid` these two tiddlers must agree on the same prefix
because the clean-up is duplicated between `EditTemplate.tid` and
`fields.tid`.

This would make `safeNewFieldValueTiddlerPrefix` obsolete, but I leave
it in there to make the macros safe and prevent any problems if the
`newFieldValueTiddlerPrefix` is unset by a later change.
2022-12-05 22:05:20 +00:00
jeremy@jermolene.com
595da5f9f6 Page control button for page layout should be hidden by default 2022-12-04 20:01:17 +00: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
acc7224758 Ensure unfold indicator is always visible
Fixes #7084
2022-12-04 11:19:54 +00:00
jeremy@jermolene.com
0db987da60 Minor tweaks for #7073 2022-12-04 11:03:51 +00:00
Carlo Colombo
a93a499684
Add commands command to run commands returned from a filter (#7073) 2022-12-04 10:59:59 +00:00
jeremy@jermolene.com
2c33502a4a Exclude drafts from the advanced search filter dropdown
Fixes #7083
2022-12-03 17:53:42 +00:00
lin onetwo
451a3454b5
Optionally allow click outside to close modals (#7072)
* feat: option to allow click on modalBackdrop to close modal

* feat: allow switcher modals closable

* feat: allow use caption field as modal title

* refactor: make maskClosable a variable

* fix: use "true"

* fix: code style

* docs: add description about maskClosable

* fix: convention is to have double quotes for strings in the TW core

* refactor: using a "mask-closable" field on the modal tiddlers instead of as a message parameter

* docs: move to modal tid

* Update WidgetMessage_ tm-modal.tid
2022-12-03 17:26:44 +00:00
Mohammad Rahmani
45a7eb1c03
Add new focus attribute to $select widget (#7081)
* Add focus attribute to $select widget

This address https://github.com/Jermolene/TiddlyWiki5/issues/7070

* Update SelectWidget.tid

Update the documentation for $select widget to include the new attribute: focus
2022-12-03 08:22:21 +00:00
FlashSystems
3918e59cc1
Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013)
* Fix popup location for tables

This commit introduces the `popupAbsCoords` option to the $button widget
and implements an absolut coordinate format.

Coordinates for popups are stored in the format `(x,y,w,h)`. These
coordinates are relative to the offset parent of the element that
defines the popup.

This commits adds a second format `@(x,y,w,h)`. Coordinates specified in
this format a relative to the pages root element.

The `popupAbsCoords` option of the $button widget enables the use of
this coordinates.

* Unify the declaration of the RegEx for parsing the popup-position

The regular expression was declared in three locations with the same
content. This commit supplies a new function `parseCoordinates` in
`popup.js`. This function returns the parsed coordinates and understands
the classic/absolute coordinates.

This function is used in `reveal.js` and `action-popup.js` to parse the
coordinates.

* Add documentation for coordinate systems

* Consolidate creating coordinate strings

The Popup object now contains a `buildCoordinates` method that can be
used to build coordinate strings. It takes an "enum" for the coordinate-
system to use. This makes everything easily extensible and prevents the
use of magic values.

* Add tests for `parseCoordinates` and `buildCoordinates`

* Add `tv-popup-abs-coords` to `collectDOMVariables`

This will make the absolute coordinates available for the
`DraggableWidget` and the `EventCatcherWidget`.

* Add documentation for the `tv-popup-abs-coords`

... to the `DraggableWidget` and the `EventCatcherWidget`.

* Fix crash when generating a static version of the TW

The Popup class is not initialized in `startup.js` if `$tw.browser` is
not true. After having consolidated the facilities for parsing
coordinate strings into `popup.js` this breaks because the static build
needs to parse coordinate stings even if no Popup module is initialized.
This commit solves this problem by making `readPopupState`,
`parseCoordinates` and `buildCoordinates` static methods of `popup.js`.
It also adds a comment to these functions to show that these can be called
safely even if the Popup-Class is not initialized.
2022-12-01 21:16:44 +00:00
lin onetwo
f7ccba4c25
Add "code" and "key" to propogateKeydownEvent's cloneEvent (#7071)
* feat: add key

* feat: add code
2022-11-30 10:17:10 +00:00
Mario Pietsch
319d7fbe9c
Add hidden option to make "More" sidebar tabs be horizontal (#7063)
* make more sidebar tabs configurable vertical or horizontal

* more sidebar tabs orientation German translation

* remove language specific texts for more-horizontal setting

* Add More -> tabs horizontal setting to Hidden Settings
2022-11-30 09:57:14 +00:00
Cameron Fischer
856aca2f92
Linked-List refactor (#6056)
* Added failing linked-list test for #7059

* Fixed linked-list remove bug #7059

* Added failing linked-list test for #7059

* Switched LinkedList to use Map

* Removed this.last from LinkedList

* Removed this.first from LinkedList

* Switching to deleting old LinkedList entries

* LinkedList rewritten to be better

* Using null as LinkList ends to reduce hashing

* Using adhoc map... cause it's better than ECMA6 Map

* compliance with TiddlyWiki coding conventions

* Made link-list tests confirm the prev links

Co-authored-by: btheado <brian.theado@gmail.com>
2022-11-27 17:48:08 +00:00
btheado
bea1a6b14f
Fix issue with linked list remove (#7065)
* Added failing linked-list test for #7059

* Fixed linked-list remove bug #7059
2022-11-26 15:05:10 +00:00
jeremy@jermolene.com
32a033bb50 Fix advanced search keyboard shortcut navigation
Fixes #7008
2022-11-26 11:22:24 +00:00
jeremy@jermolene.com
d707e6f825 Add Mastodon icon 2022-11-25 15:28:12 +00:00
jeremy@jermolene.com
00927d2e13 Add parsermode pragma
Fixes #7058
2022-11-23 22:35:32 +00:00
Mario Pietsch
882e040e62
Refactor import preview to not use a hidden table row (#7057) 2022-11-23 21:53:21 +00:00
jeremy@jermolene.com
026739e2e0 Revert "Revert "add table utility classes and some docs how to use them. fix problem with control-panel basics tab shown in story river (#7039)""
See https://github.com/Jermolene/TiddlyWiki5/pull/7057#issue-1461608206

This reverts commit fba9efcf4a.
2022-11-23 21:52:36 +00:00
jeremy@jermolene.com
fba9efcf4a Revert "add table utility classes and some docs how to use them. fix problem with control-panel basics tab shown in story river (#7039)"
See #7056

This reverts commit b8a30091ee.
2022-11-23 08:28:06 +00:00
Jeremy Ruston
cb0d0cfa6d
Support nested macro definitions (#7004)
* First commit

* Switched to \end <name> instead of all those repeated backslashes

Thanks @kookma. See https://github.com/Jermolene/TiddlyWiki5/pull/7004#issuecomment-1286429236

* Docs update
2022-11-22 17:10:37 +00:00
Maurycy Zarzycki
d32d559f93
Add Timestamp to DateFormat (#7043)
* add Timestamp to DateFormat

* improve TIMESTAMP documentation
2022-11-21 16:13:34 +00:00
Maurycy Zarzycki
4f7b10e055
CSV parser improvements (#7042) 2022-11-20 17:51:01 +00:00
Mario Pietsch
b8a30091ee
add table utility classes and some docs how to use them. fix problem with control-panel basics tab shown in story river (#7039) 2022-11-20 17:48:10 +00:00
Maurycy Zarzycki
6955f14c3c
add a hidden config to disable Syncer logging to the console (#7049) 2022-11-20 17:26:14 +00:00
jeremy@jermolene.com
368963def0 Revert "Allow $:/core/ui/ControlPanel/Basics to work in the story river + some docs about utility classes (#6912)"
This reverts commit 10cb585dae.
2022-11-15 11:41:55 +00:00
Mario Pietsch
ea3503e30c
Allow users to overwrite TOC default icons (#6913)
* Allow users to overwrite TOC default icons

* Fix docs as requested
2022-11-14 22:04:30 +00:00
Mario Pietsch
5e116d2a57
Add data-tags and data-tiddler-title attributes to preview area (#6939) 2022-11-14 17:48:00 +00:00
Mario Pietsch
aa5183a08e
Add indentation to $:/TagManager (#6923) 2022-11-14 17:42:17 +00:00
Mario Pietsch
10cb585dae
Allow $:/core/ui/ControlPanel/Basics to work in the story river + some docs about utility classes (#6912)
* allow $:/core/ui/ControlPanel/Basics to work in the story river + some docs about utility classes

* apply changes suggested by twMat

* fix some typos and change the base padding for tables

* fix a typo and remove whitespace

* remove TODO in base CSS
2022-11-14 17:36:01 +00:00
Mario Pietsch
832868ecae
Allow user defined setting for retain-story-order button in ControlPanel (#6863)
* allow user defined setting for retain-story-order button in ControlPanel

* improve hidden setting wording

* adjust all languages with new "ControlPanel DefaultTiddlers BottomHint

* fix typos and snippet filename
2022-11-14 17:30:13 +00:00
Mario Pietsch
7f48b6c6ce
Make timeline macro more customisable (#5947)
* make the timeline-macro more customizable

* changed comment as requested
2022-11-14 17:11:26 +00:00
jeremy@jermolene.com
e8148ff978 Missed off 965bd090a9
Thanks @pmario @saqimtiaz
2022-11-05 09:41:43 +00:00
jeremy@jermolene.com
965bd090a9 list-links macro: add "field" parameter
See https://talk.tiddlywiki.org/t/choosing-what-field-to-show-with-list-links/5039?u=jeremyruston
2022-11-05 09:10:31 +00:00
Cameron Fischer
3be9b13814
Fix for #4767: lazy-loading deletes tiddler bodies (#7014) 2022-11-02 17:26:08 +00:00
jeremy@jermolene.com
f54ecc23f3 Fix wikification of tiddler titles in advanced search filter dropdown
Closes #7017

Thanks @ericshulman
2022-10-31 12:03:47 +00:00
Saq Imtiaz
3f55f827a6
Extend page template with filter assigned classes (#6976)
* Extend page template with filter assigned classes

* feat: added dynamic class support for tiddler templates and documentation
2022-10-28 12:58:58 +01:00
jeremy@jermolene.com
b9d27e9fd5 Revert "Fix popup position if popup is triggered from within an offsetParent element (#6887)"
This reverts commit 5b85786f73.
2022-10-22 13:22:15 +01:00
FlashSystems
5b85786f73
Fix popup position if popup is triggered from within an offsetParent element (#6887)
* Fix popup location for tables

This commit introduces the `popupAbsCoords` option to the $button widget
and implements an absolut coordinate format.

Coordinates for popups are stored in the format `(x,y,w,h)`. These
coordinates are relative to the offset parent of the element that
defines the popup.

This commits adds a second format `@(x,y,w,h)`. Coordinates specified in
this format a relative to the pages root element.

The `popupAbsCoords` option of the $button widget enables the use of
this coordinates.

* Unify the declaration of the RegEx for parsing the popup-position

The regular expression was declared in three locations with the same
content. This commit supplies a new function `parseCoordinates` in
`popup.js`. This function returns the parsed coordinates and understands
the classic/absolute coordinates.

This function is used in `reveal.js` and `action-popup.js` to parse the
coordinates.

* Add documentation for coordinate systems

* Consolidate creating coordinate strings

The Popup object now contains a `buildCoordinates` method that can be
used to build coordinate strings. It takes an "enum" for the coordinate-
system to use. This makes everything easily extensible and prevents the
use of magic values.

* Add tests for `parseCoordinates` and `buildCoordinates`

* Add `tv-popup-abs-coords` to `collectDOMVariables`

This will make the absolute coordinates available for the
`DraggableWidget` and the `EventCatcherWidget`.

* Add documentation for the `tv-popup-abs-coords`

... to the `DraggableWidget` and the `EventCatcherWidget`.
2022-10-22 13:13:39 +01:00
Rob Hoelz
24dbf69180
Fix [is[variable]] operator doesn't work for "fake" variables #6303 (#6996)
* Add tests for [is[variable]] and "faked" variables

See GH #6303

* Make is[variable] and variables[] operators resilient to fake widgets

Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
2022-10-18 17:08:04 +01:00
jeremy@jermolene.com
b531984f50 Restore "Add default settings for styled inline SPANs (#6877)"
This reverts commit 6f98edd6bd.
2022-10-16 17:28:36 +01:00
jeremy@jermolene.com
8f079e2d45 Fix handling of orderedattributes when adding classes/styles
Fixes issue referred to in https://github.com/Jermolene/TiddlyWiki5/pull/6877#issuecomment-1277590200
2022-10-16 17:27:46 +01:00
Maurycy Zarzycki
cfd894e6fb
allow select widget class to update if it uses a filter and is output changes (#6987)
* allow select widget class to update if it uses a filter and the filter output changes

* rewrite code to be more idiomatic + updates local property
2022-10-15 12:26:21 +01:00
jeremy@jermolene.com
6f98edd6bd Revert "Add default settings for styled inline SPANs (#6877)" because of failed tests
This reverts commit 23e0eeb556.
2022-10-07 18:43:09 +01:00
Mario Pietsch
23e0eeb556
Add default settings for styled inline SPANs (#6877)
* add default settings for styled inline SPANs

* change color names in palettes and vanilla-base

* change parser behaviour if custom class is used

* tc-inline-style will only be set if no other custom setting is appliead

* Add tests for inline-styles

* add one more test

* remove space after if
2022-10-07 18:05:49 +01:00
Maurycy Zarzycki
f33c7e2aef
Allow global keyboard shortcuts to override all other shortcuts by providing a special field (#6735)
* allow global keyboard shortcuts to override all other shortcuts by providing a special field

* rework the global shortcuts taking priority

* replace bool option with options object in KeyboardManager's keydown handler

* update keyboard shortcut documentation to add information about the new priority setting

* add support for priority global keyboard shortcuts to code mirror

* update the feature's docs to point out it was/will be introduced in 5.2.4

* rollback unnecessary change
2022-10-07 17:31:04 +01:00
jeremy@jermolene.com
4007610d52 Prefer "modal" over "wizard" in the core
See https://github.com/Jermolene/TiddlyWiki5/discussions/6965#discussioncomment-3754315
2022-10-02 18:59:05 +01:00
jeremy@jermolene.com
fb34df84ed New image shortcut should not add journal tags
Fixes #6968
2022-10-02 18:55:26 +01:00
jeremy@jermolene.com
36896c3db8 Use view template body when opening tiddler in new window 2022-10-02 17:22:48 +01:00
jeremy@jermolene.com
1841b0fa4f Fix tests 2022-10-01 14:05:13 +01:00
jeremy@jermolene.com
47f80339b2 Update transclude widget to use error widget
Missed off #6970
2022-10-01 10:15:14 +01:00
Jeremy Ruston
db6abb9703
Improve recursion detection for transclusion and filters (#6970) 2022-10-01 10:13:40 +01:00
jeremy@jermolene.com
1df4c29d73 Relax the restriction on the let widget being unable to create variables starting with a dollar 2022-10-01 09:47:26 +01:00
Jeremy Ruston
4e9267ea58
Introduce genesis widget (#6961)
* Initial Commit

* Fix version number

* Fix docs date
2022-09-24 14:07:42 +01:00
jeremy@jermolene.com
81ac987484 Optimise variable prototype chain handling
With this improvement and 53d229592d I'm measuring a 10-15% performance improvement between v5.2.3 and master using https://github.com/Jermolene/tiddlywiki-performance-test-rig
2022-09-24 08:28:16 +01:00
jeremy@jermolene.com
0a00da6db9 Optimise fake dom
Object.setPrototypeOf() appears to be significantly faster
2022-09-23 18:09:45 +01:00
jeremy@jermolene.com
166a156584 Fix typo: Safe mode should prevent globally disabling parser rules 2022-09-23 18:08:28 +01:00
Robin Munn
51bdf60ee8
Fix bug when using built-in list field as listField parameter to checkbox widget (#6897)
* Fix bug with checkbox widget and `list` field

The `list` field is stored as a list and frozen against modifications,
and getFieldList() returns it directly without creating a copy. So
before we modify it, we need to make a copy so we're not modifying a
frozen list. This bug doesn't manifest with custom fields, which are
stored as strings, only with the built-in `list` field.

* Fix checkboxes referencing non-existent tiddlers

This fixes the "tiddler is undefined" error when a checkbox's listField
property references a tiddler that doesn't (yet) exist.

* Better logic for checkbox listField handling

If the field contains an array, then it's almost certainly referenced
elsewhere and needs a defensive copy made. If it contained a string,
then it's safe to modify without making a defensive copy.
2022-09-22 18:52:55 +01:00
Cameron Fischer
debfd42d51
Log message not to have spaces and <empty string> (#6947) 2022-09-15 12:10:33 +01:00
jeremy@jermolene.com
d825f1c875 Use view template body cascade for the default preview 2022-09-10 11:01:29 +01:00
Jeremy Ruston
35b9faaa89
JSON Filter Operators (Revised Attempt) (#6936)
* First commit

Cherry-picked from #6666

* Adjust release version number

Just in case we decide to make a release before we merge #6666
2022-09-02 18:15:45 +01:00
Xavier Cazin
0b1fc8e574
Make dialogs over deleting AdvancedSearch filter results translatable (#6933)
* Add fr-FR strings over deleting AvancedSearch filter results

* Add default strings over deleting AvancedSearch filter results

* Make dialogs over deleting results from AdvancedSearch filters translatable
2022-08-31 17:32:55 +01:00
jeremy@jermolene.com
127f660c91 Edit widget: remove default text "Type the text for the tiddler 'foo'"
Fixes #6152
2022-08-28 15:12:51 +01:00
Mario Pietsch
2ff5bd5a0f
Fix removing a field with empty name (#6888)
* allow us to remove a field with empty key

* fix typo in if clause
2022-08-09 18:44:45 +02:00
Mario Pietsch
d7b9e6fb02
Getting started new table layout (#6894)
* change core GettingStarted tiddler table layout

* rename tc-table-no-grid to tc-table-no-border
2022-08-09 18:42:01 +02:00
jeremy@jermolene.com
3fd2cfc339 Preparing for v5.2.4
Note that we currently only plan to release v5.2.4 if there's an issue with v5.2.3, and that the next release version will be v5.3.0
2022-08-02 17:31:20 +01:00
jeremy@jermolene.com
667da96c97 Fix crash when closing plugin library
Fixes #6855
2022-07-31 15:35:14 +01: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@jermolene.com
34b1b8128f Server: correctly print URL when running on IPv6
Since https://github.com/nodejs/node/issues/40537 users are more likely to encounter IPv6 connections.

IPv6 URLs require square brackets around raw addresses.

With this change VS Code correctly hyperlinks the message `Serving on http://[::1]:8080`
2022-07-29 10:07:59 +01:00
jeremy@jermolene.com
a453121e96 Render command help: use single quotes for safety
See https://github.com/Jermolene/TiddlyWiki5/issues/6827#issuecomment-1198540330
2022-07-29 09:48:49 +01:00
Mario Pietsch
0ad0001e29
Fix #6840 tab macro stat handling (#6841) 2022-07-28 21:26:09 +01:00
Mario Pietsch
2441819c70
Remove hardcoded spaces and replace with SPAN and proper class (#6825) 2022-07-28 17:02:14 +01:00
jeremy@jermolene.com
ca762ab7a6 Additional example of render command
Fixes #6827
2022-07-28 16:33:57 +01:00
Saq Imtiaz
613b3df367
Image lazy loading (#6809)
* Extend image widget with lazy loading support

* docs: added from-version to docs update
2022-07-21 15:30:56 +01:00
Saq Imtiaz
0237d9ed94
feat(filters): extend :map filter run prefix to accept a suffix to enable mapflat (#6806) 2022-07-21 09:23:01 +01:00
jeremy@jermolene.com
7e9c2a1a10 Fix crash when viewing $:/core/ui/ViewTemplate/body/rendered-plain-text
Fixes #6805
2022-07-21 09:05:20 +01:00
Saq Imtiaz
fe1147c6fd
Fix: restore drag and drop on mobile chrome (#6789) 2022-07-15 18:19:44 +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
Saq Imtiaz
19331cc6f9
Fix: brittle selector implementation for draggable widget (#6786)
* Fix: fixes #6595, brittle selector implementation for draggable widget

* Docs: updated for fix to selector implementation for draggable widget
2022-07-15 15:38:09 +01:00
Saq Imtiaz
f6e021d70f
Feat: dynamically refresh class for draggable widget DOM node instead of re-rendering the widget (#6787) 2022-07-15 15:37:27 +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
Robin Munn
18d8173dcc
New insertafter filter operator (#6771)
* Implement insertafter operator (like insertbefore)

Currently, the behavior of insertafter if the target is not found is to
append the inserted tiddler to the end of the list, like insertbefore
does. In the next commit, we'll add a suffix to customize what both
insertafter and insertbefore do when the target is not found.

* Add failing tests for insertafter suffixes

Also includes tests for insertbefore suffixes (start/end), since we'll
be implementing both of those at the same time.

* Add start/end suffixes for insertafter/before

The tests that exercise the start/end suffixes now pass.
2022-07-13 17:08:17 +01:00
Mohammad Rahmani
4cd3c065e7
Add emptyMessage to list-links-draggable and correct docs (#6776) 2022-07-13 15:58:27 +01:00
Mario Pietsch
0112d04033
Fix 6731 tag and field name trim (#6740)
* this commit should fix #6731. It trims field and tag whitespace

* this commit increases tag space visibility as mentioned in 002d47b4d9

* fix a missing HTML end tag

* fix $:/Manager select element max width
2022-07-09 08:35:38 +01:00
jeremy@jermolene.com
f93fe50044 Fix anchor links do not work with addressbar=permalink and animationduration=0
Fixes #6757
2022-07-05 18:39:14 +01:00
jeremy@jermolene.com
ceec7b5737 Style tweaks for #6755 2022-07-05 17:47:57 +01:00
Mario Pietsch
76bc2f7524
Fix svg foreignObject that contains DIVs (#6755)
* xmlns attribute defined in element takes precedence

* use predefined tagNamespaces variable as default value

* change code as suggested by Jeremy
2022-07-05 17:46:31 +01:00
Nolan Darilek
92c4c82005
Add ARIA region for editor. (#6749) 2022-07-01 15:39:52 +01:00
FSpark
2c607ee8e6
Add storyTiddler to render command (#6746) 2022-06-29 08:58:40 +01:00
Nolan Darilek
7ac7d26f86
Add alert role to notifications so they're automatically spoken by screen readers. (#6743) 2022-06-28 17:48:03 +01:00
Nolan Darilek
f02bd2392f
Various accessibility improvements (#6742)
* Add `main` and `article` roles to stories and story.

* Support `role` and \aria-checked` in buttons, and integrate with sidebar tabs.

* Add `region` role to sidebar, and set caption as `aria-label`.

* Add accessibility roles and labels to static templates.

* Update test fixtures with new ARIA tab attributes.
2022-06-28 14:05:52 +01:00
jeremy@jermolene.com
5e35c8dda6 Revert "Allow global keyboard shortcuts to work in framed editor (#6705)"
This reverts commit 8e64e21039.

See https://github.com/Jermolene/TiddlyWiki5/pull/6705#issuecomment-1162738927
2022-06-22 08:18:13 +01:00
jeremy@jermolene.com
a29889a741 Fix layout bug introduced in d5030eb87b
Thanks @pmario
2022-06-17 14:03:36 +01:00
jeremy@jermolene.com
d5030eb87b Prevent Chrome from offering password autocomplete for search boxes
Fixes #6723
2022-06-14 09:45:49 +01:00
jeremy@jermolene.com
35b0833e0c Fix handling of {!!title} in a filter with no currentTiddler
Fixes #6721
2022-06-14 08:33:47 +01:00
Maurycy Zarzycki
8e64e21039
Allow global keyboard shortcuts to work in framed editor (#6705)
Co-authored-by: Maurycy Zarzycki <maurycy@evidentlycube.com>
2022-06-11 08:57:08 +01:00
jeremy@jermolene.com
bb47cc97f5 Fix code_body typo 2022-05-29 10:51:49 +01:00
jeremy@jermolene.com
7e4722f07a Fix crash with missing palette tiddler 2022-05-25 18:08:08 +01:00
Cameron Fischer
696c5c9c7a
Compiled filters are cached (#6402)
* Compiled filters are cached

* Adjusting comments, and filtercache cap
2022-05-23 11:26:56 +01:00
jeremy@jermolene.com
6eb4fbeead Fix double palette entries
Fixes #6700

Thanks to Eric Shulman
2022-05-20 17:13:12 +01:00
Max Schillinger
7cbe1e1d83
Fix toggling of the numbered list prefix in Markdown tiddlers (#6697)
* Fix toggling of the numbered list prefix in Markdown tiddlers

* Define startsWith in utils.js because it's not available in ECMAScript5.1
2022-05-17 22:31:50 +02:00
Max Schillinger
5ea315fb98
Allow toggling wrap-lines text operations (like mono block) (#6698) 2022-05-17 22:16:54 +02:00
FlashSystems
e9405ac810
Fix for Bug #6618 (#6628)
* Fix for Bug #6618

This Commit fixes Bug #6618. It is a little bit more complicated than
using one tiddler to store the new value for a field. Because the
following can happen:

* The user types "not-a-date" into the field value of a simple text field.
* The user now selects a field name that uses a HTML5 date editor. The
  Editor will show no date because the value cannot be parsed.
* The user saves the tiddler by clicking the checkmark.

Now the date-field contains the value "not-a-date" but the user was not
aware that this will be added. The edit control showed no date (because
the value was invalid) and the user assumed the field was empty and
won't be added to the tiddler.

To prevent this, every kind of field editor gets its own storage tiddler.
Its name is derived from the SHA256-hash of the name of the tiddler that
is returned by the Field Editor Cascade. That way every editor in the
cascade is only seeing its input. As long as the default setup (with one
default editor) is used, everything works like in 5.2.1.

This commit also fixes the bug that the after adding a field the
field-type input box was not focused again.

* Update Documentation for Field Editor Cascade

The fix for bug #6618 makes the handling of the tiddler backing the edit
operation much more complicated. See previous commit "Fix for Bug #6618"
for more details.
2022-05-14 13:30:04 +01:00
Mario Pietsch
bc8c011eb3
Fix title indentation problem (#6679)
* fix-6678-title-indent

* optimize code as suggested by Saq
2022-05-09 15:49:42 +01:00
Simon Huber
b4deb7cc45
Add tv-widgetnode-width and tv-widgetnode-height (#6681)
* Add tv-widgetnode-width and tv-widgetnode-height to collectDOMVariables

* Add docs

* update docs

* Update modified field
2022-05-09 10:42:23 +01:00
Simon Huber
4b8594c4a8
Fix: eventcatcher widget - variables can be undefined (#6668)
* Fix: eventcatcher widget - variables can be undefined

* Fix: selectedNode can be an svg where offsetLeft ... are undefined

* Make check for offsetLeft short

* remove second collectDOMNodeVariables
2022-05-06 17:11:13 +01:00
lin onetwo
9b9e443c73
Fix lazy all template with user defined macro cause error (#6644)
* Fix lazy all template with user defined macro cause error

Fixes https://github.com/Jermolene/TiddlyWiki5/issues/6637

* fix: exclude the SJCL library when saving

@Jermolene said:

The construction -[type[application/javascript]library[yes]] is used in the core as a rather clumsy way to exclude the SJCL library when saving. The same construction is in the usual $:/core/save/all filter too.

It's possible that we should review unintended side effects of that behaviour, but here we should leave it alone.
2022-05-06 17:09:33 +01:00
jeremy@jermolene.com
f3bf5b6e85 Add support for $:/tags/Macro/View/Body macros 2022-05-05 08:30:05 +01:00
Simon Huber
5d55850c73
Update some palettes in the light of colorscheme: dark (#6661)
* Update CupertinoDark.tid

* Update GruvBoxDark.tid

* Update Nord.tid
2022-04-27 22:22:54 +01:00
jeremy@jermolene.com
0bffae2108 Add utility method for getting ordered attributes 2022-04-26 14:02:31 +01:00
Simon Huber
1410488a23
Fix my error in framed.js (#6658)
* Fix my error in framed.js

* ouch
2022-04-25 08:45:42 +01:00
Simon Huber
e2ef5c933b
Update CupertinoDark.tid (#6655) 2022-04-24 21:46:33 +01:00
Simon Huber
3cf078faeb
Write the right "color-scheme" meta tag to the iframe of the framed text-editor (#6656)
* Write the right "color-scheme" meta tag to the iframe of the framed text-editor

* Update framed.js
2022-04-24 21:45:56 +01:00
Joshua Fontany
42bf203758
Fix 6649 (#6650)
* use filesystem utils

* use filesystem utils

* don't touch syncer

* fix messaging
2022-04-19 08:18:44 +01:00
Robin Munn
8dec674121
Allow checkboxes to be indeterminate (#6593)
* Documentation for indeterminate checkboxes

* Unit tests for indeterminate checkboxes

* Implement indeterminate checkboxes

* Simplify indeterminate checkbox example

* Slightly simplify refresh logic for indeterminate

That five-line if statement can be turned into a simple assignment.

* Use "yes" and "no" for checkbox indeterminate attr

This makes the "indeterminate" attribute of the checkbox widget work the
same way as other boolean attributes of other widgets.

* Fix bug with invertTag attribute

One place in the checkbox widget code was checking invertTag for
Javascript truthiness rather than the value "yes", which could have
produced incorrect results if anyone wrote invertTag="no". Fixed.
2022-04-18 20:50:03 +01:00
Jeremy Ruston
fd0b985ac5
action-setfield shouldn't write to the current tiddler if the $tiddler attribute is present but has evaluated to a missing attribute
Fixes #5916
2022-04-16 18:02:27 +01:00
Cameron Fischer
eb0b2a8d8e
Trim Saga: Advanced Search and actions (#6604)
* Trim Saga: Advanced Search and actions

* Split up AdvancedSearch macros to be readable
2022-04-16 17:40:27 +01:00
jeremy@jermolene.com
7d6923f3d6 Revert "Give plugin authors the chance to extend a palette (#6624)"
This reverts commit b3b3020d99.
2022-04-16 17:37:08 +01:00
Cameron Fischer
05375e093c
Trim Saga: I think this is the last batch (#6611) 2022-04-16 17:19:05 +01:00
lin onetwo
cc25e1f5b4
fix: formatDateString with [UTC]xxx didn't use passed date (#6615)
* fix: formatDateString with [UTC]xxx didn't use passed date

* test: for formatDateString UTC

* fix: not possible to test internal date without hijack

Expected '20220410073037515' to be '20220410073037516'.

* fix: hour
2022-04-16 17:10:57 +01:00