Skip to content

[DataView] Fix inability to clear Document ID in data view field editor preview#220891

Merged
kertal merged 3 commits intoelastic:mainfrom
kertal:data-view-field-preview-doc-id-fix
May 20, 2025
Merged

[DataView] Fix inability to clear Document ID in data view field editor preview#220891
kertal merged 3 commits intoelastic:mainfrom
kertal:data-view-field-preview-doc-id-fix

Conversation

@kertal
Copy link
Member

@kertal kertal commented May 19, 2025

Summary

Resolves #151245

With this PR the Document ID can be cleared in the data view field editor preview. Before it was just reset to the original ID. Here's a video showing how the id can be cleared

CleanShot.2025-05-19.at.11.52.21.mp4

Checklist

@kertal
Copy link
Member Author

kertal commented May 19, 2025

/ci

@kertal kertal self-assigned this May 19, 2025
@kertal kertal added Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// release_note:fix backport:version Backport to applied version labels v9.1.0 v8.19.0 labels May 19, 2025
@kertal kertal changed the title [DataView] Fix Preview Doc Id behavior May 19, 2025
@kertal kertal marked this pull request as ready for review May 19, 2025 09:56
@kertal kertal requested a review from a team as a code owner May 19, 2025 09:56
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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
dataViewFieldEditor 157.8KB 157.9KB +43.0B

History

cc @kertal

@kertal
Copy link
Member Author

kertal commented May 20, 2025

@AlexGPlay confirmed, looking better now with the enhanced jest tests. merging

@kertal kertal merged commit 288a479 into elastic:main May 20, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 20, 2025
…or preview (elastic#220891)

Previously, clearing the document ID in the data-view field editor preview always reset it back to the original value. This change updates the preview logic so that an empty ID can be entered

(cherry picked from commit 288a479)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

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 May 20, 2025
…ld editor preview (#220891) (#220970)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[DataView] Fix inability to clear document ID in data view field
editor preview (#220891)](#220891)

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

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

<!--BACKPORT [{"author":{"name":"Matthias
Wilhelm","email":"matthias.wilhelm@elastic.co"},"sourceCommit":{"committedDate":"2025-05-20T09:01:58Z","message":"[DataView]
Fix inability to clear document ID in data view field editor preview
(#220891)\n\nPreviously, clearing the document ID in the data-view field
editor preview always reset it back to the original value. This change
updates the preview logic so that an empty ID can be
entered","sha":"288a479d13b4ba538805bde7efcb9829bdd76fc6","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Data
Views","Team:DataDiscovery","backport:version","v9.1.0","v8.19.0"],"title":"[DataView]
Fix inability to clear Document ID in data view field editor
preview","number":220891,"url":"https://github.com/elastic/kibana/pull/220891","mergeCommit":{"message":"[DataView]
Fix inability to clear document ID in data view field editor preview
(#220891)\n\nPreviously, clearing the document ID in the data-view field
editor preview always reset it back to the original value. This change
updates the preview logic so that an empty ID can be
entered","sha":"288a479d13b4ba538805bde7efcb9829bdd76fc6"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220891","number":220891,"mergeCommit":{"message":"[DataView]
Fix inability to clear document ID in data view field editor preview
(#220891)\n\nPreviously, clearing the document ID in the data-view field
editor preview always reset it back to the original value. This change
updates the preview logic so that an empty ID can be
entered","sha":"288a479d13b4ba538805bde7efcb9829bdd76fc6"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…or preview (elastic#220891)

Previously, clearing the document ID in the data-view field editor preview always reset it back to the original value. This change updates the preview logic so that an empty ID can be entered
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
…or preview (elastic#220891)

Previously, clearing the document ID in the data-view field editor preview always reset it back to the original value. This change updates the preview logic so that an empty ID can be entered
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:Data Views Data Views code and UI - index patterns before 8.0 release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.19.0 v9.1.0

4 participants