FND / tiddlywebplugins.bfw

Barely Functioning Wiki, emphasizing micro-content
0 stars 2 forks source link

clarify navigation paths #43

Open FND opened 10 years ago

FND commented 10 years ago

this means identifying the various resources (front page, wiki indexes, wiki pages, edit mode etc.) and how they should be inter-linked

the [mock-up](http://fnd.github.io/bfw-mockup/; cf. #42) provides a good start for this

FND commented 10 years ago

A first outline:

import pydot

LINKS = {
    'front page': ['dashboard', 'recent changes', 'help'],
    'dashboard': ['front page', 'recent changes', 'help'],
    'help': ['front page', 'dashboard', 'recent changes'],
    'wiki index': ['front page', 'dashboard', 'recent changes', 'page editor'],
    'wiki page': ['front page', 'dashboard', 'wiki index', 'recent changes',
            'page editor'],
    'page editor':  ['front page', 'dashboard', 'wiki index', 'recent changes',
            'help', 'wiki page'],
    'recent changes': ['front page', 'dashboard', 'page history',
            'wiki activity', 'global activity']
}

SUBPAGES = ['page history', 'wiki activity', 'global activity']

graph = pydot.Dot(graph_type='digraph')
for resource in LINKS.keys():
    node = pydot.Node(resource, style="filled", fillcolor="#AAAAAA")
    graph.add_node(node)
for resource in SUBPAGES:
    node = pydot.Node(resource, style="filled", fillcolor="#EEEEEE")
    graph.add_node(node)
for source, targets in LINKS.items():
    for target in targets:
        edge = pydot.Edge(source, target)
        if target in SUBPAGES:
            edge.set_style('dashed')
        graph.add_edge(edge)

graph.write_png('nav.png')

nav

(arguably the data structure is more readable than the visualization... )

note that some resources (front page, help and recent changes) do not exist yet

also, a set of non-navigation controls are needed for registration, login and logout - these must appear on all pages