Skip to content

Updates to Templates #11 - #14

Merged
jgclark merged 5 commits into
mainfrom
jgclark/issue11
Jun 18, 2021
Merged

jgclark merged 5 commits into
mainfrom
jgclark/issue11

Conversation

@jgclark

@jgclark jgclark commented Jun 12, 2021

Copy link
Copy Markdown
Collaborator

Structure and readability changes only, I hope.

@jgclark
jgclark requested a review from nmn June 12, 2021 15:51
@jgclark

jgclark commented Jun 12, 2021

Copy link
Copy Markdown
Collaborator Author

@dwertheimer may want to pitch in with ideas too?

Comment thread nmn.Templates/src/interpolation.js
@jgclark

jgclark commented Jun 12, 2021

Copy link
Copy Markdown
Collaborator Author

Fixing multiple definition: going back to a single file 'interpolation.js' file, though I don't think the name is very clear. I was trying to make a smaller file where it was clearer that people should add new functions, but circular defintions stopped that.

(PS I'm finding my way around the GitHub extensions in VSC quite confusing for PRs, so apologies if I goof in the process.)

jgclark added 4 commits June 12, 2021 21:51
I had hoped to make two smaller files from interpolation.js to make it easier for other authors to know where to put functions that extend the Templates.
But it wasn't working out as being simpler, so this is now mostly tweaks to names.
PS I don't find 'interpolation.js' very clear, but I'm not going to try and complicate the PR further by renaming it myself. I would suggest 'processTemplate' though.
@jgclark

jgclark commented Jun 18, 2021

Copy link
Copy Markdown
Collaborator Author

Not having this resolved was causing me increasing pain as it was blocking getting other code released. So, as I've not had any comments in 5 days, I've gone ahead and made the commits.

The main changes are:

  • moving my weather lookup code from DailyJournal to Templates plugin
  • making it more obvious where to add new functions to Templates
  • renaming 'addTemplate' function to 'applyTemplate'.
  • adding 'applyNamedTemplate' function

@jgclark
jgclark merged commit f235504 into main Jun 18, 2021
@jgclark
jgclark deleted the jgclark/issue11 branch August 29, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants