-
Notifications
You must be signed in to change notification settings - Fork 844
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
[EuiMarkdownEditor] Support for a customizable editing experience #4926
Comments
The only piece of this I don't think we'd be able to support at this time is swapping the raw content with a placeholder ( The two approaches I think should be explored:
|
I think we need to be careful not to mix different editor styles which would end up being confusing, especially since mentions aren't the only custom embed codes we support. The Alternatively we could opt for a WYSIWYG editor. This would allow users to format text and add embeddable content without having to toggle between different modes. Users would still be able to type markdown syntax and mentions but it wouldn't actually show the markdown code once applied. Jira and Slack are good examples of this. In terms of authoring experience WYSIWYG would obviously have a lower barrier of entry but I'm not sure if that's where MockupsEuiMarkdownEditor (as is)I don't think this is a good editing experience since it's quite hard to understand what's going on and it will get messy easily with a few embed codes added, especially once visualisations are involved. I think non-technical users would struggle with this. EuiMarkdownEditor (with monaco based editor)I think this is a lot clearer but the JSON syntax is obviously not designed to be human readable like markdown is and non-technical users might still struggle with this a bit. WYSIWYG editorI think this is the best editing experience but might involve more effort to build. We could use a rich text editor framework like https://www.slatejs.org or https://draftjs.org. @chandlerprall Are there any plans to remove modes from |
POC for rich text editor with ability for mentions using Slate.js: rich-text-autocomplete.movPOC for syntax highlighting with auto complete using Monaco: monaco-autocomplete.mov |
Yeh, that's a good idea. Code folding could be implemented using a custom Monaco rule. I don't think it's a solution to the usability issues though, especially since code folding will get confusing when there's multiple elements of the same type being edited. It would be hard to differentiate between them. It also doesn't solve the problem that mentions use opaque IDs which means users would not be able to see which user is being mentioned.
Yeh, sure, I've created a draft PR here for diff: elastic/kibana#120093 |
I haven't had much involvement with the markdown editor since my time on the Security solution team (when I was designing the original cases UI, nearly two years ago). I imagine either @miukimiu or one of the folks on the @elastic/security-design may have a more up-to-date sense of what they are looking for with regard to mentions in the markdown editor. |
@MichaelMarcialis and @thomheymann FYI we created a spec doc (https://docs.google.com/document/d/1nky8AS2a2NZqEcxlpec0gmm4ydMvx4Nx2NjxpL1xViQ/edit#heading=h.28o9qn4prlon) and a discussion #5829 for a new component that will allow mentioning users in EuiMarkdownEditor. It would be great if you could take a look at the doc. 🙂 |
Thanks, @miukimiu! I saw that this morning and added a comment to the Google doc with links to our initial wireframes for the upcoming user profile MVP project. I think much of our desired functionality is already accounted for by your spec, but I'd be happy to meet up and compare notes. Let me know. |
👋 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. |
Issue still valid. |
We explored this feature in a draft PR: #5885. |
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed. |
❌ Per our previous message, this issue is auto-closing after having been open and inactive for a year. If you strongly feel this is still a high-priority issue, or are interested in contributing, please leave a comment or open a new issue linking to this one for context. |
Still valid. |
While this may be valid it's incredibly unlikely that the EUI team will have time to work on this or EuiMarkdownEditor at any point in the future (in fact, our long-term hope is to move the component out of EUI entirely and into Kibana). Can we circle back to what expectations are for actual work done at some point? |
Makes sense to me. thank you @cee-chen |
Re-closing this. |
Currently, the
EuiMarkdownEditor
renders the "edit" mode using a plaintextarea
. This works well for simple Markdown, but it's possible that plugins will want to customize the editing experience by changing the display of the raw Markdown.For a concrete example, we are looking to support user mentions. The raw markdown might look something like this:
This is not very friendly to look at, so we would prefer to have the editor show something similar to the following:
The replacement text would be treated as a single element, where we could backspace into it to delete the entire reference.
Needed for: elastic/kibana#80334 (8.x timeframe)
(we can make an alternative UX without support for this in EUI, but it will be ugly)
The text was updated successfully, but these errors were encountered: