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

Modern UI: Can't sort columns on statistics page and downloaded report #2449

Closed
2 tasks done
zifter opened this issue Nov 7, 2023 · 5 comments
Closed
2 tasks done
Labels

Comments

@zifter
Copy link

zifter commented Nov 7, 2023

Prerequisites

Description

In the new Web UI\Modern UI there is no ability to sort columns in statistics tab. It was possible in the old interface.

Command line

does not matter

Locustfile contents

does not matter

Python version

3.11

Locust version

2.18.1

Operating system

linux\chrome

@zifter zifter added the bug label Nov 7, 2023
@cyberw
Copy link
Collaborator

cyberw commented Nov 7, 2023

@andrewbaldwin44 is this something you could have a look at?

@andrewbaldwin44
Copy link
Collaborator

I wasn't even aware this was a feature! I think it's not very obvious that clicking on table columns will change how the table is displayed. There also appears to be some broken logic with the 'reverse' aspect of this feature:

var desc = false;

$("#stats .stats_label").click(function(event) {
    event.preventDefault();
    sortAttribute = $(this).attr("data-sortkey");
    desc = !desc;
    renderTable(window.report);
});

This code makes it so that when any column is clicked, the order is reversed (i.e. if you want to sort by method, then change your mind and sort by name, you would get reverse alphabetical order)

I would propose to do something such as a dropdown for sorting:
image

@cyberw @zifter What do you prefer? Do you prefer I re-introduce the logic from the old UI as is or could we consider an enhancement?

@zifter
Copy link
Author

zifter commented Nov 7, 2023

@andrewbaldwin44 I'm used to a pretty common UX pattern of sorting data in the table by clicking on the header. You can find it everywhere, for example - in Excel, Google Sheets, pgAdmin and etc.
As a good reference that describes a little bit about that UX pattern:

Here is a great example that I find very convenient to use (but lacks some important marks which are showing current ordering):
https://codepen.io/nandirchrd/pen/vYWBKxY

So, as for me, I prefer to reimplement old logic with the latest UX best practices).

@cyberw
Copy link
Collaborator

cyberw commented Nov 7, 2023

I think I prefer something like:

  • First click (on any column) sort descending (like in old UI)
  • Second click (on same column) sort ascending
  • Third click (on same column) revert to default order

And a small indicator (up/down arrow) that the column is sorted.

But it is not urgent or anything.

@cyberw
Copy link
Collaborator

cyberw commented Nov 12, 2023

Fixed in 2.18.3!

@cyberw cyberw closed this as completed Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants