1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-02 02:03:14 +00:00
Commit Graph

11938 Commits

Author SHA1 Message Date
Mohammad Rahmani
e62f86a4c7
Update Procedure Definitions.tid (#7463)
Change macro to procedure!
2023-05-18 18:35:45 +01:00
jeremy@jermolene.com
8e132948b6 Fix crash when transcluding a lazily loaded tiddler as an attribute value
See bug report at https://talk.tiddlywiki.org/t/text-and-skinny-tiddler-and-echarts-oh-my/7044
2023-05-18 18:18:56 +01:00
jeremy@jermolene.com
6a12b15fac Remove #6699 from release note 2023-05-18 17:29:57 +01:00
jeremy@jermolene.com
990909c310 Revert "Feat: destroy() method for widgets to do custom cleanup (#6699)"
This reverts commit 474b73bdbe.
2023-05-18 17:27:05 +01:00
jeremy@jermolene.com
8ad08b0cd4 Fix diff-text widget crash with empty/missing attributes
Fixes #7462
2023-05-18 12:47:40 +01:00
Jeremy Ruston
a4da53ef6c Make newline after parameters pragma be optional
Fixes #7456
2023-05-16 09:41:58 +01:00
twMat
2e377b1f48
Simplify link widget in sidebar "open" tab (#7454)
simplified linkwidget use
2023-05-15 11:04:28 +01:00
jeremy@jermolene.com
a14f038780 Merge branch 'master' into geospatial-plugin 2023-05-14 21:49:00 +01:00
Jeremy Ruston
70ee30fdf3
Add fillignore attribute to transclude widget to fix visible transclusion (#7451)
* slotignore attribute for transclude widget to fix visible transclusion

Fixes #7449

* Remove unneeded depth attribute

No longer needed

* Replace "slotignore" by "fillignore"
2023-05-14 21:25:35 +01:00
jeremy@jermolene.com
d5a7425458 Merge branch 'tiddlywiki-com' 2023-05-14 16:26:02 +01:00
Jeremy Ruston
c10eeeae93 Remove docs references to obsolete widgets 2023-05-13 11:54:42 +01:00
Robin Munn
fb10b1ee91
Checkbox widget should not affect date fields (#7448)
* Checkbox widget should not affect date fields

If a date field like `created` or `modified` is passed as the listField
attribute of the checkbox widget, it will be left unchanged and actions
on the checkbox widget will *not* fire.

Includes unit tests to ensure that the "created" and "modified" fields
will not be touched by checkboxes and will continue to be Date objects.

* Replace const with var in checkbox tests
2023-05-11 18:28:44 +01:00
Jeremy Ruston
576d476a21 Merge branch 'master' of https://Jermolene@github.com/Jermolene/TiddlyWiki5.git 2023-05-11 16:26:52 +01:00
Jeremy Ruston
8aa0db59a3 Transclude widget should use fallback content if variable is missing or blank
Fixes #7424
2023-05-11 16:26:18 +01:00
btheado
9d6784f262
Add $slot widget examples and document the $depth parameter (#7446)
* Added $slot widget examples and documented the $depth parameter

* Fixed quotes and added named parameter
2023-05-11 15:09:16 +01:00
Mario Pietsch
61e2ad4286
Update thisTiddler Variable.tid (#7447)
Changing the caption of thisTiddler.tid to `caption: thisTiddler`
2023-05-11 14:20:53 +01:00
Mateusz Wilczek
db6b4f17e8
Improve translink macro, fixes 4877 (#7425)
* Improve translink macro

Changes:
- Change styles to adapt colours to the current palette, instead of hard-coded white inside black box with grey borders.
- Simplify the design to a single div (inspired by the Community links on tiddlywiki.com), instead of two nested contrasting divs.

Comments:
- I found pre-border and pre-background to be the most consistently readable across the default palettes (better than relying on e.g. tiddler-border, tiddler-background, page-background, code-border, code-background). Cupertino Dark, Gruvbox Dark, Nord, Solar Flare, Spartan Day, Spartan Night, Spartan Day, and Twilight have same or very similar pre-border and pre-background colours, so if the macro is nested (translinking a tiddler that contains a translink), the inner frames are not distinguishable, but I think it's an acceptable edge case.
- Padding is defined separately for block and inline modes of the macro to make it appear consistent.

* Update translink macro

Change the `<h1>` styling so that it is only applied to the transcluded tiddler's title and not to any potential `<h1>` in its text.

* Update translink macro

Change the class-constructing filter so that the empty message is displayed with consistent padding in block mode.

* Update translink.tid

* Add styles for translink macro to vanilla/base.tid

Split `pre` element styling, to allow part of it be reused with `.tc-pre-border` (used by translink macro).
Add `.tc-big-bold` class under Other utility classes (used by translink macro).

* Update base.tid

Add `.tc-big-bold` class under Other utility classes (used by translink macro).

* Update translink.tid

Update `tc-pre-border` class name to match the one in vanilla/base.tid

* Update translink.tid

Simplify by always wrapping transclusion in `<p>` element (adjusts padding when inline mode or tiddler missing).

* Update translink.tid

Localise missing tiddler message (`$:/language/MissingTiddler/Hint`)

* Update vanilla/base.tid

- Modify class `tc-pre-background`, so that it can be applied to elements other than `pre`. The styling of `pre` remains unchanged, it is only split into two parts, for one part to be reused in the `tc-pre-background` class (used e.g. in translink macro).
- Add `tc-big-v-gap` and `tc-big-bold` in the *Other utility classes* section (used e.g. in translink macro).

* Update translink.tid

Improve styling to depend only on classes specified in vanilla/base.tid

* Update base.tid

Update class `tc-translink` and CSS selectors to make styling the translink macro easier

* Update translink.tid

Change the classes of elements, so that changing the style is possible by modifying the stylesheet only

* Update base.tid

Add selectors to support new inline mode in translink macro

* Update translink.tid

Change behaviour of the inline mode, now the whole macro is inline, not just the transcluded text.

* Update base.tid

Fix padding of tc-translink class to account for multiline inline content.

* Update base.tid

Remove pseudo-element parentheses from inline translink macro

* Update translink.tid

Add parentheses around inline macro
2023-05-10 21:57:15 +01:00
Mateusz Wilczek
2ab28cc2b8
Add documentation on translink macro (#7426)
* Update Using Excise.tid

Rephrase the last paragraph (note).
Fix some minor formatting.

* Update WidgetMessage_ tm-edit-text-operation.tid

Add link to `translink Macro`

* Create TranslinkMacro.tid

* Create translink.tid
2023-05-10 16:38:58 +01:00
Mohammad Rahmani
1af4324370
Update thisTiddler Variable (Examples) for using unique parameter n in .example macro (#7434)
Address issue in https://github.com/Jermolene/TiddlyWiki5/pull/7433#discussion_r1186744704
2023-05-09 18:54:01 +01:00
jeremy@jermolene.com
3da0a9431c Introduce $:/tags/Global tag
And also $:/tags/Global/View and $:/tags/Global/View/Body
2023-05-09 15:46:54 +01:00
jeremy@jermolene.com
1f35b945a5 Fix comment typo 2023-05-09 14:32:03 +01:00
jeremy@jermolene.com
5124cbc776 Correct build version in build-site.sh 2023-05-09 14:31:52 +01:00
jeremy@jermolene.com
9f1eab175d Fix transclusion refresh
Fixes #7441
2023-05-09 14:31:36 +01:00
jeremy@jermolene.com
ec2ec00cf4 Fix breaking tests 2023-05-09 10:39:57 +01:00
jeremy@jermolene.com
7f4f48d4ba Introduce geolayer widget for specifying layers for geomap 2023-05-09 10:35:33 +01:00
Carmine T. Guida
8f4b22110c
Added a comma (#7438) 2023-05-07 22:45:34 +01:00
Carmine T. Guida
8ad35a9411
Signing the CLA (#7437) 2023-05-07 18:07:06 +01:00
Mario Pietsch
18d7d3d8c0
Improve the wording for the core-plugin in the upgrader-editioin (#6878) 2023-05-07 17:47:13 +01:00
jeremy@jermolene.com
29f4d3488b Merge branch 'master' into geospatial-plugin 2023-05-07 10:45:38 +01:00
jeremy@jermolene.com
3518e257c0 Tweak release note 2023-05-06 19:26:42 +01:00
Mohammad Rahmani
fe716dd58f
thisTiddler description and examples improved (#7433) 2023-05-06 18:57:22 +01:00
jeremy@jermolene.com
e2fe681b50 Update release note 2023-05-06 17:33:19 +01:00
Mohammad Rahmani
36ac142110
Correct the caption for Procedure Call tiddler (#7432) 2023-05-06 15:35:03 +01:00
GameDungeon
e66e791944
Correct handling of pasting tiddlers (#7215)
* First Pass Implementation

* Fix Check

* Fix Style

* Update drag-drop interop example to support copy tiddlers to clipboard

---------

Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
2023-05-06 14:02:16 +01:00
lin onetwo
474b73bdbe
Feat: destroy() method for widgets to do custom cleanup (#6699)
* feat: inform child widget to do some custom cleanup

* fix: type

* refactor: restore old removeChildDomNodes

* refactor: make destroy() a separate method

* refactor: make destroy call removeChildDomNodes

* refactor: call destroy instead of removeChildDomNodes in each core widgets

* fix: refreshSelf does not mean destroy

* refactor: use old var insteadof const

* docs: about subclass
2023-05-06 12:19:11 +01:00
Arlen22
2b95daf59b
Change evalSandboxed to use only one context for all modules (#4624)
* Run modules in one new context

* Fix polyfill running on require

* Add code to check for global assignments

* Allow globals in separate context

This lets the caller request a separate context which may be polluted.

* Jasmine needs to pollute the global

* Formatting

* Add polyfill and cleanup code

* Convert to ES5

* One bug fix

* Some formatting

* Remove console.log line!

* Cleanup

* revert css-escape-polyfill.js to hopefully remove it from the PR

* Remove JSDOC directives
2023-05-06 12:11:18 +01:00
Jeremy Ruston
2bfefe3880
Parameterise core icons (#7413)
* Parameterise all the icons

* Improve splash screen macro for rendering icons

* Add new example from @kookma
2023-05-06 12:08:46 +01:00
Jeremy Ruston
96f97f237a
Remove "direction" CSS property from framed version of editor (#7409) 2023-05-06 12:08:20 +01:00
Mario Pietsch
9cdb38d800
Linkcatcher should pass through event objects (#7401) 2023-05-06 12:07:55 +01:00
donmor
4e96a012f6
Add missing extensions for audio/mpeg (#7378)
Add missing extensions for audio/mpeg
2023-05-06 11:55:41 +01:00
yaisog
e92e125697
Add the querySelectorSafe() function and replace querySelector() usage (#7380)
* Initial commit

* Correct the over-estimation of my abilities

* Add fallback and move code to dom.js

* Use new function for tm-focus-selector

* Replace other uses of querySelector*

* Undo rash replacements of querySelector()
2023-05-06 11:54:54 +01:00
yaisog
6820d45bf0
Improve the StoryTiddlerTemplate fallback (#7332)
* Initial commit

* Update StoryTiddlerTemplate.tid

* Extend cascades hint to help in case of problems

* Remove note about debugging from docs

I think that this brief note is more confusing than anything else

---------

Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
2023-05-06 11:53:58 +01:00
yaisog
d6533b9ee1
Add the timestamp suffix to the format operator (#7292)
* Create timestamp.js

Taken verbatim from @ericshulman.

* Add description of the timestamp suffix

* Add an example for timestamp use

I also snuck it a couple of cosmetic corrections, because I was too lazy to open a new PR. 😢

* Correct example 4 to use the right date formats

* Correct description of the default date format

* Add a test for the timestamp suffix

* Add more format:timestamp tests

* Drop invalid input

* Update version tag in docs

---------

Co-authored-by: jeremy@jermolene.com <jeremy@jermolene.com>
2023-05-06 11:44:22 +01:00
btheado
3ee5f10362
BrowserStoragePlugin: Do not save shadow tiddlers to local storage (#7365)
If a tiddler is only a shadow tiddler, then do not save it
to local storage. Otherwise when installing a plugin, each
individual tiddler will be expanded and saved individually.
In order to uninstall such a plugin, the plugin tiddler and
each tiddler needs to be deleted.

This can be prevented by including a run like `-[is[shadow]!is[tiddler]]`
in the save filter, but that has the side effect of preventing
overwritten shadow tiddlers from being deleted from local storage.
2023-05-06 11:41:22 +01:00
Jeremy Ruston
a6ced74a13
Introduce "thisTiddler" variable (#7182)
* Initial Commit

* Change of mind: Do not blank thisTiddler within macros

* Revert previous implementation

* Somewhat simpler implementation

* Add docs

* Add docs version tag
2023-05-06 11:40:22 +01:00
Mario Pietsch
b61aef27d7
External-js file naming adjusted. import docs form tw5.com. make extrnal-js more visible (#7361)
* external-js file naming adjusted. import docs form tw5.com. make external-js more visible

* add comment about doc usage in server-external-js edition

* add changes suggested by cdruan

* change modifed date to start vercel rebuild process
2023-05-06 11:37:05 +01:00
jeremy@jermolene.com
a1b706a945 Remove dynannotate plugin fro tw5.com edition
It was added temporarily to make #7260 easier to work on
2023-05-06 11:36:36 +01:00
yaisog
2340d48844
Add additional searchModes to Dynannotate (#7260)
* Add searchModes: literal, some and words

* Add additional search modes

Description of selection tracker config tiddlers was also changed.

* Update simple.tid

* Improve View Template examples

Transcludes a sample tiddler for demonstration instead of the dynannotate view template code.
Adds an example for usage with $genesis to add state tiddler controlled per-tiddler highlights.

* Make search highlights not case sensitive

* Remove created and modified fields

* Add another example text (Searching in Tiddlywiki)

* Add dynannotate for vercel deployment

This should probably not be merged...

* Create LegacySelectionTracker.tid

* Create SelectionTracker.tid

* Revert putting the SelectionTracker config titles in code blocks

* Replace inline styles with CSS class

* Add class for view template examples

Class name is tc-dynannotate-example-frame.

* Remove some <br> line breaks.

* Remove first example transclusion and fix some tab spacing

* Add class to override control panel table layout

* Add class to settings table

* More tab shenanigans

Great Scott!

* Add explanatory comment to example macro

* Change defaults to match widget behavior

* Make previous macro comment more concise

* Change example to transclude CP tiddler

$:/core/ui/ControlPanel/TiddlerFields

* Delete unnecessary example tiddler
2023-05-06 11:30:21 +01:00
Michelle Saad
4e641f4fc0
Add 'filepath' source attribute to tiddlywiki.files (#7253)
* Add 'filepath' source attribute to tiddlywiki.files

Adds a new source attribute to facilitate importing subdirectories with
the `searchSubdirectories` attribute.

The `filepath` atttribute is like `filename` except it includes the full
pathname relative to the directory path. Consequently it only works with
`directories` sections (not `tiddlers`).

* Add `subdirectories` source attribute to tiddlywiki.files

Adds another new source attribute to facilitate importing subdirectories
with the `searchSubdirectories` attribute.

The `subdirectories` source attribute is only usable with `directories`
sections (not `tiddlers`). It resolves to an array containing all the
directories in the file's path relative to the directory path. Eg, if
the directory path is `files`, `{ source: 'subdirectories' }` for a file
in  `files/images/photos` would resolve to `['images', 'photos'].

This commit also adds an example to the "tiddlywiki.files Files"
documentation tiddler that demonstrates using the `filepath` and
`subdirectories` source attributes to import and auto-tag image files
as external-image tiddlers.
2023-05-06 11:26:40 +01:00
Mohammad Rahmani
17f18daa89
Docs: Fix typo in “Procedure Calls.tid” (#7429)
fix typo in procedure call
2023-05-05 18:47:03 +01:00