Skip to content

[Discover] Display a warning and a tooltip for the _score column in the grid#211013

Merged
rbrtj merged 4 commits intoelastic:mainfrom
rbrtj:discover-add-warning-tooltip-for-score-column
Feb 17, 2025
Merged

[Discover] Display a warning and a tooltip for the _score column in the grid#211013
rbrtj merged 4 commits intoelastic:mainfrom
rbrtj:discover-add-warning-tooltip-for-score-column

Conversation

@rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Feb 13, 2025

Resolves: #167271

Screen.Recording.2025-02-13.at.14.47.50.mov
@rbrtj rbrtj added release_note:enhancement Feature:Discover Discover Application enhancement New value added to drive a business result Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// papercut Small "burr" in the product that we should fix. backport:version Backport to applied version labels v9.1.0 labels Feb 13, 2025
@rbrtj rbrtj self-assigned this Feb 13, 2025
@rbrtj rbrtj requested review from a team as code owners February 13, 2025 13:53
@elasticmachine
Copy link
Contributor

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

@rbrtj rbrtj added the v8.19.0 label Feb 13, 2025
@kertal
Copy link
Member

kertal commented Feb 14, 2025

thx a lot @rbrtj, I didn't have the time to review, but our team will certainly take care of it ... just one question, do you have an idea why the async bundle is increased by 8.7 kb? it seems the change is adding 1 kb by each DataView usage, not a blocker, just thinking

Copy link
Contributor

@akowalska622 akowalska622 left a comment

Choose a reason for hiding this comment

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

LGTM and works as expected, just minor nit added

Comment on lines 149 to 156
dataView: DataView;
columnName: string;
columnDisplayName: string;
showColumnTokens?: boolean;
isSorted?: boolean;
columnsMeta?: DataTableColumnsMeta;
headerRowHeight?: number;
}) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency with DataTableColumnHeaderProps can we extract it to interface?
Also they both look pretty similar, I believe we can just extend DataTableColumnHeaderProps by isSorted, what do you think?

interface ExtendedDataTableColumnHeaderProps extends DataTableColumnHeaderProps {
  isSorted?: boolean;
}

I leave interface name up to you

Copy link
Contributor

Choose a reason for hiding this comment

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

Or just extending it inline

export const DataTableScoreColumnHeader = ({
  isSorted,
  showColumnTokens,
  columnName,
  columnsMeta,
  dataView,
  headerRowHeight,
  columnDisplayName,
}: DataTableColumnHeaderProps & { isSorted?: boolean }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, updated in be53508

@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
cloudSecurityPosture 538.3KB 539.2KB +980.0B
discover 847.9KB 848.9KB +1.0KB
esqlDataGrid 191.4KB 192.3KB +979.0B
securitySolution 22.3MB 22.3MB +4.8KB
slo 878.9KB 879.8KB +980.0B
total +8.7KB

History

cc @rbrtj

@kertal
Copy link
Member

kertal commented Feb 17, 2025

one thing: I think this should be a backport:skip, it's an enhancement

@rbrtj rbrtj added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels v8.19.0 labels Feb 17, 2025
@rbrtj rbrtj merged commit 67f6fd3 into elastic:main Feb 17, 2025
13 checks passed
@davismcphee davismcphee added backport:version Backport to applied version labels v8.19.0 and removed backport:skip This PR does not require backporting labels Mar 5, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@davismcphee
Copy link
Contributor

After some discussions, we've learned we should be backporting new work to 8.19 where possible. I updated the labels on this one to trigger a backport to 8.19.

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 6, 2025
…umn in the grid (#211013) (#213296)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Discover] Display a warning and a tooltip for the `_score` column in
the grid (#211013)](#211013)

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

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

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-17T12:22:33Z","message":"[Discover]
Display a warning and a tooltip for the `_score` column in the grid
(#211013)\n\nResolves:
https://github.com/elastic/kibana/issues/167271\n\n\n\nhttps://github.com/user-attachments/assets/f21be330-a85d-471c-a6c3-d172ff7a15d2","sha":"67f6fd3ec87eb41cfdbc89cee9a5cfa9f1bf2061","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:Discover","enhancement","Team:DataDiscovery","papercut","backport:version","v9.1.0","v8.19.0"],"title":"[Discover]
Display a warning and a tooltip for the `_score` column in the
grid","number":211013,"url":"https://github.com/elastic/kibana/pull/211013","mergeCommit":{"message":"[Discover]
Display a warning and a tooltip for the `_score` column in the grid
(#211013)\n\nResolves:
https://github.com/elastic/kibana/issues/167271\n\n\n\nhttps://github.com/user-attachments/assets/f21be330-a85d-471c-a6c3-d172ff7a15d2","sha":"67f6fd3ec87eb41cfdbc89cee9a5cfa9f1bf2061"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211013","number":211013,"mergeCommit":{"message":"[Discover]
Display a warning and a tooltip for the `_score` column in the grid
(#211013)\n\nResolves:
https://github.com/elastic/kibana/issues/167271\n\n\n\nhttps://github.com/user-attachments/assets/f21be330-a85d-471c-a6c3-d172ff7a15d2","sha":"67f6fd3ec87eb41cfdbc89cee9a5cfa9f1bf2061"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.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 enhancement New value added to drive a business result Feature:Discover Discover Application papercut Small "burr" in the product that we should fix. release_note:enhancement 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

6 participants