-
Notifications
You must be signed in to change notification settings - Fork 843
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
[EuiEmptyPrompt] Add more guidelines #5409
[EuiEmptyPrompt] Add more guidelines #5409
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
1 similar comment
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
@gchaps thanks for (re)reviewing the text. 🎉 For the following highlighted text I need an opinion. We have a specific UI in Kibana to handle no data scenarios. I think it's important to mention that this UI exists. Yesterday, I talked with @chandlerprall about this and we agreed that is important to indicate when we have specific components in Kibana so that consumers know about their existence and use them. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
For no data use cases, consider using a{' '} | ||
<Link to="/display/card">EuiCard</Link>. In Kibana, you just need to | ||
pass a no data configuration into your{' '} | ||
<strong>KibanaPageTemplate</strong> to display a specific UI that |
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.
👍 Great idea! We could also link to this docs page in the Kibana repo: https://github.com/elastic/kibana/blob/main/dev_docs/tutorials/kibana_page_template.mdx
I thought about linking to the new docs site, but because it's still under dev and behind a login, I think we'll want a public link. Once the new docs site is live, we can point there instead.
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.
LGTM
Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/ |
Summary
This PR adds more usages guidelines for the EuiEmptyPrompt. You can find the page for reviewing here: https://eui.elastic.co/pr_5409/#/display/empty-prompt/guidelines.
Guidelines
There were some discussions that can be found on this google doc that lead to some decisions.
Panel color picker
The panel color picker is a component where based on the selection of a use case and a page template a panel color is recommended.
I used to have an example for "completed tasks" but I removed it. I couldn't think of a good example. But if anyone has a good example, I'm happy to add it. @gchaps do you have a good example of this use case?
Initially, alternatives were also shown but I simplified to only show one recommendation.
The "Default with multiple panels" page template option gets disabled for:
Guide Section component
The guide section component was improved so it can receive JS strings. We could only pass RAW js files that were imported like
require('!!raw-loader!..)
. This way I can use the guide section to preview the result of the panel color picker.I'm using a component react-element-to-jsx-string to transform generated react components to a JSX string and this is passed to the demo js tab.
But... I found a weird issue. It doesn't work well when deployed. As we can see the deployed version gets some weird tags. 😬
It was recommended to use react-view but I found it difficult to achieve what I was achieving with react-element-to-jsx-string. @thompsongl can you help me with this task?
Checklist
[ ] Checked in mobile[ ] Props have proper autodocs and playground toggles[ ] Checked Code Sandbox works for any docs examples[ ] Added or updated jest and cypress tests[ ] Checked for breaking changes and labeled appropriately[ ] A changelog entry exists and is marked appropriately