-
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
[Discover] Add field types in-product help #126657
Conversation
@elasticmachine merge upstream |
I think this is a good idea! I was a bit worried about users dismissing the callout and not being able to access this info afterward. The filter dropdown currently uses EuiFilterButton which doesn't support an append. I've used EuiButtonIcon instead which I think works well too. @gchaps what should we include in the footer? |
Instead of an |
@cchaos Thanks for the feedback. This is what I came up with. I had to resort to an EUI mixin ( |
@andreadelrio @cchaos I just want to share some guidelines that we've been working on with @gchaps: Figma project. It is still a work in progress but the idea is to have some guidelines to ensure consistency in the way we show product help across our products.
Of course, these are only ideas we have... Still WIP. So feel free to ignore them and we can revisit them later on. It would also be great to also have your thoughts on the guidelines. So feel free to add comments on the Figma project. |
This is great @miukimiu ! Thanks for bringing it up. I actually think this could also fall under the On a separate note and following up on the background color which I added to try to mimic the behavior of EuiFormLayout's append. I wanted to point out that because of the way this is currently built when the EuiFilterButton on the left receives focus it gets a gray background that matches the color of the "append". I don't love how that looks. @cchaos Do you think this makes it worth considering adding proper prepend/append support for EuiFilterGroup? Especially considering we're developing guidelines for this type of in-product help. |
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.
Is this the complete list of field types? I thought there were more.
As for the footer, I agree that we should include a link to the ES docs.
src/plugins/discover/public/application/main/components/sidebar/discover_field_search.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/sidebar/discover_field_search.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/sidebar/discover_field_search.tsx
Outdated
Show resolved
Hide resolved
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 reference @miukimiu , thank you! We really should get those finalized.
I agree with @andreadelrio here though, that this isn't a "How this feature works" but more like a cheatsheet. I see it falling more under the category of Field description: Long content with formatting
so probably just need to change this to an iInCircled
icon.
src/plugins/discover/public/application/main/components/sidebar/discover_field_search.scss
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/sidebar/discover_field_search.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/sidebar/discover_field_search.tsx
Outdated
Show resolved
Hide resolved
@kertal I pushed some changes to hopefully clean up the code for the table and added a separate file to keep the description texts (now i18n ready). Do you think you can help me add pagination to it? 6 rows per page would be ideal and we don't need the "Rows per page" button. |
Thx for this great work! For sure I can help, but more likely next week. There are also some "unknown" fields like "date_range" we should explain (after researching what they're doing) |
@kertal awesome thanks! @gchaps is working on the remaining descriptions |
@elasticmachine merge upstream |
[Discover] Add field types in-product help: Scrolling instead of pagination
Yes, there is an example here. i18n.translate('discover.advancedSettings.disableDocumentExplorerDescription', {
defaultMessage:
'To use the new {documentExplorerDocs} instead of the classic view, turn off this option. ' +
'The Document Explorer offers better data sorting, resizable columns, and a full screen view.',
values: {
documentExplorerDocs:
`<a href=${docLinks.links.discover.documentExplorer}
target="_blank" rel="noopener">` +
i18n.translate('discover.advancedSettings.documentExplorerLinkText', {
defaultMessage: 'Document Explorer',
}) +
'</a>',
},
}); |
src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx
Outdated
Show resolved
Hide resolved
Just wanted to add to @dmitriynj suggestion, there's another way to do it, using react components in the values property: Lines 66 to 80 in d0c06b0
FYI @jughosta , sharing i18n knowledge that's not obvious |
const { curPageIndex, pageSize, totalPages, startIndex, changePageIndex } = usePager({ | ||
initialPageSize: FIELD_TYPES_PER_PAGE, | ||
totalItems: presentFieldTypes.length, | ||
}); |
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.
Since the pagination component is removed now, there's a lot of logic/variables you don't need either.
…r/discover_sidebar.tsx Co-authored-by: Matthias Wilhelm <[email protected]>
@elasticmachine merge upstream |
remove code that's 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.
Code LGTM, this is great especially for users starting with Kibana and ES, also of course for all others 🎉 . Discover is now supporting better understanding of Elasticsearch basics.
Tested locally using Safari, Firefox, Chrome, works as expected. Last thing I wondered, was the font-size in the mobile view, which seems to be large. But this might be right this way, for mobile users targeting better readability. So not a blocker, just an observation:
@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.
LGTM!!
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.
Looks great!
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
This is a follow-up to the work started in ON week.
Filter by type
dropdown. This button displays a popover with information about field types.https://github.com/elastic/kibana/blob/2f468993d425ca89e0037920df8f8aaedf61f382/src/plugins/discover/public/application/main/components/sidebar/lib/get_field_type_name.ts
Checklist
Delete any items that are not applicable to this PR.
- [ ] Documentation was added for features that require explanation or tutorials- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listRisk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers