I haven’t 100% decided yet how the API will work. As always I’ll try my hardest (but it’s really hard!!) to retain backwards compatibility with APIs for adding buttons, but there will likely be a much shinier, simpler API for doing it.
One problem for example is the old one would show the quote button everywhere, not sure when composing a topic. Super confusing.
Okay, backwards compatibility isn’t as critical for me (knowing how to add a toolbar item definitely is more important), except for the following:
Also, a follow up question.
If there are changes to how you add a toolbar item, how can we direct this against a specific version of Discourse so that our changes which will show as an update on older versions and obviously we don’t want them to upgrade the plugin as their Discourse version won’t support the new way of adding a toolbar item…
Edit:
Also I get this is complicated, just giving food for thought, because as a plugin developer, these are the things that concern me.
[quote=“cpradio, post:27, topic:34679, full:true”]
Okay, backwards compatibility isn’t as critical for me (knowing how to add a toolbar item definitely is more important)[/quote]
Agreed, but it doesn’t address the second, backwards compatibility, as soon as I use the new way, any stable implementations can’t upgrade to my plugin until the new composer is pushed to the stable branch.
It is a very straight-forward plugin, so if there is a way to test if the new composer is available versus the old, so I can run the appropriate logic, that’d do it.
I can update the others I have once I know the best way to proceed.
I’ve just deployed the new composer that is using Ember.js instead of pagedown. It was a lot more work than I expected, because when I got in there to swap it out I realized how badly the state of our composer code was. We were abusing Ember in many ways to get that code to work and I made a huge effort to straighten it all out. It’s not perfect but it’s a huge improvement.
Please report any issues you see and I’ll fix them as fast as I can!