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

Move append to create-append-anything module #1815

Merged
merged 3 commits into from
Jan 23, 2023
Merged

Conversation

smbea
Copy link
Contributor

@smbea smbea commented Jan 23, 2023

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)

@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jan 23, 2023
@smbea smbea added backlog Queued in backlog needs review Review pending and removed needs review Review pending backlog Queued in backlog labels Jan 23, 2023
@smbea smbea requested review from nikku and barmac January 23, 2023 14:33
@smbea smbea changed the title Move append to module Move append to create-append-anything module Jan 23, 2023
@smbea smbea mentioned this pull request Jan 23, 2023
19 tasks
AutoPlace
AutoPlaceModule,
ContextPadModule,
EditorActionsModule,
Copy link
Member

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
Copy link
Member

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) {
Copy link
Member

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 and keyboard modules

Copy link
Member

@nikku nikku left a 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.

@smbea
Copy link
Contributor Author

smbea commented Jan 23, 2023

Thanks for the feedback. It makes a lot of sense. I decided to make them optional dependencies by using injector.get('editorActions', false) and so on where needed. I believe this achieved the intended goal

Copy link
Member

@nikku nikku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful.

@nikku nikku merged commit c314d68 into develop Jan 23, 2023
@nikku nikku deleted the move-append-to-module branch January 23, 2023 19:44
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants