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

Make notifier more strict and better documented #1310

Open
adomasven opened this issue Sep 7, 2017 · 0 comments
Open

Make notifier more strict and better documented #1310

adomasven opened this issue Sep 7, 2017 · 0 comments

Comments

@adomasven
Copy link
Member

The Zotero.Notifier is an excellent part of Zotero code infrastructure and the benefits of pub-sub systems are known and many. However I am often rather worried about working with it, especially expanding notification topics, because of loose documentation and unenforced types of events allowed. Going forward having a robust pub-sub system is going to be very important, especially once we switch to Electron and it would be good to make the current system more explicit on the types of topics and events that are available.

Something like at least this kind of type checking for both topics and events would be a good start. A more ideal solution would be moving the event specs outside into a JSON file that specifies which events are available for individual topics, such that event subscribers don't have to sift through the codebase to figure it out.

I am willing to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant