View Module

The view.js module runs in the client where it manages the retrieval and display of pages in the federation. It is currently 140 lines long - github

Used by the Host Module bootstrap html to which we export start(). We aspire to have more users so we seek minimal dependency on this particular host.

Uses Start Function which we export to the enclosing html to run when ready.

DOT FROM module-diagram

The view.js module creates and maintains state that persists while a view tab is open.

- A lineup of pages displayed in panels - The available type rendering modules

# Code walk through

The codes fetches a list of available modules for rendering wiki-items: -

- The code somewhat strangely specifies the css for the basic wiki-page elements on start() - github

- As I understand it the code takes html `section` elements and adds them to the lineup - github

- There is a very simple section that handles all click events. I would like to understand this in more detail - github

- The `resolve(title, pid) ` function does all the work of fetching the page-json for a link that was clicked on. It uses the simple regular expression for slugs (with it's associated issues) to convert the page-title to a slug for the collaborative link to work - github