Skip to content

# WardCunningham/Smallest-Federated-Wiki

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Loading…

# create a simple Bullet List plugin so we need less html#218

Open
wants to merge 3 commits into from
+45 −4

### 4 participants

very simple plugin for now.

however, it does need the plugin discovery feature you're working on :)

several related ideas:

• it'd be nice to be able to convert from one type to another
• if the plugin's js contained the description and other data, simple plugins would be entirely self contained
• plugin dependencies and incompatibilites probably need to be considered some time in the future.
added some commits
 SvenDowideit create a simple Bullet List plugin so we need less html 734c21d SvenDowideit need to render that to html fcb9224 SvenDowideit i like the idea that plugins have docco 2cd506d

@SvenDowideit I have simple nested bullet-lists in my Wikish plugin : https://github.com/interstar/ThoughtStorms/tree/master/plugins (Also italics, bold, horizontal lines etc.)

I'd really like to get this into the official distro if possible. Or at least into the official catalogue of available plugins.

your plugin is essentially the opposite of what I'm thinking :)

a really nice thing about fed-wiki, is that paragraphs are a basic building block - so from my perspective, it'd be good to have a new paragraph for each type of information -

a bullet-list is a different type of information from a prose block.

I'm also thinking that headings are a separate element - though I realise that there is going to need to be a way to tie sections together.

There are a number of (twiki/foswiki related) reasons for my idea -

sections, and groups of sections can lend themselves to both structured (data-typed) querying and transclusion, and can push towards giving different views into the wiki - Table of Contents for eg would be a filtering to show only the header typed data, list pargraphs can have much clever-er widgets to allow manipulation and aggregation

In this way, importing from other wiki's means detecting these type transitions though.

out of interest - what wiki engines do you use? (I'm rather too heavily invested in the data-wiki/structured data area)

Do we want to encourage the use of bullet lists? I understand their appeal on the printed page, but maybe we should leave some of those conventions behind.

We've made the paragraph (story item, actually) the unit of mobility, not lines or characters. Admittedly they look a little big compared to a bullet item, but that makes them finger-sized for touch-based editing. And, of course, there is the unicode • for those who like the look.

@SvenDowideit I agree with the SFW model of putting things into separate paragraphs to make it easier to manipulate them. And also with using paragraph types to capture the logical structure. With a couple of provisos : I'm pretty sure we're going to find the existing model of one paragraph, one type becomes a bottle-neck very soon.

1) We are going to want to give multiple types to individual paragraphs. That's true whether we think of paragraph types as conferring logical meaning or styling / visualisation hints. I can think of two ways to do that : either like CSS where you just add a number of classes to the same object. Or through a more formal class-inheritance model where we can define specialist subtypes that inherit or mixin functionality from more general types.

2) The great joy of wiki was how it made marking-up a document so much easier than either raw HTML or using a GUI. While the SFW may need less visual markup (given that it has more tightly constrained layouts) we surely don't want to lose that fluency of expression. And if paragraph types are our way of marking up documents then we need an equivalently flexible and fluent way of applying types to paragraphs.

At the moment, in SFW, selecting a paragraph type is fairly clunky, ie. we do it from a single unstructured list in the factory. And it's impossible to change or modify a type after the paragraph has been created.

I don't have the right solution, but I think the original wiki intuition of using lightweight text markup is still a good one. Ie. an asterisk in the first character of a line can MAKE the paragraph become a bullet-point in a list. We can parse the paragraph at save time and turn the markup into explicit type. Similarly, have == markup create a heading, which is itself a logical type (and available for TOC creation etc.)

For the record, my initial use-case of SFW was that I wanted to port a large number of pages from UseMod and its derivatives. Hence it made sense to adopt the UseMod markup language. I'm happily evolving onwards from that, while wanting to keep that import channel open. (I'm hoping to encourage other UseMod users to make the same jump.)

well. this is interesting.

@interstar I hope we manage to avoid mixing types. thats an issue we butt up against constantly in foswiki - though I think we currently have a kind of mashup in the link rendering - who knows, maybe we'll find a way out of that too.

Ward is (imo) challenging us to cast of the wiki-fu and find new ways to achieve simplicity.

@WardCunningham I really don't like the idea of mashing rendering into content - so I'm going to try to find a way not to force hardcoded unicode bullets / html or whatever into the source :)

so - what about this slightly different tack:

if I want an ordered list to mean something like bullets, rather than sequential paragraphs of prose, I create a list type paragraph that I can drag several paragraphs into? is nesting paragraphs a good or useful idea?

@interstar we need to separate some of the issues tho:
1 want to be able to change or select paragraph types in a 'nicer' way
2 I'd like a more natrul way to start a new paragraph (i'll expand later.)

Our goal should be to have a positive influence on how people write, not just to admit every style of writing. It might be interesting to compare federated wiki to twitter, another influential system. Analogous elements:

Markup == Abbreviations (contextual, evolving)
Paragraph == Tweet (the mobile entity)
Page == Hash Tag (the named organizing structure, shared)
Site == Account (reference to authority, not shared)


Of course our goal isn't to be twitter, but to recognize that the world is happy to adopt new writing styles when there is utility to be had in doing so.

In the first Sunday Hangout, Ward added that he thinks of the Site as like a PDF - which gives us a touchstone wrt the sizing of data, topics and focus of a Site.

for example, rather than hosting all of wikipedia on one site, we'd have Waki-Wiki style (sorry, reference to thought experiment dating back to 2005's wikimania) distributed sites that focus on their local topic area / interest.

as an example, a Chemistry department might have a site that contains mostly local research and learning topics, some of which refer to shared articles like wikipedia, and might have forks of some of those topics.

As I not a programmer, I hope you all don't mind me chiming in. I am very excited to see this project underway and hope to integrate it into a social networking platform in the future.

So, from my perspective, Wikipedia is an inspiration and should be considered closely when determining what features will exist in Smallest-Federated Wiki. I love the innovations you are bringing to the wiki, in fact I think they have profound implications. That being said, I think having different types of blocks/entities besides paragraphs would only expand possibilities of expression through the wiki. I am not suggesting having too many, but think allowing bullet lists, for example, just makes use more flexible and useful. I see bullet lists in Ward's videos so maybe i am missing something here.

Also, why not integrate a standard editor that allows many types of word document type modifications within each block/entity? Also, about the editor, and this is very important from the layman's perspective, I suggest having a WYSIWYG editor. Mark-up languages are a barrier to entry for many people. It may seem simple to you all, but it is not the language most people write in. Although I think this model has worked for Wikipediai because it is a type of quality censorship, it seems that a federated wiki should be all about people to people sharing of anything with anyone.

I guess what I am suggesting is a federated MediaWiki with an integrated WYSIWYG editor like http://ckeditor.com/.

Now that I am thinking about it, if there was a federated protocol written for MediaWiki, could all existing MediaWiki installations be upgraded and immediately able to operate as a federation? Or is JSON allowing this drag and drop magic and not able to work with MediaWiki code?

I would really appreciate any feedback on these comments/ideas. Thanks you all for your work on this project and am thankful to see that it is being develop. I hope I can help spread the word once it is ready for the masses.

@interstar mentions pulling content from a UseMod wiki. I'm currently feeding my original wiki into the federation through one page of perl that generates json instead of html. It's read only, but it serves the most recent content on the fly and makes it available to sites that might choose to improve it the federated way. Let me know if you'd like to try running this yourself. It's an experiment.

This was referenced
Closed

Open

### Refactoring to wiki-client. #402

to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 2, 2012
1. SvenDowideit authored
2. SvenDowideit authored
3. SvenDowideit authored
This page is out of date. Refresh to see the latest.
4 client/client.js
 @@ -440,9 +440,9 @@ require.define("/lib/legacy.coffee", function (require, module, exports, __dirna wiki.log('useLocalStorage', $(".login").length > 0); return$(".login").length > 0; }; - textEditor = wiki.textEditor = function(div, item) { + textEditor = wiki.textEditor = function(div, item, help) { var original, textarea, _ref; - textarea = $("").focusout(function() { + textarea =$("").attr('title', help || 'help').focusout(function() { if (item.text = textarea.val()) { plugin["do"](div.empty(), item); if (item.text === original) return;
3  client/lib/legacy.coffee
 @@ -88,8 +88,9 @@ $-> wiki.log 'useLocalStorage',$(".login").length > 0 $(".login").length > 0 - textEditor = wiki.textEditor = (div, item) -> + textEditor = wiki.textEditor = (div, item, help) -> textarea =$("") + .attr('title', help || 'edit paragraph') .focusout -> if item.text = textarea.val() plugin.do div.empty(), item
14 client/plugins/lists.coffee
 @@ -0,0 +1,14 @@ +# Simple bullet list editor +# renders a new bullet foreach line - blank lines are still a bullet +# spaces are lost + +window.plugins.lists = + description: "Simple Bullet list editor" + help: "creates a new bullet point per line" + emit: (div, item) -> + wiki.log 'lists', item + for line in item.text.split "\n" + div.append $(' • ').append(wiki.resolveLinks(line)) + bind: (div, item) -> + div.dblclick -> wiki.textEditor div, item, window.plugins.lists.help + • 25 client/plugins/lists.js  @@ -0,0 +1,25 @@ +// Generated by CoffeeScript 1.3.1 +(function() { + + window.plugins.lists = { + description: "Simple Bullet list editor", + help: "creates a new bullet point per line", + emit: function(div, item) { + var line, _i, _len, _ref, _results; + wiki.log('lists', item); + _ref = item.text.split("\n"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + line = _ref[_i]; + _results.push(div.append($('
• ').append(wiki.resolveLinks(line)))); + } + return _results; + }, + bind: function(div, item) { + return div.dblclick(function() { + return wiki.textEditor(div, item, window.plugins.lists.help); + }); + } + }; + +}).call(this);
• 3  server/express/lib/server.coffee
 @@ -255,7 +255,8 @@ module.exports = exports = (argv) -> window.catalog = { "ByteBeat": {"menu": "8-bit Music by Formula"}, "MathJax": {"menu": "TeX Formatted Equations"}, - "Calculator": {"menu": "Running Sums for Expenses"} + "Calculator": {"menu": "Running Sums for Expenses"}, + "Lists": {"menu": "create a list of items"} }; """
Something went wrong with that request. Please try again.