Skip to content

Conversation

@jughosta
Copy link
Contributor

@jughosta jughosta commented Jul 25, 2025

Summary

When user creates a new tab, depending on the last active tab we can define the initial state for it:

  • if last active tab was in ES|QL mode, the new tab will be also in ES|QL mode with the same data source as before
  • if last active tab was in Classic mode, the new tab will be also in Classic mode with the same selected data view as before.

So this logic was mainly based on how "New" action works for Discover Sessions in general. Now same for new tabs.

Testing

To enable tabs in Discover, run localStorage.setItem('discoverExperimental:tabs', 'true') in browser Console and refresh the page.

Checklist

@jughosta jughosta self-assigned this Jul 25, 2025
@jughosta jughosta added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Project:OneDiscover Enrich Discover with contextual awareness labels Jul 25, 2025
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#8964

[✅] src/platform/test/functional/apps/discover/tabs/config.ts: 10/10 tests passed.

see run history

@jughosta jughosta marked this pull request as ready for review August 1, 2025 13:30
@jughosta jughosta requested a review from a team as a code owner August 1, 2025 13:30
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #40 / discover/group1 discover histogram should reset all histogram state when resetting the saved search

Metrics [docs]

Async chunks

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

id before after diff
discover 1.1MB 1.1MB -38.0B

History

cc @jughosta

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.

Code LGTM, tested locally and works as expected, it's a nice UX enhancement 👍

@jughosta jughosta merged commit 6b2ce14 into elastic:main Aug 6, 2025
12 checks passed
@jughosta jughosta deleted the 228793-esql-in-new-tab branch August 6, 2025 08:02
gergoabraham pushed a commit to gergoabraham/kibana that referenced this pull request Aug 7, 2025
…y mode (elastic#229482)

- Closes elastic#228793

## Summary

When user creates a new tab, depending on the last active tab we can
define the initial state for it:
- if last active tab was in ES|QL mode, the new tab will be also in
ES|QL mode with the same data source as before
- if last active tab was in Classic mode, the new tab will be also in
Classic mode with the same selected data view as before.

So this logic was mainly based on how "New" action works for Discover
Sessions in general. Now same for new tabs.

### Testing

To enable tabs in Discover, run
`localStorage.setItem('discoverExperimental:tabs', 'true')` in browser
Console and refresh the page.


### Checklist

- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
@wildemat wildemat mentioned this pull request Aug 7, 2025
10 tasks
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…y mode (elastic#229482)

- Closes elastic#228793

## Summary

When user creates a new tab, depending on the last active tab we can
define the initial state for it:
- if last active tab was in ES|QL mode, the new tab will be also in
ES|QL mode with the same data source as before
- if last active tab was in Classic mode, the new tab will be also in
Classic mode with the same selected data view as before.

So this logic was mainly based on how "New" action works for Discover
Sessions in general. Now same for new tabs.

### Testing

To enable tabs in Discover, run
`localStorage.setItem('discoverExperimental:tabs', 'true')` in browser
Console and refresh the page.


### Checklist

- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Project:OneDiscover Enrich Discover with contextual awareness release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discover Tabs] After switching to ES|QL mode, create new tabs in ES|QL mode too

4 participants