Demo: updating docs and creating a PR from within TiddlyWiki

A big thank you to @Mark_S for rewriting the “Notes” tiddler in the demo.

OK, if I got everything right, the demo is now generated from the tiddlywiki-com branch and as such should mirror the tiddlywiki.com site. It will not include pre-release only content.

1 Like

I’ve pushed a few small improvements including a select dropdown to choose whether to create a test PR against a test repo, or a real PR against the official TW repo.

I hope this is still live, I’ve created my first docs tweak (to https://tiddlywiki.com/#Using%20Stamp)

Very clever - can see a preview of my changes at TiddlyWiki — a non-linear personal web notebook

How does tm-makepr work? Where can I read the source code?

Seems you have made a Github SyncAdaptor? Different from the Github Saver plugin, which save whole HTML to github, you can sync single diffed tiddler to the github.

See: 7 Steps to Improve the TiddlyWiki Documentation

The pr-maker is described at step 4 & 5 … Every step also has a video-tutorial, how to work with it

1 Like

Hi @linonetwo. We create a git pull request for the updated tiddlers using a octokit plugin:

I see, it accepts “changes” array, so we can update a nodejs wiki from a HTML wiki

This plugin can be used in the Github saver to allow it to save changes to a nodejs wiki.

You can also use octokit to make a commit to the git repository instead of a PR, which might work better for allowing a nodejs wiki to save tiddlers to Github.

I have pushed some updates to resolve a broken CDN and have added an introductory tour using a tweaked version of Jeremy’s work in progress tour plugin: TiddlyWiki — a non-linear personal web notebook

Amongst other things the submission form has been simplified:

  • no longer offers a choice of a test repo and the official one
  • no longer prompts for a path for new tiddlers. In the interest of facilitating contributions this should instead be addressed using file path filters.

Missing:

  • prompt to download a backup of submitted changes in case the PR needs further changes
3 Likes

Hi Saq,
I like it. — But, If there is an access token, I’d like to get a big green button, that let’s me directly jump in. Like so

1 Like

The “x” at the bottom of the intro lets you exit the tour at any time. Having a more explicit exit button on the first step might be helpful though. I’ll give it a go next time I work on this.

Also, contributions are very welcome: GitHub - saqimtiaz/tw5-docs-pr-maker: Create Docs PRs from TiddlyWiki

1 Like

@jeremyruston would it be acceptable for a documentation PR from a new contributor to include the CLA signing in the same PR?

I am considering building in a step in the tour for the PR maker, which checks whether the user’s username is already in the CLA and if not, prompts to read the CLA and confirm that they want to sign it. The modification to the CLA would then be part of the same PR.

I’ll have a look. — There is a second issue with the “submission” form. It says “Provide a GitHub auth token”. IMO there should be a button as in the tutorial that directly jumps to the tocken page.

Just a convenience improvement.

I did just create a PR and I love the confetti, but they only cover a very small portion of the screen. I’d like to have it all over the screen and may be more.
Love it! :wink:

IMO that would be more like it.

<$button>
<$action-sendmessage $message="tm-confetti-launch"/>
<$action-sendmessage $message="tm-confetti-launch" originY=0.6 spread=100 delay=300/>
<$action-sendmessage $message="tm-confetti-launch" originY=0.55 shapes=circle spread=130 delay=400/>
<$action-sendmessage $message="tm-confetti-launch" originY=0.55 shapes=star spread=180 delay=500/>
Launch three staggered rounds of confetti
</$button>

Yes we do accept PRs like that. I have a slight preference for the signature being a separate PR so that it can be merged swiftly even if the other parts of the PR need further discussion, but I don’t think that that matters in this situation.

I have pushed an update that prompts the user for their Github username, checks if they have previously signed the CLA and if not, prompts the user to sign it. The CLA is signed in a separate PR.

https://saqimtiaz.github.io/tw5-docs-pr-maker/

This step as well as the one for the authentication token are skipped if the relevant conditions are met (CLA already signed and authentication token already provided respectively).

There probably needs to be handling for expired tokens that need to be replaced. I may opt for a control panel tab that shows all relevant settings.

Hmm realising also that the CLA step needs to come after the Auth token step.

1 Like

It has been pleasing to see two different users make documentation contributions using the PR maker recently, thank you.

If you ran into any problems or issues, please do let us know.

I intend to add a step that prompts the user as to whether to save a backup of the changes they are submitting. This is useful if further changes are requested to the change that has been submitted.

2 Likes

@saqimtiaz I made two PRs since yesterday using the PR Maker. I didn’t have any problems. It is an enormous improvement to the workflow of documenting, thank you!

I have some ideas for small improvements.

Backup
Do you intend the backup prompt to export a json with the modified/submitted tiddlers? I think it is a great idea. Right now I downloaded the whole wiki as a backup, but it is obviously a lot of overhead. Maybe the backup should be also available separately (a second floating button?), so that the user can backup the changes during work, before they are ready for submission.

Skip button for the introduction
I agree with @pmario, I would like there to be a simple way to immediately enter the username/token and skip the introduction. The X button closes the intro, but leaves no easy way to enter username/token (or have I missed it?). Btw the intro itself is great for new users, simple and straightforward!

Custom favicon and site title
I think a favicon and site title differing from the tiddlywiki.com would help the PR Maker stand out in case one has both sites opened. I find it useful to have tiddlywiki.com opened aside as a quick reference of how the docs looked before my changes, or to quickly test something without messing with the actual contribution.

1 Like

Yes that is the intention, along with the PR title and description. There is a button currently in the submission form that lets you download the modified tiddlers via Advanced Search, but it can be made more convenient.

If you don’t have the auth token filled in, the submission form displays a field asking for it. The username is only needed to check if the CLA has been signed. See the screenshot at the end of this post.

That makes sense, thank you. I would welcome contributions for an appropriate favicon. We just have to be careful because every tiddler we customize, can no longer be a part of a submission but the site title and favicon make sense.

I am considering either a settings button that opens a settings panel that lets users easily change auth token, username etc; or a button to switch to an advanced more that displays more settings.

1 Like