OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

[BUG] Sort columns says A-Z and Z-A for non-string fields

Open brucejxz opened this issue 9 months ago • 1 comments

Describe the bug

When selecting a column in the "New Discover" experience in 2.13.0, the sort options for non-string fields are still:

  • Sort A-Z
  • Sort Z-A

To Reproduce Steps to reproduce the behavior:

  1. Disable legacy discover
  2. Add a non-string (int, datetime etc.) field to the table
  3. Click on the field header

Expected behavior For datetime fields it would be a much nicer experience if the options were something like "Sort newest", "Sort oldest". And for number fields, perhaps something like "Sort largest" and "Sort smallest".

OpenSearch Version 2.13.0

Dashboards Version 2.13.0

Plugins

Reproducible at: https://playground.opensearch.org

Screenshots

Screenshot 2024-04-27 at 16 33 31

Host/Environment (please complete the following information):

  • OS: macOS 14.4
  • Browser and version: Safari 17.4

Additional context

N/A

brucejxz avatar Apr 27 '24 15:04 brucejxz

Confirmed the bug, for the new discover table, the sorting string say 'sort A-Z' or 'sort Z-A' for all the columns; for the legacy table, it says 'sort ascending' or 'sort descending'. The sorting functionality still works.

@opensearch-project/opensearch-ux what should we modify the sorting UI here for the new discover table?

abbyhu2000 avatar May 14 '24 17:05 abbyhu2000