-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][Discover] Show all non-empty values in the grid #178692
Conversation
/ci |
💚 Build Succeeded
Metrics [docs]Async chunks
To update your PR or re-run it, just comment with: cc @jughosta |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected, thanks for fixing it! LGTM 👍
@@ -66,7 +66,7 @@ export function SourceDocument({ | |||
{pairs.map(([fieldDisplayName, value, fieldName]) => { | |||
// temporary solution for text based mode. As there are a lot of unsupported fields we want to | |||
// hide the empty one from the Document view | |||
if (isPlainRecord && fieldName && !row.flattened[fieldName]) return null; | |||
if (isPlainRecord && fieldName && (row.flattened[fieldName] ?? null) === null) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (isPlainRecord && fieldName && (row.flattened[fieldName] ?? null) === null) return null; | |
if (isPlainRecord && fieldName && row.flattened[fieldName] == null) return null; |
Nit: personally I would find this easier to read, but I don't feel strongly about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
- Followup for elastic#174585 ## Summary This PR hides only `null`, `undefined` values and keeps `false`, `0`, `(empty)`. Before: <img width="500" alt="Screenshot 2024-03-14 at 10 07 13" src="https://github.com/elastic/kibana/assets/1415710/c5d49362-09e3-48f2-9ecc-247560950d68"> After: <img width="500" alt="Screenshot 2024-03-14 at 10 06 25" src="https://github.com/elastic/kibana/assets/1415710/3c1adcfd-bec9-4b4a-b94f-78b1d916e9dd"> (cherry picked from commit 4ae02b0)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…) (#178815) # Backport This will backport the following commits from `main` to `8.13`: - [[ES|QL][Discover] Show all non-empty values in the grid (#178692)](#178692) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2024-03-15T12:14:17Z","message":"[ES|QL][Discover] Show all non-empty values in the grid (#178692)\n\n- Followup for https://github.com/elastic/kibana/pull/174585\r\n\r\n## Summary\r\n\r\nThis PR hides only `null`, `undefined` values and keeps `false`, `0`,\r\n`(empty)`.\r\n\r\nBefore:\r\n<img width=\"500\" alt=\"Screenshot 2024-03-14 at 10 07 13\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1415710/c5d49362-09e3-48f2-9ecc-247560950d68\">\r\n\r\nAfter:\r\n<img width=\"500\" alt=\"Screenshot 2024-03-14 at 10 06 25\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1415710/3c1adcfd-bec9-4b4a-b94f-78b1d916e9dd\">","sha":"4ae02b02b918f42244d35482b51b506d18ac8e18","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:prev-minor","Feature:ES|QL","v8.14.0"],"title":"[ES|QL][Discover] Show all non-empty values in the grid","number":178692,"url":"https://github.com/elastic/kibana/pull/178692","mergeCommit":{"message":"[ES|QL][Discover] Show all non-empty values in the grid (#178692)\n\n- Followup for https://github.com/elastic/kibana/pull/174585\r\n\r\n## Summary\r\n\r\nThis PR hides only `null`, `undefined` values and keeps `false`, `0`,\r\n`(empty)`.\r\n\r\nBefore:\r\n<img width=\"500\" alt=\"Screenshot 2024-03-14 at 10 07 13\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1415710/c5d49362-09e3-48f2-9ecc-247560950d68\">\r\n\r\nAfter:\r\n<img width=\"500\" alt=\"Screenshot 2024-03-14 at 10 06 25\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1415710/3c1adcfd-bec9-4b4a-b94f-78b1d916e9dd\">","sha":"4ae02b02b918f42244d35482b51b506d18ac8e18"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178692","number":178692,"mergeCommit":{"message":"[ES|QL][Discover] Show all non-empty values in the grid (#178692)\n\n- Followup for https://github.com/elastic/kibana/pull/174585\r\n\r\n## Summary\r\n\r\nThis PR hides only `null`, `undefined` values and keeps `false`, `0`,\r\n`(empty)`.\r\n\r\nBefore:\r\n<img width=\"500\" alt=\"Screenshot 2024-03-14 at 10 07 13\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1415710/c5d49362-09e3-48f2-9ecc-247560950d68\">\r\n\r\nAfter:\r\n<img width=\"500\" alt=\"Screenshot 2024-03-14 at 10 06 25\"\r\nsrc=\"https://github.com/elastic/kibana/assets/1415710/3c1adcfd-bec9-4b4a-b94f-78b1d916e9dd\">","sha":"4ae02b02b918f42244d35482b51b506d18ac8e18"}}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Summary
This PR hides only
null
,undefined
values and keepsfalse
,0
,(empty)
.Before:
After: