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][Discover] Show all non-empty values in the grid #178692

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Mar 14, 2024

Summary

This PR hides only null, undefined values and keeps false, 0, (empty).

Before:
Screenshot 2024-03-14 at 10 07 13

After:
Screenshot 2024-03-14 at 10 06 25

@jughosta jughosta added release_note:fix Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:ES|QL ES|QL related features in Kibana labels Mar 14, 2024
@jughosta jughosta self-assigned this Mar 14, 2024
@jughosta
Copy link
Contributor Author

/ci

@jughosta jughosta changed the title [ES|QL][Discover] Show all non-null values in the grid [ES|QL][Discover] Show all non-empty values in the grid Mar 14, 2024
@kibana-ci
Copy link
Collaborator

💚 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
cloudSecurityPosture 415.1KB 415.2KB +53.0B
discover 581.5KB 581.5KB +53.0B
logsExplorer 1.1MB 1.1MB +53.0B
observability 896.2KB 896.3KB +53.0B
total +212.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jughosta

@jughosta jughosta marked this pull request as ready for review March 14, 2024 10:24
@jughosta jughosta requested a review from a team as a code owner March 14, 2024 10:24
@elasticmachine
Copy link
Contributor

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

@jughosta jughosta requested a review from stratoula March 14, 2024 16:59
Copy link
Contributor

@davismcphee davismcphee left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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.

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

Nice

@jughosta jughosta merged commit 4ae02b0 into elastic:main Mar 15, 2024
25 checks passed
@jughosta jughosta deleted the esql-show-values branch March 15, 2024 12:14
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 15, 2024
- 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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.13

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 Mar 15, 2024
…) (#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:ES|QL ES|QL related features in Kibana release_note:fix Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.13.0 v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants