-
Notifications
You must be signed in to change notification settings - Fork 315
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
feat : allow dropdown menu on toolbar to group secondary buttons #141
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.
I read the code and here are my two cents. Of course @Ionaru as the last word.
fix: #129 * |
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.
Feedback from testing:
- The dropdown toolbar buttons seem to inherit the action of the top-level button, for example
new EasyMDE({
toolbar: [{
name: 'bold',
action: EasyMDE.toggleBold,
className: 'fa fa-bold',
title: 'Bold',
children: [
{
name: "italic",
action: EasyMDE.toggleItalic,
className: "fa fa-italic",
title: "Italic",
}
]
}
});
Using the dropdown and clicking the toggleItalic button will trigger both toggleBold and toggleItalic.
-
I'd like there to be some indication of a dropdown being present on a button, currently when looking at the toolbar there is no way to know if there are any dropdowns and users will have to test each button.
-
Dropdowns that open when hovering do not provide a great mobile experience, is there anything we can do to improve that? Having an indicator might solve this as well.
Very good remarks, thanks. I'll take care of your suggestions. |
|
Hi @Ionaru , Cheers, |
I @Ionaru i can't reproduce your last problem. Can you give me your html example file and your browser name and version please ? |
new EasyMDE({
autoDownloadFontAwesome: false,
toolbar: [{
name: 'bold',
className: 'fa fa-bold',
title: 'Bold',
noDisable: true,
children: [
{
name: "italic",
action: EasyMDE.toggleItalic,
className: "fa fa-italic",
title: "Italic",
}
]
}]
}); Then enable preview mode and hover over the |
@Ionaru In the master branch, I get the same behavior of this PR |
ping @Ionaru can you explain more that we should get ? because on master branch I got the same behavior |
Hmm alright if it's the same on master then it's fine I suppose |
If you want that we fix this issue, we need to understand the behavior of this property. But we are waiting this PR, maybe we can open a ticket ? |
@A-312 @firm1 I've made a small change to the dropdown code to allow the dropdown to use the built-in button shortcuts. new EasyMDE({
toolbar: [{
name: 'Text tools',
className: 'fas fa-edit',
title: 'Common text edit tools',
noDisable: true,
children: ['bold', 'italic'],
}],
}); Please check if the code is also still valid for your use-cases. |
firm1 has less time to review, I will review this evening. |
I have forgotten to review this PR, I did, this seem OK for me. |
This PR allow to groups somes buttons in dropdown menu.
Result give something like screenshot