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

[ES|QL] Present ES|QL as an equal to data views on the "no data views" screen #194077

Merged

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Sep 25, 2024

Summary

Resolves #176291

Screenshots

Discover/Dashboard/Visualize

image

Stack Management > Data view

image

If User does not have privilege to create a Data View

image

Checklist

Delete any items that are not applicable to this PR.

@tsullivan tsullivan force-pushed the no-data-views/esql-equal-to-data-views branch from 87cba2a to db7cbae Compare October 4, 2024 00:03
@tsullivan tsullivan marked this pull request as ready for review October 4, 2024 00:34
@tsullivan tsullivan requested review from a team as code owners October 4, 2024 00:34
@@ -29,28 +30,86 @@ describe('AnalyticsNoDataPage', () => {
jest.resetAllMocks();
});

it('renders correctly', async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously, this test was only rendering the "loading" state of the component. I moved the existing tests into a describe block for this.

@tsullivan
Copy link
Member Author

Thanks @andreadelrio I have added the disabled button that includes a tooltip for readonly users.

I chose to position the tooltip to the right. Let me know if you'd prefer it to be positioned differently.

image

@leemthompo
Copy link
Contributor

Is the period after Elasticsearch correct here?

@andreadelrio I'd either use the period for both sentences here or remove it

@leemthompo
Copy link
Contributor

Screenshot 2024-10-08 at 12 33 03

Could also remove the sub-text and just have one main CTA

"How do you want to explore your Elasticsearch data?"

@tsullivan
Copy link
Member Author

Thanks @leemthompo

image

Copy link
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

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

Design changes LGTM. Great job @tsullivan !

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Data Discovery changes LGTM 👍

Left some minor suggestions.

Comment on lines 43 to 46
public async expectEsqlStatement(statement: string) {
const codeEditor = await this.testSubjects.find('kibanaCodeEditor');
expect(await codeEditor.getAttribute('innerText')).to.contain(statement);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

There is also esql service for tests. Maybe it could be moved to it.

Copy link
Member Author

Choose a reason for hiding this comment

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

That does make more sense. Pushed 097d604

@@ -32,6 +32,19 @@ export class DiscoverPageObject extends FtrService {

private readonly defaultFindTimeout = this.config.get('timeouts.find');

/** Ensures that navigation to discover has completed */
public async expectOnDiscover() {
await this.testSubjects.existOrFail('switch-to-dataviews'); // "Switch to Classic" app menu button
Copy link
Contributor

Choose a reason for hiding this comment

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

In data view mode this button will not be present.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed in 6aeab7f

/**
* A presentational component that is shown in cases when there are no data views created yet.
*/
export const NoDataViewsPrompt = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be great to add some padding for mobile view on Discover:

Screenshot 2024-10-09 at 10 11 41

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 8d1eb8e
image

@tsullivan tsullivan enabled auto-merge (squash) October 9, 2024 17:40
@tsullivan tsullivan merged commit 56e1e68 into elastic:main Oct 9, 2024
26 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11263551346

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dashboard 664 665 +1
dataViewManagement 239 240 +1
discover 992 993 +1
kibanaOverview 136 137 +1
lens 1461 1462 +1
visualizations 476 477 +1
total +6

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/shared-ux-page-analytics-no-data-mocks 17 20 +3
@kbn/shared-ux-prompt-no-data-views-mocks 23 25 +2
total +5

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/shared-ux-prompt-no-data-views 0 1 +1

Async chunks

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

id before after diff
dashboard 626.7KB 627.8KB +1.1KB
dataViewManagement 142.4KB 137.1KB -5.3KB
discover 819.9KB 821.2KB +1.2KB
kibanaOverview 53.6KB 54.7KB +1.1KB
lens 1.5MB 1.5MB +851.0B
visualizations 315.5KB 316.6KB +1.1KB
total -85.0B
Unknown metric groups

API count

id before after diff
@kbn/shared-ux-page-analytics-no-data 19 20 +1
@kbn/shared-ux-page-analytics-no-data-mocks 17 21 +4
@kbn/shared-ux-prompt-no-data-views 34 36 +2
@kbn/shared-ux-prompt-no-data-views-mocks 24 26 +2
total +9

async chunk count

id before after diff
dashboard 15 14 -1
dataViewManagement 3 2 -1
discover 28 27 -1
kibanaOverview 3 2 -1
lens 24 23 -1
visualizations 16 15 -1
total -6

miscellaneous assets size

id before after diff
dashboard 838.8KB 1.4MB ⚠️ +621.5KB
dataViewManagement 226.3KB 847.7KB ⚠️ +621.5KB
discover 226.3KB 847.7KB ⚠️ +621.5KB
kibanaOverview 226.3KB 847.7KB ⚠️ +621.5KB
lens 310.2KB 931.7KB ⚠️ +621.5KB
visualizations 451.8KB 1.0MB ⚠️ +621.5KB
total ⚠️ +3.6MB

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 9, 2024
…" screen (elastic#194077)

## Summary

Resolves elastic#176291

### Screenshots

#### Discover/Dashboard/Visualize
<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/c8fb4faf-8d2d-4043-a757-6f092d1fceb3">

#### Stack Management > Data view
<img width="1519" alt="image"
src="https://github.com/user-attachments/assets/bb3f28bd-0ce9-4c49-ace1-1be875e17ba3">

#### If User does not have privilege to create a Data View
<img width="1336" alt="image"
src="https://github.com/user-attachments/assets/bb3f4cbc-8213-41c0-bf09-bd47a9d264e4">

### Checklist

Delete any items that are not applicable to this PR.

- [x] Use a new SVG resource for the ES|QL illustration
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [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]>
Co-authored-by: Liam Thompson <[email protected]>
Co-authored-by: Andrea Del Rio <[email protected]>
(cherry picked from commit 56e1e68)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 9, 2024
… data views&quot; screen (#194077) (#195684)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Present ES|QL as an equal to data views on the &quot;no data
views&quot; screen
(#194077)](#194077)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tim
Sullivan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-09T21:44:30Z","message":"[ES|QL]
Present ES|QL as an equal to data views on the \"no data views\" screen
(#194077)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/176291\r\n\r\n###
Screenshots\r\n\r\n#### Discover/Dashboard/Visualize\r\n<img
width=\"1517\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/c8fb4faf-8d2d-4043-a757-6f092d1fceb3\">\r\n\r\n####
Stack Management > Data view\r\n<img width=\"1519\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bb3f28bd-0ce9-4c49-ace1-1be875e17ba3\">\r\n\r\n####
If User does not have privilege to create a Data View\r\n<img
width=\"1336\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bb3f4cbc-8213-41c0-bf09-bd47a9d264e4\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Use a new SVG resource for the ES|QL illustration\r\n-
[x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Liam Thompson
<[email protected]>\r\nCo-authored-by: Andrea
Del Rio
<[email protected]>","sha":"56e1e68b307bc62445f04ae6f443f4854a308547","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","v8.16.0","backport:version"],"title":"[ES|QL]
Present ES|QL as an equal to data views on the \"no data views\"
screen","number":194077,"url":"https://github.com/elastic/kibana/pull/194077","mergeCommit":{"message":"[ES|QL]
Present ES|QL as an equal to data views on the \"no data views\" screen
(#194077)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/176291\r\n\r\n###
Screenshots\r\n\r\n#### Discover/Dashboard/Visualize\r\n<img
width=\"1517\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/c8fb4faf-8d2d-4043-a757-6f092d1fceb3\">\r\n\r\n####
Stack Management > Data view\r\n<img width=\"1519\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bb3f28bd-0ce9-4c49-ace1-1be875e17ba3\">\r\n\r\n####
If User does not have privilege to create a Data View\r\n<img
width=\"1336\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bb3f4cbc-8213-41c0-bf09-bd47a9d264e4\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Use a new SVG resource for the ES|QL illustration\r\n-
[x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Liam Thompson
<[email protected]>\r\nCo-authored-by: Andrea
Del Rio
<[email protected]>","sha":"56e1e68b307bc62445f04ae6f443f4854a308547"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194077","number":194077,"mergeCommit":{"message":"[ES|QL]
Present ES|QL as an equal to data views on the \"no data views\" screen
(#194077)\n\n## Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/176291\r\n\r\n###
Screenshots\r\n\r\n#### Discover/Dashboard/Visualize\r\n<img
width=\"1517\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/c8fb4faf-8d2d-4043-a757-6f092d1fceb3\">\r\n\r\n####
Stack Management > Data view\r\n<img width=\"1519\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bb3f28bd-0ce9-4c49-ace1-1be875e17ba3\">\r\n\r\n####
If User does not have privilege to create a Data View\r\n<img
width=\"1336\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bb3f4cbc-8213-41c0-bf09-bd47a9d264e4\">\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Use a new SVG resource for the ES|QL illustration\r\n-
[x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Liam Thompson
<[email protected]>\r\nCo-authored-by: Andrea
Del Rio
<[email protected]>","sha":"56e1e68b307bc62445f04ae6f443f4854a308547"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Tim Sullivan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ES|QL] Present ES|QL as an equal to data views on the "no data views" screen