Skip to content
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

Merged
merged 92 commits into from
Feb 11, 2022

Conversation

elizabetdev
Copy link
Contributor

@elizabetdev elizabetdev commented Nov 24, 2021

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:

  • No permission
  • Page not found
  • Loading

Screenshot 2021-12-17 at 15 22 21

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.

Screenshot 2021-12-16 at 20 21 32

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

plugin@2x

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

  • Check against all themes for compatibility in both light and dark modes
  • [ ] Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • [ ] Props have proper autodocs and playground toggles
  • Added documentation
  • [ ] Checked Code Sandbox works for any docs examples
  • [ ] Added or updated jest and cypress tests
  • [ ] Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • [ ] A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

1 similar comment
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@thompsongl thompsongl mentioned this pull request Dec 14, 2021
16 tasks
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

elizabetdev and others added 22 commits February 10, 2022 11:36
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>
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@elizabetdev
Copy link
Contributor Author

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

@cchaos @gchaps does this text sound ok?

Screenshot 2022-02-10 at 14 02 47

@kibanamachine
Copy link

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
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5409/

@elizabetdev elizabetdev merged commit 4318014 into elastic:main Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants