Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] Connect state atom to Syncbase #39

Closed
jxson opened this issue Nov 11, 2015 · 0 comments
Closed

[web] Connect state atom to Syncbase #39

jxson opened this issue Nov 11, 2015 · 0 comments
Assignees
Labels

Comments

@jxson
Copy link
Contributor

jxson commented Nov 11, 2015

No description provided.

@jxson jxson added the web label Nov 11, 2015
@jxson jxson self-assigned this Nov 11, 2015
jxson added a commit that referenced this issue Nov 11, 2015
Several components were refactored and refined, at a high level the UI state now
treats device-sets as a top level component (over files). The initial screens
shows a list of device-sets each of which owns a file, some meta information and
a collection of devices. Several modifications were made to the markup and style
to have a cleaner (more material based) look and feel.

Other changes in this CL include:

Behavior for "Add a file": When clicking the "+" button in the UI and a file has been selected by the user:

1. A device-set is created, with an empty file and devices collection.
2. A file with the added PDF blob is added to the new device-set.
3. The "current" device is appended to the device-set's collection of devices.
4. The new device-set shows up in the list of items on the main screen.

Application state: The entire application state in main.js is continuously
serialized and saved to a local cache based on window.localStorage. Since PDF
blobs are large and not appropriate for this type of cacheing they are saved to
IndexedDB (SEE: https://goo.gl/sKGvCB) using a small wrapper in
browser/dom/blob-store.js. The state is then rehydrated on domready from any
previously saved state. This helps ensure correct initialization of state and
child components. Additionally this makes it possible to view the pervious state
when reloading the page.

Router: The router was refactored so that a hash of routes are passed into state
construction and can be checked against on app render. The router state atom
holds the current route, params from named routes like "/posts/:id", and
attaches a popstate listener to the window. The shared anchor helper was removed
since normal click events will trigger the popstate listener and call the
router's internal routing channel.

* The files component has been deleted.
* PDF rendering has been moved to the device-set component.
* Device-set list item rendering has been moved to the device-set component.
* The file component's Blob hashes are now MD5 hex digests.

SEE: IndexedDB - https://goo.gl/sKGvCB

Next Steps:

* Device-set management UI - #38
* Hook Vanadium/Syncbase back up - #39

Closes #7

Change-Id: Ifbdd409b44d96d796865aa8c179ea85a858f3c84
@yyoon yyoon closed this as completed Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants