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

Restore dashboard \ visualization lists "sorting while searching" behavior #32583

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Mar 6, 2019

Summary

PR resolves the sorting issues mentioned in #31599

The behavior it restores is -

  • The table should appear sorted alphabetically when there's no search query,
  • The table should use elastic search sorting, when query is present,
  • When the query is cleared, alphabetic order should be restored.

This was done by actually removing initial sorting state from table (because the table state should represent user actions), and sorting the items before passing them down to InMemoryTable in case the query is empty.

P.S. once Kibana uses EUI 9.0.1, users will also be able to unsort a sorted column.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

@lizozom lizozom added regression EUI Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Mar 6, 2019
@lizozom lizozom self-assigned this Mar 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@lizozom lizozom changed the title presort items if there's no search query, but keep table state unsorted Restore dashboard \ visualization lists "sorting while searching behavior Mar 6, 2019
@lizozom lizozom changed the title Restore dashboard \ visualization lists "sorting while searching behavior Restore dashboard \ visualization lists "sorting while searching" behavior Mar 6, 2019
@lizozom lizozom requested review from timroes and flash1293 and removed request for timroes March 6, 2019 19:20
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

One small thing which is a bit off is that if the list is loaded the first time, its seems to be not sorted and the first click to the title header doesn't do anything - ideally it would show as sorted ascending and reset to 'unsorted' as soon as the user starts entering a query. But IMHO that isn't too bad, so LGTM 👍

@lizozom
Copy link
Contributor Author

lizozom commented Mar 7, 2019

@flash1293 Thanks!

I agree with you, but there was a long discussion here and on the kibana design slack channel, about the fact that sorting should reflect user actions, and that if the table appears sorted, it shouldn't be "unsorted" by search.

We'll see where it goes :)

@elasticmachine
Copy link
Contributor

Pinging @elastic/eui-design (EUI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EUI regression Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants