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

[Discover] Fix legacy sort parameter provided by URL #134447

Merged
merged 6 commits into from
Jun 24, 2022

Conversation

kertal
Copy link
Member

@kertal kertal commented Jun 15, 2022

Summary

We switched to multisort a long time ago in #41918. Before this change users could just provide one sort parameter. This PR handles the case correctly when there's a legacy sort parameter incoming by the URL. It was broken for a long time, but was not noticed, since it was not possible to unsort the classic table. With the change to classic table, q legacy sort parameter caused the table to be unsorted. This PR takes care of that, by migrating the legacy sort to multisort if needed.

Here's a testable link (containing sort:!(timestamp,desc)) as sort param, which is legacy.

🥣 Deployment with fix

To compare it you can test with an installation where it doesn't work

🥣 Deployment without fix
it's not sorted:
Bildschirmfoto 2022-06-24 um 09 04 14

Fixes #132892

Checklist

@kertal kertal added the Feature:Discover Discover Application label Jun 15, 2022
@kertal kertal self-assigned this Jun 15, 2022
@kertal kertal added the Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. label Jun 15, 2022
@kertal
Copy link
Member Author

kertal commented Jun 20, 2022

@elasticmachine merge upstream

@kertal
Copy link
Member Author

kertal commented Jun 24, 2022

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@kertal kertal marked this pull request as ready for review June 24, 2022 07:05
@kertal kertal requested a review from a team as a code owner June 24, 2022 07:05
@elasticmachine
Copy link
Contributor

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

@kertal kertal changed the title [Discover] Discover fix legacy sort [Discover] Discover fix legacy sort parameter provided by URL Jun 24, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 592 593 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 489.6KB 490.0KB +450.0B

History

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

cc @kertal

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kertal kertal merged commit da85687 into elastic:main Jun 24, 2022
@kertal kertal changed the title [Discover] Discover fix legacy sort parameter provided by URL [Discover] Fix legacy sort parameter provided by URL Jun 24, 2022
@kibanamachine kibanamachine added v8.4.0 backport:skip This commit does not require backporting labels Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Discover Discover Application 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.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sorting does not work in Document Explorer when using a legacy link
6 participants