Repository navigation
Closed
Labels
markdown editorstale-issue(Don't delete - used for automation)stale-issue-closed(Don't delete - used for automation)
Description
The markdown editor is not allowing us to use a flyout (only the modal). That's would be great if we can solve this problem. Otherwise we have to use some code hacks or switch user context that is not the best practice for sure.
Logic that's blocking us:
eui/src/components/markdown_editor/markdown_editor.tsx
Lines 495 to 533 in 52013db
| {pluginEditorPlugin && ( | |
| <EuiModal onClose={() => setPluginEditorPlugin(undefined)}> | |
| {createElement(pluginEditorPlugin.editor!, { | |
| node: | |
| selectedNode && | |
| selectedNode.type === pluginEditorPlugin.name | |
| ? selectedNode | |
| : null, | |
| onCancel: () => setPluginEditorPlugin(undefined), | |
| onSave: (markdown, config) => { | |
| if ( | |
| selectedNode && | |
| selectedNode.type === pluginEditorPlugin.name | |
| ) { | |
| // modifying an existing node | |
| textareaRef.current!.setSelectionRange( | |
| selectedNode.position.start.offset, | |
| selectedNode.position.end.offset | |
| ); | |
| } else { | |
| // creating a new node | |
| if (config.block) { | |
| // inject newlines if needed | |
| markdown = padWithNewlinesIfNeeded( | |
| textareaRef.current!, | |
| markdown | |
| ); | |
| } | |
| } | |
| insertText(textareaRef.current!, { | |
| text: markdown, | |
| selectionStart: undefined, | |
| selectionEnd: undefined, | |
| }); | |
| setPluginEditorPlugin(undefined); | |
| }, | |
| })} | |
| </EuiModal> | |
| )} |
Here is the epic for what we need a flyout for. And if we will be able to close this issue a couple week before feature freeze (8.1.0 Feature Freeze: January 25, 2022) it can help us a lot.
Metadata
Metadata
Assignees
Labels
markdown editorstale-issue(Don't delete - used for automation)stale-issue-closed(Don't delete - used for automation)
Activity
snide commentedon Nov 10, 2021
Can you link to the design / concepts of what you're trying to accomplish? That epic isn't very descriptive of the UX needed.
r4zr32d3k1l commentedon Nov 10, 2021
snide commentedon Nov 10, 2021
Yep. It'll just give everyone context for the request.
r4zr32d3k1l commentedon Nov 10, 2021
Of course, just give me some time to do that. Everything will be ready in couple hours.

[-][EuiMarkdown] Marckdown is not allow to use flyout. [/-][+][EuiMarkdown] Allow `EuiFlyout` instead of `EuiModal`[/+]r4zr32d3k1l commentedon Nov 10, 2021
To get more context here is the figma file about running Osquery from case. It's covers the basic flow and alternative versions that can be used without markdown changes.
https://www.figma.com/file/ODhTA0IVXcWKNJoAWVJhNX/Embed-OSqueries-into-Cases?node-id=1%3A107
cchaos commentedon Nov 10, 2021
The main problem as @r4zr32d3k1l had explained to me was that the custom plugin that the Security solution is building for the EuiMarkdownEditor is complex and the amount of details they need to add goes against our modal usage guidelines of keeping it short and simple. Therefore, they a way to specify their own portal content for the custom plugin configuration.
github-actions commentedon May 10, 2022
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
thompsongl commentedon May 10, 2022
Not sure if this issue is still relevant, but I'm commenting to test the automatic removal of the
stale-issuelabel. Please don't add or remove labels, or close the issue until I comment again. Thanks!thompsongl commentedon May 10, 2022
Confirmed that the label was removed on the next scheduled action run. Feel free to add/remove labels or close this issue if it is no longer needed.
github-actions commentedon Nov 7, 2022
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
github-actions commentedon Nov 14, 2022
❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.