-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Allow markdown in error embeddable #62427
Conversation
ReactDOM.render( | ||
// @ts-ignore | ||
<div className="embPanel__error embPanel__content" data-test-subj="embeddableStackError"> | ||
<EuiText color="subdued" size="xs"> | ||
<EuiIcon type="alert" color="danger" /> | ||
<EuiSpacer size="s" /> | ||
{title} | ||
<div /* eslint-disable-next-line react/no-danger */ |
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 haven't pulled this PR down yet, but it seems like the Markdown
component is already doing exactly this: https://github.com/elastic/kibana/blob/master/src/plugins/kibana_react/public/markdown/markdown.tsx
Is there anything blocking us from using it here?
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 thought it was an overkill, since the message may not even be a markdown. But on second thought, it makes sense.
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.
code LGTM
@elasticmachine merge upstream |
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.
Tested in Chrome and works as expected, markdown is applied and formatted nicely.=
Just left a small nit about an unused import
import { EmbeddableRoot } from './embeddable_root'; | ||
import { mount } from 'enzyme'; | ||
// @ts-ignore | ||
import { findTestSubject } from '@elastic/eui/lib/test'; |
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.
findTestSubject
is unused.
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.
Will fix this in the next PR, would like to get this in for 7.7
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Allow markdown in error embeddable * Replace markdown factory with markdown component Co-authored-by: Elastic Machine <[email protected]>
* Allow markdown in error embeddable * Replace markdown factory with markdown component Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* Allow markdown in error embeddable * Replace markdown factory with markdown component Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
Fixes: #61590
Now we render markdown in an error embeddable.
Checklist
Delete any items that are not applicable to this PR.
- [] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibility- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browserFor maintainers