how do I fork a page? #34

Closed
SvenDowideit opened this Issue Sep 28, 2011 · 13 comments

Comments

Projects
None yet
4 participants
Contributor

SvenDowideit commented Sep 28, 2011

sorry, I just havn't worked out how I can reference a topic 'elsewhere', and how to click 'fork'

this makes me sad :)

Contributor

SvenDowideit commented Sep 28, 2011

seeing http://sensors.c2.com/ 's welcome-visitors has an F, and the github version doesn't, and worse, is in an odd state where you can edit the one paragraph, but can't add a factory, tells me that R and F work somehow. can't get the youtube vids working on here atm, so I can't review them.

Owner

WardCunningham commented Sep 28, 2011

Yes, there are lots of missing pieces. You can see something work if you grab this JSON and put it in data/pages on a server running current Sinatra version: http://sensors.c2.com/welcome-visitors.json

Owner

WardCunningham commented Sep 28, 2011

Federated wiki videos are on Vimeo and YouTube. I've found them on my iPhone by searching for federated wiki in the YouTube app. Or try this: http://www.youtube.com/results?search_query=federated+wiki&aq=f&aql=f.

Owner

WardCunningham commented Sep 30, 2011

This is how I have been thinking fork would work:

  1. in putAction, check to see if we own the page
  2. if not, fork the page to someplace we own. Add the fork action for reference.
  3. perform the desired action and make everything right (ownership, favicon, ect.)

We don't have any sense of login yet so how can you know if we can own the page. For that matter, where do we fork too? The local storage adds complexity to the story but can probably be abstracted into a storage layer.

hellekin commented Oct 4, 2011

Hello, that is an exciting project!

Would that make sense to fork to localhost if it exists? I'm thinking of a mono-user case, e.g. running on a personal computer. You would have a local copy of the wiki, probably sitting in a git repository, and you could then synchronize to wherever the public version sits using git.

Owner

WardCunningham commented Oct 4, 2011

Yes. Synchronizing this wiki's flat-file data with git works just as one would expect. I do exactly this to coordinate my own development on multiple machines. Wiki running on localhost is just another file editor.

However, the default behavior of writing JSON as a single line does not play to git's strength in merging. I'm told there are work-arounds if git's merging were required in this workflow.

Contributor

SvenDowideit commented Oct 15, 2011

I'm getting hung up on a detail - how does a user of the web interface get to the point where they have something to putAction.

I've a couple of ideas, but i'm not sure of them

  1. add a [server:page-name] to links so that one can explicitly reference a page elsewhere, thus able to click and load it, and then putAction - thus requiring the resolveLink rendering to have more than one 'link' output
  2. add a serverBrowser dialog that allows users to see what pages exist in the federation, to view them in their session, and make forks from there
  3. much more magic - wherein serendipity linking across the known federation just 'happens'

the first is probably the fastest to implement, but will make life a little more complicated later (i think), the second we will need to allow collaboration conversations to occur, and the third is a tad scary scalability wise.

note that none of these suggestions require our servers to have a /remote URL - they can all be done using jsonp on the browser side. (what i'll implement next - unless someone gets there first)

Contributor

SvenDowideit commented Oct 15, 2011

I've comited a non-finished, but view-functional demo of using jsonp for viewing remote wiki pages - see my latest pull req.

and of course, it breaks the static server in this form, as the client.coffee assumes a jsonp - i think some code in the ajax error handler might allow it to fall back..

Owner

WardCunningham commented Nov 12, 2011

9fc51f5 enables cross-origin resource sharing (CORS). I've used this to improve the quality of citation made when one drops a web url on the factory. The documentation I've found online says this can be enabled by editing .htaccess files of static sites. I haven't made this work yet. However, it seems to be a safer alternative to jsonp.

built commented Nov 19, 2011

Two questions. If there's a better place to ask, let me know.

  1. Is there some documentation for those letter buttons at the bottom of an article? I see that they are adding up and creating a history, I just don't get what they are doing, what they are for, or what they mean.
  2. In terms of the full vision of the project, when you fork or pull in content from another server in the federation, will you pull in its history also?
Owner

WardCunningham commented Nov 19, 2011

Built -- That's the Journal. The letters are from the Action Types. You might find Concepts page useful:
https://github.com/WardCunningham/Smallest-Federated-Wiki/wiki/Concepts

built commented Nov 19, 2011

Ah, ok. I'd been over that page but hadn't made the connection. Thanks!

Owner

WardCunningham commented Nov 21, 2011

36c2534 adds automatic forking of remote pages.

Now you can edit any page, including remote pages. Remote pages become your own when you edit them. You will see two new entries in the journal: the fork and the edit that caused it.

You will also see the page icon (favicon) change to be that of the local server. The remote server's icon becomes the background for the fork action.

Amazingly, all this just works when the edit is a move from one remote page to another remote page. Both pages are forked before the move happens. Cool, eh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment