Skip to content
This repository has been archived by the owner on May 6, 2019. It is now read-only.

Use Handlebars for client side rendering #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jamesmacfie
Copy link
Collaborator

Ok, this PR looks massive because the js files have had their APIs changed and whitespace is freaking out.

Description

There's no need for us to be doing server side rendering when the modal to choose from different sources is just going to mess with that anyway. Why not use the code that rerenders the client on startup because we have all the data available as well?

Changes

I'm simply using Handlebars and Handlebar templates/helpers here as the renderer. I felt there was the option of bringing in some sort of framework but it was overkill. To do this I've removed the relevant erb files and added in new ones that only contain the appropriate templates.

The API of the other script files hava changed, just to make their process repeatable (and testable if I had tests here).

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
* 'master' of https://github.com/Aupajo/calendar-bento:
  Add 30 groups
  Upgrade to 1.1.0.beta3, add caching support

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
I did look at bringing in some sort of framework to help deal with this but it seemed a bit overkill. Quite overkill, really.
The client side rendering is now working within almanack instead of just the test.html file.

I've added a couple more `era` files to take care of this - one for the sources modal and one for the handlebar templates.
@jamesmacfie
Copy link
Collaborator Author

https://github.com/Aupajo/calendar-bento/pull/19/files?w=1 to view files without whitespace messing everything up

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant