-
Notifications
You must be signed in to change notification settings - Fork 177
Wiki Chrome Extension planning #443
Comments
Cool! A few additional notes as I re-familiarize myself with the changes:
I've tried to remove as much of the high level cruft from manifest.json and client/chrome/ but there's undoubtedly still some confusing bit rot in lib/ T-minus 1.5 hours till Hangout. See you there :) |
Yesterdays discussion was fruitful. There were a few digressions into the larger context of fedwiki's future, as well as a few practical considerations having to do with this specific issue/feature/evolution. Documented here are a few big ideas in question/possible answer format. If a user has write-access to several wiki's, each within the local context, how does the client code decide which to push edits/forks to? Currently, one only has two choices: the origin server (if logged in) or localStorage. One must manually open a new tab for any wiki in order to make edits to a new origin. A common pattern is to host a wiki on localhost to edit and refine pages until they are "ready for the world." Similarly, one may log out of their own server to edit from local storage and then log in and fork. A wiki extension has the potential to unify/replace these patterns by functioning similar to a localhost server, while potentially being able to establish credentials with several public-facing wikis simultaneously. We discussed the notion that a sensible default action might be to always save data to whatever location is "closest to the screen" (localStorage/extension/app) and pair this semantic with a more explicit push/publish button which would ask which of your write-enabled wikis (if more than one) you would like to publish to. This has the twofold advantage of being able to preserve the localhost privacy of ideas in progress as well as support multiple publish points with a minimum of confusion. Is there a way to simplify the sometimes circuitous paths one must take to link wiki's together, Or to switch between viewing a remote wiki and editing one's own? Currently, if I email someone a link to my wiki, and they begin reading from my origin, notice that they'd like to fork my pages to theirs or make a new page based on some spontaneous inspiration, they must open a new tab, log in to their wiki, drag links/urls. One potential benefit of an extension/app is to unify the browsing/editing experience across multiple origins. That is, the extension becomes the default handler for all wikis, local or remote, and handles it all within a single tab. These and other discussions of usability, as well as the code complexity referenced in the previous comment, suggest a more in-depth exploration of "wiki as an installed app" semantics. Note that we say here exploration so as to remind the reader that the federated wiki they know and love will continue to be able to function as a traditional webapp as this exploration is made. Ideally, the two use patterns would co-exist (a good analogy might be that of an installed email client paired with webmail, configured such that you can use whichever you have access to at a given moment, and many users may prefer to use only the webmail client, with the extension/app being more oriented towards power users). I will likely spend a little time here and there exploring some more of the chrome/firefox extension/app ecology over this week, and hope to have another session next Sunday. |
For those interested, the new pass at the chrome extension is located in my 'chrome' branch of wiki-client: https://github.com/rynomad/wiki-client/tree/chrome In a nutshell:
|
Thanks Ryan. Is there an install recipe I didn't find? |
ah yes! Though the reason you didn't find it is because I forgot to include it...
It's worth mentioning that there's no publish ability as of yet, and other things you would expect from a local server are lacking (sitemaps, favicons). Definitely a minimum viable build, not good for much more than storing pages for offline reading/private journaling at the moment, but I'm liking the app-centered approach a lot. Much simpler. |
Ryan's repurposing of our client code as a plugin drives home the lessons learned from the node community: write and publish small modules that do not presume to know how they will be applied. Ryan's work has been harder than it might have been had the client side application been developed from day one with this radical modularity as its primary organizing principle. Instead, his willingness to forge ahead informs our ongoing modularization. Thank you Ryan. |
I think this opens the door to use of alternative local stores, including the wildly interesting and capable PouchDB, which in turn opens the way to CouchDB sync. |
I haven't looked much into PouchDB yet, but I do have some experience with levelUP on-top of indexedDB, by way of level-js. It works quite well. between the ability to store large amounts of data and webRTCs data channels for peer to peer browser connections, I'm hopeful that the packaged app environment can be nearly as feature complete as a public facing server. Chrome even allows apps to run a background page, akin to having a wiki tab always open. If we put page storage and serving in that background page, it could be accessible to the federation as long as the browser was running. My pie in the sky idea here is that eventually the notion of running a large wiki farm can be supplemented with the action of running a wiki 'hub' that helps app users connect directly to each other. |
In regards to the wiki extension I showed briefly on the last hangout. For those not present:
The wiki-client code, with it's localStorage capabilities (and possible migration to indexedDB), is ripe encapsulation in a dedicated chrome extension. In essence, creating a wiki server that lives inside the browser. Preliminary hacking suggests a number of exciting features:
my work-in-progress is view-able on my chromeExt branch of wiki-client code. There are some small coordinated changes in wiki-node-server to support allowing the extension to 'hook-in' (just a meta tag in static.html that the extension checks for the presence of on page load). Other than that, here's a high level of the approach so far:
There's more but it's late now and typing is getting really slow. I'll post a few followups tomorrow and remove some bit rot from earlier attempts so as not to be confusing.
I'm planning to spend Sunday afternoon hacking on this if anyone is available to G-hanghout and collaborate. I was thinking 12pm Colorado time until I run out of steam. Additionally, this might take a few sessions, so I'll post here every time I'm beginning/planning a significant coding session, and when each ends, I'll post a run-down of the work.
Cheers!
The text was updated successfully, but these errors were encountered: