-
Notifications
You must be signed in to change notification settings - Fork 0
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
Reactivity #178
Reactivity #178
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
I must admit that it took me some time to understand how this works. Part of that was because it is hard to find out what kind of values are expected in the various properties of the navigationState
model. Is there a usual way to document what the model's properties mean?
I think also collection.search.view.js
has to be renamed to catalog.search.view.js
, but maybe it is better to do that after #183 is merged.
No shame in that, especially given that it was already expected.
Not that I'm aware of, but we can probably agree on something. Do you have suggestions?
Agreed! |
@jgonggrijp : I have merged develop into your branch so that I can continue with the next step. The merge conflicts were not dramatic and it helped me to understand your new set-up better. |
@tijmenbaarda I will rebase this branch on |
Because that is the version that runs on our servers.
Merging the collections simplified the integration between the search view and the records list view.
e76d7b4
to
7379d04
Compare
This branch closes #177 and also partially addresses #123, #130 and #131.
These changes demonstrate a few tricks and principles (apart from a few other, minor cleanups):
active
class in response tofocus
/blur
events from its.model
(i.e., the catalog or collection in question). This avoids having to redraw both dropdown menus entirely every time the selection changes.enter
andexit
events on a state model, to insert a new view into the DOM and also cleanly remove it again when appropriate. This is also used to trigger thefocus
/blur
events on the catalogs and collections.route
events from a router, rather than defining route-handling methods directly within the router itself.GlobalVariables
. The main.js creates instances of these classes and adds coupling from the outside, mostly by binding methods of one instance to events of another.I write "demonstrate", because there is also still some code that could use the above treatment, but which I skipped. That means that #123, #130 and #131 cannot be closed yet.
You are cordially invited to read the code changes for inspiration. I expect at least some of the changes to raise questions; please do not hesitate to ask for clarification where needed.
I expect these changes to conflict with changes that you have written in parallel. I propose to merge your changes first, I will rebase my changes on yours after that.