Skip to content

Commit

Permalink
Moved content that I wanted into READMe. part of #25.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkomoros committed Dec 25, 2018
1 parent c3d5563 commit 6d948f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 42 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,10 @@ Run `gcloud beta firestore import gs://complexity-compendium-backup/[EXPORT_PREF

See above, also `cd webapp`, `npm install`

### Design

The compendium-app reads from the URL and then calls navigate() based on it. Navigate figures out which view needs to be ensured it is loaded, and then sets state.app.page to that viewer, state.app.location to the entire location, and state.app.pageExtra to the stuff after the first part of page, so e.g. '/c/this-stuff-is/included-in-page-extra'.

That then causes card-view to be activated, with a different page-extra, which it then tells the store to show a specific card. It also checks to ensure that the URL showing is the actual card name; if not it silently updates it.

When you want to navigate to a card, you use actions/navigateToCard, which uses history.pushState, and then calls the router to extract out the URL and operate.
42 changes: 0 additions & 42 deletions webapp/README.md

This file was deleted.

0 comments on commit 6d948f1

Please sign in to comment.