-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Move append to create-append-anything
module
#1815
Conversation
create-append-anything
module
d5ad82b
to
964a7d7
Compare
AutoPlace | ||
AutoPlaceModule, | ||
ContextPadModule, | ||
EditorActionsModule, |
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.
We should not be dependent on this, but make it an optional dependency.
AutoPlaceModule, | ||
ContextPadModule, | ||
EditorActionsModule, | ||
KeyboardModule |
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.
We should not be dependent on this, but make it an optional dependency.
* | ||
* @param {Injector} injector | ||
*/ | ||
export default function CreateAppendEditorActions(injector, editorActions) { |
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.
Consider to make this optionally depend on editorActions
.
You'll otherwise not be able to properly compose it.
Alternative (but maybe overkill):
- add
create-append-anything/editor-actions
andkeyboard
modules
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.
One small topic you may want to follow up on to improve composability:
- Do not hard wire keyboard and editor actions as dependencies, as the modeler works without those usually.
Other than that, great! A really good showcase how this improves maintainability to have such feature contained in a modular fashion.
964a7d7
to
c086014
Compare
Thanks for the feedback. It makes a lot of sense. I decided to make them optional dependencies by using |
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.
Wonderful.
This is a follow up from #1811 (comment)
Moving this causes what seems like a big PR so let me know if I can help make the review easier in any way.
What I suggest is to check out commits 9f302000 and d5ad82ba which add something new (encapsulating editor actions/keyboard shortcuts). The rest is pretty much the same but on a different location (but of course feel free to check it out)