Navigation code split into lib/active.coffee #191

Merged
merged 2 commits into from Apr 14, 2012

Projects

None yet

3 participants

@nrn
Collaborator
nrn commented Apr 13, 2012

active.set now sets the active page, and it accepts
an element, instead of an id. This lets us navigate
even when we have many pages of the same id open.

@nrn nrn Split navigation code into lib/active.coffee
active.set now sets the active page, and it accepts
an element, instead of an id.  This lets us navigate
even when we have many pages of the same id open.
2db73e1
@interstar

Does that mean it will stop jumping back to the first open copy of a page if I try to open the page again further along my meanderings?

I rather liked that behaviour.

@nrn
Collaborator
nrn commented Apr 13, 2012

Yeah. Unfortunately we discovered that it was useful to have sets of pages up with multiples of the same page, and be able to navigate them normally.

@nrn
Collaborator
nrn commented Apr 14, 2012

Moved wiki.fetchContext to fetch.context, rearranged fetch so that the logic as to what to call buildPage with is all in the main function, and added tests.

I've been cheating some with a faked up wiki object in these tests, hoping to quit when we get the main api into it's own module.

@WardCunningham WardCunningham merged commit 7b79c7a into WardCunningham:master Apr 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment