Skip to content

Commit

Permalink
Merge branch 'master' into improve-accessibility-for-viewtemplate-too…
Browse files Browse the repository at this point in the history
…lbar
  • Loading branch information
pmario committed Sep 9, 2024
2 parents 69031ea + d827c57 commit 9cd3b51
Show file tree
Hide file tree
Showing 604 changed files with 4,800 additions and 2,875 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ rules:
prefer-spread: 'off'
prefer-template: 'off'
quote-props: 'off'
quotes: 'off'
quotes:
- error
- double
- avoidEscape: true
radix: 'off'
require-atomic-updates: error
require-await: error
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body:
attributes:
label: To Reproduce
description: "Steps to reproduce the behavior:"
value: |
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -41,7 +41,7 @@ body:
attributes:
label: TiddlyWiki Configuration
description: please complete the following information
value: |
placeholder: |
- Version [e.g. v5.1.24]
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
- Plugins installed [e.g. Freelinks, TiddlyMap]
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Discuss feature request
url: https://github.com/Jermolene/TiddlyWiki5/discussions
url: https://github.com/TiddlyWiki/TiddlyWiki5/discussions
about: Open new discussion about new feature
- name: Talk.Tiddlywiki Forum
url: https://talk.tiddlywiki.org
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/cla-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check CLA Signature
on:
pull_request_target:
types:
- opened
- reopened
paths-ignore:
- 'licenses/cla-individual.md'
jobs:
check_cla:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: ${{ (github.event.pull_request.user.login != github.repository_owner) }}
steps:
- run: |
if ! curl -s https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/tiddlywiki-com/licenses/cla-individual.md | grep -o "@$USER,"; then
echo "CLA not signed"
gh pr comment "$NUMBER" -b "@$USER It appears that this is your first contribution to the project, welcome.
With apologies for the bureaucracy, please could you prepare a separate PR to the 'tiddlywiki-com' branch with your signature for the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))."
else
echo "CLA already signed"
gh pr comment "$NUMBER" -b "Confirmed: **$USER** has already signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
USER: ${{ github.actor }}
70 changes: 70 additions & 0 deletions .github/workflows/cla-signed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CLA Signed

on:
pull_request_target:
types:
- opened
- closed
paths:
- 'licenses/cla-individual.md'

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
AUTHOR: ${{ github.event.pull_request.user.login }}

jobs:
# check if PRs updating the CLA are targetting the tiddlywiki-com branch
check-signature-branch:
if: (github.event.pull_request.merged != true) && (github.event.pull_request.user.login != github.repository_owner)
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- run: |
if ! $BRANCH == "tiddlywiki-com"; then
echo "This CLA signature targets the wrong branch"
gh pr comment "$NUMBER" -b "@$AUTHOR Signatures to the CLA must target the 'tiddlywiki-com' branch."
fi
env:
BRANCH: ${{ github.event.pull_request.base.ref }}
# leave a comment on each open PR by a given author when their signature is added to the CLA
cla-signed:
if: (github.event.pull_request.merged == true) && (github.event.pull_request.user.login != github.repository_owner)
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: List open PRs by user
id: list-prs
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const owner = context.repo.owner,
repo = context.repo.repo,
author = context.payload.pull_request.user.login;
const { data: pullRequests } = await github.rest.pulls.list({
owner: owner,
repo: repo,
state: 'open',
sort: 'created',
direction: 'desc',
per_page: 100
});
const userPullRequests = pullRequests.filter(pr => pr.user.login === author),
prNumbers = userPullRequests.map(pr => pr.number).join(',');
console.log(`Open pull requests by ${author}:${prNumbers}`);
return prNumbers;
- name: Comment open PRs by the same author
run: |
prs=($(echo ${{ steps.list-prs.outputs.result }} | tr "," "\n"))
for number in "${prs[@]}"
do
gh pr comment "$number" -b "**$AUTHOR** has signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
done
2 changes: 1 addition & 1 deletion bin/build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Default to the current version number for building the plugin library

if [ -z "$TW5_BUILD_VERSION" ]; then
TW5_BUILD_VERSION=v5.3.5
TW5_BUILD_VERSION=v5.3.6
fi

echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
Expand Down
2 changes: 1 addition & 1 deletion bin/ci-pre-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ npm --force install tiddlywiki || exit 1

# Pull existing GitHub pages content

git clone --depth=1 --branch=master "https://github.com/Jermolene/jermolene.github.io.git" output
git clone --depth=1 --branch=master "https://github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" output
2 changes: 1 addition & 1 deletion bin/ci-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add -A .
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
git remote add deploy "https://$GH_TOKEN@github.com/Jermolene/jermolene.github.io.git" &>/dev/null
git remote add deploy "https://$GH_TOKEN@github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" &>/dev/null
git push deploy master &>/dev/null
cd ..
8 changes: 8 additions & 0 deletions bin/readme-bld.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ node $TW5_BUILD_TIDDLYWIKI \
--output . \
--build readmes \
|| exit 1

# tw.org readmes
node $TW5_BUILD_TIDDLYWIKI \
editions/tw.org \
--verbose \
--output . \
--build readmes \
|| exit 1
4 changes: 2 additions & 2 deletions boot/boot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion boot/bootprefix.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>This community exists because TiddlyWiki is more useful when people share and work together.</p><p>This community is a beautiful but fragile thing: a collection of diverse people from all over the planet, united in their interest in the project, and their commitment to helping one another achieve and learn more.</p><p>We try to make the community as broad and welcoming as possible by remembering some basic principles of culture and behaviour.</p><p>These principles guide technical and non-technical decisions, and help contributors and leaders support our project and community.</p><ul><li>We are optimistic and hopeful</li><li>We aim to foster a learning environment that is collaborative and safe for everyone</li><li>We recognise that the motivation for sharing and helping is usually for appreciation, and not financial gain, and so we take care to acknowledge and <strong>thank the people who enrich the community by sharing what they have created</strong></li><li>While we are united in our interest in TiddlyWiki, we differ in every other conceivable way. We choose to focus on what unites us, and <strong>avoid unnecessarily mixing contentious topics like religion and politics</strong></li><li>We treat each other with respect, and start with the assumption that <strong>others are acting in good faith</strong></li><li>We avoid discriminatory language</li><li>We try to use our strength as a community to help others</li><li>We avoid responding when angry or upset because we try to de-escalate conflict</li><li>We make sure we critique ideas, not people</li><li>When we disagree with others we do so graciously, and treat others with dignity and respoect</li><li>We do not tolerate intolerance towards others</li><li>We seek first to understand others, and then to be understood</li><li>We have fun</li></ul><p>Our discussions are in English. It is not the first language of many people in the community, nor do we all share the same cultural background and reference points. So we take care to use language that is clear and unambigous, and avoid cultural references or jokes that will not be widely understood.</p><p>It is not acceptable to make jokes or other comments that discriminate by race, gender, sexuality, or other protected characteristic.</p><p>As an inclusive community, we are committed to making sure that TiddlyWiki is an accessible tool that understands the needs of people with disabilities.</p>
2 changes: 1 addition & 1 deletion contributing.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions core/images/discord.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: $:/core/images/discord
tags: $:/tags/Image

\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-discord tc-image-button" viewBox="0 -28.5 256 256"><path d="M216.856 16.597A208.502 208.502 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046-19.692-2.961-39.203-2.961-58.533 0-1.832-4.4-4.55-9.933-6.846-14.046a207.809 207.809 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161.094 161.094 0 0 0 79.735 175.3a136.413 136.413 0 0 1-21.846-10.632 108.636 108.636 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a131.66 131.66 0 0 0 5.355 4.237 136.07 136.07 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848 21.142-6.58 42.646-16.637 64.815-33.213 5.316-56.288-9.08-105.09-38.056-148.36ZM85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2c12.867 0 23.236 11.804 23.015 26.2.02 14.375-10.148 26.18-23.015 26.18Zm85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2 0 14.375-10.148 26.18-23.015 26.18Z"/></svg>
5 changes: 5 additions & 0 deletions core/images/input-button.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: $:/core/images/input-button
tags: $:/tags/Image

\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-input-button tc-image-button" viewBox="0 0 22 22"><path d="M1.375 22h19.249c.365 0 .716-.145.973-.404v.001c.258-.257.404-.607.403-.972v-11a1.376 1.376 0 0 0-2.75 0v9.625H2.75V9.625a1.376 1.376 0 0 0-2.75 0v11C0 21.384.617 22 1.375 22Z"/><path d="m9.732 11.904-1.541-1.541a1.375 1.375 0 1 0-1.944 1.944l3.887 3.888c.258.258.608.402.973.402h-.001c.353 0 .705-.134.974-.402l3.888-3.889a1.376 1.376 0 0 0 .001-1.944 1.377 1.377 0 0 0-1.946 0l-1.541 1.542V1.376a1.375 1.375 0 1 0-2.75 0v10.528Z"/></svg>
2 changes: 2 additions & 0 deletions core/language/en-GB/Buttons.multids
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ NewMarkdown/Caption: new Markdown tiddler
NewMarkdown/Hint: Create a new Markdown tiddler
NewTiddler/Caption: new tiddler
NewTiddler/Hint: Create a new tiddler
OpenControlPanel/Hint: Open control panel
OpenWindow/Caption: open in new window
OpenWindow/Hint: Open tiddler in new window
Palette/Caption: palette
Expand Down Expand Up @@ -132,6 +133,7 @@ Excise/Caption/Replace/Link: link
Excise/Caption/Replace/Transclusion: transclusion
Excise/Caption/Tag: Tag new tiddler with the title of this tiddler
Excise/Caption/TiddlerExists: Warning: tiddler already exists
Excise/DefaultTitle: New Excision
Excise/Hint: Excise the selected text into a new tiddler
Heading1/Caption: heading 1
Heading1/Hint: Apply heading level 1 formatting to lines containing selection
Expand Down
10 changes: 10 additions & 0 deletions core/language/en-GB/ControlPanel.multids
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links
Settings/MissingLinks/Caption: Wiki Links
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
Settings/MissingLinks/Description: Enable links to missing tiddlers
SocialCard/Caption: Social Media Card
SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'')
SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this TiddlyWiki when hosted online
SocialCard/PreviewUrl/Prompt: Full URL to preview image for this TiddlyWiki
SocialCard/PreviewUrl/Preview: Preview image:
SocialCard/Url/Prompt: Full URL of this TiddlyWiki
StoryTiddler/Caption: Story Tiddler
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
StoryView/Caption: Story View
Expand Down Expand Up @@ -235,3 +241,7 @@ ViewTemplateBody/Caption: View Template Body
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
ViewTemplateTitle/Caption: View Template Title
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
ViewTemplateSubtitle/Caption: View Template Subtitle
ViewTemplateSubtitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the subtitle of a tiddler.
ViewTemplateTags/Caption: View Template Tags
ViewTemplateTags/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the tags area of a tiddler.
1 change: 1 addition & 0 deletions core/language/en-GB/EditTemplate.multids
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Tags/ClearInput/Caption: clear input
Tags/ClearInput/Hint: Clear tag input
Tags/Dropdown/Caption: tag list
Tags/Dropdown/Hint: Show tag list
Tags/EmptyMessage: (no search result)
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
Title/Exists/Prompt: Target tiddler already exists
Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers
Expand Down
2 changes: 2 additions & 0 deletions core/language/en-GB/Search.multids
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Filter/Hint: Search via a [[filter expression|https://tiddlywiki.com/static/Filt
Filter/Matches: //<small><<resultCount>> matches</small>//
Matches: //<small><<resultCount>> matches</small>//
Matches/All: All matches:
Matches/NoMatch: //No match//
Matches/NoResult: //No search result//
Matches/Title: Title matches:
Search: Search
Search/TooShort: Search text too short
Expand Down
7 changes: 7 additions & 0 deletions core/language/en-GB/Snippets/FunctionDefinition.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: $:/language/Snippets/FunctionDefinition
tags: $:/tags/TextEditor/Snippet
caption: Function definition

\function f.name(param1,param2:"default value") [<param1>!is[blank]else<param2>]

<<f.name>>
7 changes: 7 additions & 0 deletions core/language/en-GB/Snippets/ProcedureDefinition.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: $:/language/Snippets/ProcedureDefinition
tags: $:/tags/TextEditor/Snippet
caption: Procedure definition

\procedure procName(param1:"default value",param2)
Your text comes here.
\end
5 changes: 0 additions & 5 deletions core/language/en-GB/Types/image_x-icon.tid

This file was deleted.

5 changes: 5 additions & 0 deletions core/language/en-GB/Types/text_vnd.tiddlywiki_multiple.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple
description: Compound tiddler
name: text/vnd.tiddlywiki-multiple
group: Developer
group-sort: 2
25 changes: 15 additions & 10 deletions core/modules/commands/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,22 @@ Render individual tiddlers and save the results to the specified files
variableList = variableList.slice(2);
}
$tw.utils.each(tiddlers,function(title) {
var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
if(self.commander.verbose) {
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
var filenameResults = wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]));
if(filenameResults.length > 0) {
var filepath = path.resolve(self.commander.outputPath,filenameResults[0]);
if(self.commander.verbose) {
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
}
var parser = wiki.parseTiddler(template || title),
widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
container = $tw.fakeDocument.createElement("div");
widgetNode.render(container,null);
var text = type === "text/html" ? container.innerHTML : container.textContent;
$tw.utils.createFileDirectories(filepath);
fs.writeFileSync(filepath,text,"utf8");
} else {
console.log("Not rendering \"" + title + "\" because the filename filter returned an empty result");
}
var parser = wiki.parseTiddler(template || title),
widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
container = $tw.fakeDocument.createElement("div");
widgetNode.render(container,null);
var text = type === "text/html" ? container.innerHTML : container.textContent;
$tw.utils.createFileDirectories(filepath);
fs.writeFileSync(filepath,text,"utf8");
});
return null;
};
Expand Down
Loading

0 comments on commit 9cd3b51

Please sign in to comment.