Skip to content

[Streams 🌊] Reset query value for SearchBar if one is not specified#225773

Merged
tonyghiani merged 1 commit intoelastic:mainfrom
tonyghiani:225668-fix-searchbar-discover
Jun 30, 2025
Merged

[Streams 🌊] Reset query value for SearchBar if one is not specified#225773
tonyghiani merged 1 commit intoelastic:mainfrom
tonyghiani:225668-fix-searchbar-discover

Conversation

@tonyghiani
Copy link
Copy Markdown
Contributor

@tonyghiani tonyghiani commented Jun 30, 2025

📓 Summary

Closes #225668

Given the stateful nature of the unified search bar, when a query property is not specified, it restores the saved value in the session, which coming from ESQL Discover was an esql query.
Since we want want to use queries for the searchbar only when explicitly specified, passing an explicit default value of undefined to the searchbar tells the internal of unified search bar to not restore the previous value.

Screen.Recording.2025-06-30.at.11.01.07.mov

@tonyghiani tonyghiani requested a review from a team as a code owner June 30, 2025 09:06
@tonyghiani tonyghiani added release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project v9.1.0 v8.19.0 labels Jun 30, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

Copy link
Copy Markdown
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested and works as expected with both ESQL and KQL mode, LGTM

@tonyghiani tonyghiani merged commit f0fba49 into elastic:main Jun 30, 2025
24 checks passed
@tonyghiani tonyghiani deleted the 225668-fix-searchbar-discover branch June 30, 2025 11:59
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.1

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

@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.1

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…lastic#225773)

## 📓 Summary

Closes elastic#225668

Given the stateful nature of the unified search bar, when a `query`
property is not specified, it restores the saved value in the session,
which coming from ESQL Discover was an `esql` query.
Since we want want to use queries for the searchbar only when explicitly
specified, passing an explicit default value of undefined to the
searchbar tells the internal of unified search bar to not restore the
previous value.

https://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad
(cherry picked from commit f0fba49)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…lastic#225773)

## 📓 Summary

Closes elastic#225668

Given the stateful nature of the unified search bar, when a `query`
property is not specified, it restores the saved value in the session,
which coming from ESQL Discover was an `esql` query.
Since we want want to use queries for the searchbar only when explicitly
specified, passing an explicit default value of undefined to the
searchbar tells the internal of unified search bar to not restore the
previous value.

https://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad
(cherry picked from commit f0fba49)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…lastic#225773)

## 📓 Summary

Closes elastic#225668

Given the stateful nature of the unified search bar, when a `query`
property is not specified, it restores the saved value in the session,
which coming from ESQL Discover was an `esql` query.
Since we want want to use queries for the searchbar only when explicitly
specified, passing an explicit default value of undefined to the
searchbar tells the internal of unified search bar to not restore the
previous value.

https://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad
(cherry picked from commit f0fba49)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…lastic#225773)

## 📓 Summary

Closes elastic#225668

Given the stateful nature of the unified search bar, when a `query`
property is not specified, it restores the saved value in the session,
which coming from ESQL Discover was an `esql` query.
Since we want want to use queries for the searchbar only when explicitly
specified, passing an explicit default value of undefined to the
searchbar tells the internal of unified search bar to not restore the
previous value.

https://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad
(cherry picked from commit f0fba49)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

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 Jul 1, 2025
…fied (#225773) (#225823)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Streams 🌊] Reset query value for SearchBar if one is not specified
(#225773)](#225773)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2025-06-30T11:59:01Z","message":"[Streams
🌊] Reset query value for SearchBar if one is not specified
(#225773)\n\n## 📓 Summary\n\nCloses #225668 \n\nGiven the stateful
nature of the unified search bar, when a `query`\nproperty is not
specified, it restores the saved value in the session,\nwhich coming
from ESQL Discover was an `esql` query.\nSince we want want to use
queries for the searchbar only when explicitly\nspecified, passing an
explicit default value of undefined to the\nsearchbar tells the internal
of unified search bar to not restore the\nprevious
value.\n\n\nhttps://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad","sha":"f0fba49056c80a15701f111d52627771887d7b72","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","Feature:Streams","v9.1.0","v8.19.0","v9.2.0"],"title":"[Streams
🌊] Reset query value for SearchBar if one is not
specified","number":225773,"url":"https://github.com/elastic/kibana/pull/225773","mergeCommit":{"message":"[Streams
🌊] Reset query value for SearchBar if one is not specified
(#225773)\n\n## 📓 Summary\n\nCloses #225668 \n\nGiven the stateful
nature of the unified search bar, when a `query`\nproperty is not
specified, it restores the saved value in the session,\nwhich coming
from ESQL Discover was an `esql` query.\nSince we want want to use
queries for the searchbar only when explicitly\nspecified, passing an
explicit default value of undefined to the\nsearchbar tells the internal
of unified search bar to not restore the\nprevious
value.\n\n\nhttps://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad","sha":"f0fba49056c80a15701f111d52627771887d7b72"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225773","number":225773,"mergeCommit":{"message":"[Streams
🌊] Reset query value for SearchBar if one is not specified
(#225773)\n\n## 📓 Summary\n\nCloses #225668 \n\nGiven the stateful
nature of the unified search bar, when a `query`\nproperty is not
specified, it restores the saved value in the session,\nwhich coming
from ESQL Discover was an `esql` query.\nSince we want want to use
queries for the searchbar only when explicitly\nspecified, passing an
explicit default value of undefined to the\nsearchbar tells the internal
of unified search bar to not restore the\nprevious
value.\n\n\nhttps://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad","sha":"f0fba49056c80a15701f111d52627771887d7b72"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
kibanamachine added a commit that referenced this pull request Jul 1, 2025
…ified (#225773) (#225822)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Streams 🌊] Reset query value for SearchBar if one is not specified
(#225773)](#225773)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2025-06-30T11:59:01Z","message":"[Streams
🌊] Reset query value for SearchBar if one is not specified
(#225773)\n\n## 📓 Summary\n\nCloses #225668 \n\nGiven the stateful
nature of the unified search bar, when a `query`\nproperty is not
specified, it restores the saved value in the session,\nwhich coming
from ESQL Discover was an `esql` query.\nSince we want want to use
queries for the searchbar only when explicitly\nspecified, passing an
explicit default value of undefined to the\nsearchbar tells the internal
of unified search bar to not restore the\nprevious
value.\n\n\nhttps://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad","sha":"f0fba49056c80a15701f111d52627771887d7b72","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","Feature:Streams","v9.1.0","v8.19.0","v9.2.0"],"title":"[Streams
🌊] Reset query value for SearchBar if one is not
specified","number":225773,"url":"https://github.com/elastic/kibana/pull/225773","mergeCommit":{"message":"[Streams
🌊] Reset query value for SearchBar if one is not specified
(#225773)\n\n## 📓 Summary\n\nCloses #225668 \n\nGiven the stateful
nature of the unified search bar, when a `query`\nproperty is not
specified, it restores the saved value in the session,\nwhich coming
from ESQL Discover was an `esql` query.\nSince we want want to use
queries for the searchbar only when explicitly\nspecified, passing an
explicit default value of undefined to the\nsearchbar tells the internal
of unified search bar to not restore the\nprevious
value.\n\n\nhttps://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad","sha":"f0fba49056c80a15701f111d52627771887d7b72"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225773","number":225773,"mergeCommit":{"message":"[Streams
🌊] Reset query value for SearchBar if one is not specified
(#225773)\n\n## 📓 Summary\n\nCloses #225668 \n\nGiven the stateful
nature of the unified search bar, when a `query`\nproperty is not
specified, it restores the saved value in the session,\nwhich coming
from ESQL Discover was an `esql` query.\nSince we want want to use
queries for the searchbar only when explicitly\nspecified, passing an
explicit default value of undefined to the\nsearchbar tells the internal
of unified search bar to not restore the\nprevious
value.\n\n\nhttps://github.com/user-attachments/assets/7525d950-4ce3-481e-bc45-13fe0edb79ad","sha":"f0fba49056c80a15701f111d52627771887d7b72"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
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 Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Moving from ESQL Discover to Streams breaks UI

4 participants