Skip to content

[EuiMarkdown] Allow EuiFlyout instead of EuiModal #5370

Closed

Description

@r4zr32d3k1l

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:

{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.

Activity

  1. snide commented on Nov 10, 2021

    @snide
    Contributor

    Can you link to the design / concepts of what you're trying to accomplish? That epic isn't very descriptive of the UX needed.

  2. r4zr32d3k1l commented on Nov 10, 2021

    @r4zr32d3k1l
    Author
  3. snide commented on Nov 10, 2021

    @snide
    Contributor

    Yep. It'll just give everyone context for the request.

  4. r4zr32d3k1l commented on Nov 10, 2021

    @r4zr32d3k1l
    Author

    Of course, just give me some time to do that. Everything will be ready in couple hours.
    image

  5. changed the title [-][EuiMarkdown] Marckdown is not allow to use flyout. [/-] [+][EuiMarkdown] Allow `EuiFlyout` instead of `EuiModal`[/+] on Nov 10, 2021
  6. r4zr32d3k1l commented on Nov 10, 2021

    @r4zr32d3k1l
    Author

    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

  7. cchaos commented on Nov 10, 2021

    @cchaos
    Contributor

    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.

  8. github-actions commented on May 10, 2022

    @github-actions

    👋 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.

  9. added
    stale-issue
    on May 10, 2022
  10. thompsongl commented on May 10, 2022

    @thompsongl
    Contributor

    Not sure if this issue is still relevant, but I'm commenting to test the automatic removal of the stale-issue label. Please don't add or remove labels, or close the issue until I comment again. Thanks!

  11. removed
    stale-issue
    on May 10, 2022
  12. thompsongl commented on May 10, 2022

    @thompsongl
    Contributor

    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.

  13. github-actions commented on Nov 7, 2022

    @github-actions

    👋 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.

  14. added
    stale-issue
    on Nov 7, 2022
  15. github-actions commented on Nov 14, 2022

    @github-actions

    ❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

  16. added
    stale-issue-closed
    on Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    markdown editorstale-issuestale-issue-closed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions