-
Notifications
You must be signed in to change notification settings - Fork 10
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
api/init should call gn/reset-notes #33
Comments
Hmm. Maybe not that simple. |
|
I am maybe confused, what Maybe I miss a "reset" function on api level.
So that a following "evaluate-notespace" starts as much "from scratch" as possible. |
notespace/src/notespace/lifecycle.clj Line 7 in 71c04bd
(1) resets the Notespace state, except for the config (so if the user has redefined the config, this part stays redefined) (2) resets the renderer (which is based on Gorilla-Notes) (3) makes sure the renderer is mount (exactly once) to reflect the system state changes Step (1) makes sure the system information about notes is emptied. In order to fill it back, we need to ask it to evaluate namespaces, etc. Step (2) is calling the init function of the renderer (based on Gorilla-Notes):
So, of the tasks you mentioned
.. the only one which does not happen here is notespace/src/notespace/actions.clj Line 69 in 71c04bd
Does it makes sense? |
Maybe the confusing thing here is that there are two states here:
The Notespace state is managed through the Cljfx events and context system. The Gorilla-Notes state is just the list of hiccup elements that should appear in the browser at a given point in time.
This function's responsibility is to interpret the Notespace state and decide how to update the Gorilla-Notes state (that is, the list of hiccup elements). Does it make sense? |
I cannot see the need to "init" the notespace, without wanting to "clean" the browser.
The text was updated successfully, but these errors were encountered: