-
Notifications
You must be signed in to change notification settings - Fork 472
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
Prevent duplicated help menu entries #3044
Prevent duplicated help menu entries #3044
Conversation
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.
If we merge this PR, no link will be displayed when --disable-platform
flag is set. We already don't display tutorial links for BPMN in such a situation, which I think could be considered as a bug as well.
So perhaps we should display/hide links based on the |
Very good catch 👍 I will propose something. |
What about ensuring the help menus only got added once in the TabsProvider: const dmnProvider = (this.providersByFileType['dmn'] || [])[0];
if (dmnProvider) {
dmnProvider.getHelpMenu = () => DMN_HELP_MENU;
}
const bpmnProvider = (this.providersByFileType['bpmn'] || [])[0];
if (bpmnProvider) {
bpmnProvider.getHelpMenu = () => BPMN_HELP_Menu;
} This way, we don't depend on |
This should solve the issue. We could also implement it on the backend: https://github.com/camunda/camunda-modeler/blob/develop/app/lib/menu/menu-builder.js#L549 |
As the backend does not know about BPMN, or DMN, we could definitely filter for duplicates, e.g. via |
Co-authored-by: Pawel Kurek <pawel.kurek975@gmail.com>
683dcea
to
3cebd60
Compare
I updated the PR to prevent duplicates in the backend. Added @smbea as any other is on vacation 🙂 |
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.
I think this looks good 🚀
Originated from #3035.
This prevents duplicated help menu entries in the backend.
Closes #3032