-
Notifications
You must be signed in to change notification settings - Fork 122
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
Include stubs for all hooks to get going quickly #110
Comments
This would be a great learning experience for someone to learn about the different hooks available in depth. |
Note that this has a non-zero impact on performance if a user mistakenly leaves these stubs in place: the server optimizes away the need to notify plugins of hooks that it doesn't register. |
@lieut-data I was thinking the same. Do you have any ideas of how we can help a plugin dev new to the framework have some sort of IDE support for the hooks? Linking to the docs does our due diligence, but there are so many functions that having autocomplete like |
I'm not particularly fond of the "implement the method" magic that currently exists. I'd much rather have something like a In principle, this is possible, but it requires reworking the implementation of |
@lieut-data That would just be another place that needs to be updated whenever a new hook is implemented :) Our docs are a bit out of date in that regard and I have a todo to update those. I suppose we could have the stubs and comment them out? |
So in my proposal, that would be the /definition/ of the hooks, and to implement same in the server, we'd bump our dependency on mattermost-plugin-api and implement the required interface. In theory, at least, no duplication required at all.
This is pragmatic: I like it! (Same duplication problem, of course.) |
Original Message
If https://github.com/mattermost/mattermost-plugin-starter-template would contain a stub implementation of all hooks, new author could use it from the get go and even if they leave the unneeded hooks, it's not a big deal.
Issue created from a Mattermost message by @hanzei.
The text was updated successfully, but these errors were encountered: