portive / wysimark

The Wysiwyg Editor for Markdown: 100% CommonMark + GFM with Uploads and Image Resizing
Other
239 stars 41 forks source link

fix(React): consider MenuItemData's show function in Menu Component #51

Closed leavesster closed 1 year ago

leavesster commented 1 year ago

The document said:

upload attachments and images features will be disabled

But the relative menu is still popover when these features is in compactDialogItems which I find the relative configuration is in packages/react/src/toolbar-plugin/items/dialogItems.tsx.

like this:

before

It seems that the MenuItemData 's show function is only called in ToolbarItem Component, but not considered when the in Menu Component (packages/react/src/shared-overlays/components/Menu/Menu.tsx).

after this pr, when auth token is not given, the popover menu will looks like this:

after
thesunny commented 1 year ago

Thank you @leavesster