Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #2957, we implemented some of the functionality of the speech bubble shape as a separate react component that needs to be passed in as a top-level
OnTopOfCanvas
component. This works well, but it means that if you're using this shape (or e.g. our own shapes were built in this way) you'd need to bring in both the shape and theOnTopOfCanvas
component. It makes it very hard to distribute something like a custom shape as its own npm package.One solution here would be a way to bundle together related customisations that make up a coherent feature into a single package that could then be plugged-in to the editor. These plug-in-able things are called "accoutrements".
Accoutrements are a purely additive change - they work with our existing extension methods, but let you bundle things up into a single object if they don't make sense on their own. They're fully backwards-compatible with our existing extension methods. You could still pull out individual parts if you wanted e.g. the shape definition, but wanted to supply your own interactions on top of it.
(the exact API of defining and using these is up for debate! i just did the most minimal thing i could for this diff to illustrate the concept)