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

[DataView] UX improvements for index pattern input in data view flyout #152138

Merged
merged 34 commits into from
Mar 2, 2023

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Feb 24, 2023

Summary

This PR adds some UX improvements to how an index pattern can be entered:

  • Help text under the input was updated to mention that commas can be used
  • Added in-product docs popover to Index pattern input
  • Automatically show all sources again if a comma was entered
  • It's possible to switch between all available sources and only matching ones via new tabs
  • Index name will be fully highlighted if ES returns that it was an exact match for a wildcard
  • Persist the selected "Rows per page" value in localStorage

Screenshot 2023-03-01 at 12 02 40

Screenshot 2023-03-01 at 12 02 46

Screenshot 2023-03-01 at 11 56 59

Checklist

@jughosta jughosta added release_note:enhancement Feature:Data Views Data Views code and UI - index patterns before 8.0 backport:skip This commit does not require backporting Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.8.0 labels Feb 24, 2023
@jughosta jughosta self-assigned this Feb 24, 2023
@jughosta jughosta changed the title [DataView] Improvements for index pattern input in data view flyout [DataView] Improvements for index pattern input UX in data view flyout Feb 24, 2023
@jughosta jughosta changed the title [DataView] Improvements for index pattern input UX in data view flyout [DataView] UX improvements for index pattern input in data view flyout Feb 24, 2023
@ninoslavmiskovic
Copy link
Contributor

ninoslavmiskovic commented Feb 27, 2023

Looks great @jughosta ! Much easier for the user to understand which index patterns they are selecting, and great that the user can select them via a checkbox.

Small comment: When the user selects to have "Rows per page" to e.g. 20 from 10, then it does not remember it next time I am creating a data view.

@kertal
Copy link
Member

kertal commented Feb 27, 2023

This is much more userfriedly 👍 and will be very helpful!

@jughosta jughosta marked this pull request as ready for review March 1, 2023 12:52
@jughosta jughosta requested a review from a team as a code owner March 1, 2023 12:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@jughosta
Copy link
Contributor Author

jughosta commented Mar 1, 2023

Kept only minimum changes at this stage.

</ul>
</EuiText>
</EuiPanel>
</EuiPopover>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @gchaps,

Could you please review this new popover?
I pulled the text from docs.

Screenshot 2023-03-01 at 12 02 46

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm tempted to shorted the index pattern field description text now that there's a popover to just the first sentence.

Copy link
Contributor

@gchaps gchaps Mar 1, 2023

Choose a reason for hiding this comment

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

I agree with shortening the hint text under the field description. I'll work up some text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found that back in v7.10 we had the following messaging: An index pattern can match a single source, for example, filebeat-4-3-22, or multiple data sources, filebeat-*.

Could it be a better hint for the input?

Screenshot 2023-03-02 at 13 07 35

defaultMessage:
'Enter an index pattern that matches one or more data sources. Use an asterisk (*) to match multiple characters. Spaces and the characters , /, ?, ", <, >, | are not allowed.',
'Enter an index pattern that matches one or more data sources. Use a wildcard (*) to match multiple sources. Separate with a comma (,) to match multiple single sources. Spaces and the characters /?"<>| are not allowed.',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gchaps And this change.

Screenshot 2023-03-01 at 12 02 40

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

PR looks good, just awaiting final text.

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Even with removing the ability to select indices by mouse (I already miss it, but it can be added in the future) this brings nice UX improvements to this area 👍

@gchaps
Copy link
Contributor

gchaps commented Mar 2, 2023

My suggestion is to remove all hint text underneath the field and use this copy in the help popover. Also explain what an index pattern is.


An index pattern is a string that you use to match one or more data streams, indices, or aliases.

  • Match multiple sources with a wildcard (*).

    filebeat-*

  • Separate multiple single sources with a comma (,).

    filebeat-a,filebeat-b

  • Exclude a source with the minus sign (-).

    -test3

  • Spaces and the characters /?”<> are not allowed.

@jughosta
Copy link
Contributor Author

jughosta commented Mar 2, 2023

Thanks, @gchaps!

Updated:
Screenshot 2023-03-02 at 18 31 03

@jughosta jughosta requested a review from mattkime March 2, 2023 17:36
pattern: <EuiCode>-test3</EuiCode>,
}}
id="indexPatternEditor.titleDocsPopover.dontUseSpecialCharactersDescription"
defaultMessage="Spaces and the characters /?”<> are not allowed."
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like the | char is missing, also the quote character changed. I'm comparing to the form schema change.

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

one minor comment I'll trust you to resolve. Otherwise looks great!

@gchaps
Copy link
Contributor

gchaps commented Mar 2, 2023

A couple of minor changes:

  • For the "Special characters" text:

    • The quotation mark should be straight up and down
    • The "|" is missing.
  • We need to say that the minus sign needs to be at the beginning:

    Exclude a source by preceding it with a minus sign (-).

@jughosta
Copy link
Contributor Author

jughosta commented Mar 2, 2023

@mattkime Good catch! Thanks!

@jughosta
Copy link
Contributor Author

jughosta commented Mar 2, 2023

I like how clearer it is now! 😍 Thanks for your feedback!

Screenshot 2023-03-02 at 18 59 24

@jughosta jughosta enabled auto-merge (squash) March 2, 2023 19:22
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataViewEditor 64 65 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataViewEditor 36.7KB 39.7KB +3.0KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataViewEditor 10.5KB 10.7KB +141.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 428 430 +2

Total ESLint disabled count

id before after diff
securitySolution 506 508 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jughosta

@jughosta jughosta merged commit 2ceaa64 into elastic:main Mar 2, 2023
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this pull request Mar 10, 2023
elastic#152138)

## Summary

This PR adds some UX improvements to how an index pattern can be
entered:

- [x] Help text under the input was updated to mention that commas can
be used
- [x] Added in-product docs popover to Index pattern input 
- [x] Automatically show all sources again if a comma was entered 
- [x] It's possible to switch between all available sources and only
matching ones via new tabs
- [x] Index name will be fully highlighted if ES returns that it was an
exact match for a wildcard
- [x] Persist the selected "Rows per page" value in localStorage 

<img width="400" alt="Screenshot 2023-03-01 at 12 02 40"
src="https://user-images.githubusercontent.com/1415710/222121556-b0288fdc-8095-4a66-b781-d3d389c7f54a.png">
<img width="400" alt="Screenshot 2023-03-01 at 12 02 46"
src="https://user-images.githubusercontent.com/1415710/222121559-ede0ec65-e49f-4253-afaa-7c7980f714c8.png">
<img width="400" alt="Screenshot 2023-03-01 at 11 56 59"
src="https://user-images.githubusercontent.com/1415710/222120704-a0b2c974-ca03-450a-9beb-6fe72b03c929.png">


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
@gchaps gchaps mentioned this pull request Apr 25, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Data Views Data Views code and UI - index patterns before 8.0 release_note:enhancement Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants