Skip to content

[SIP-168] Alphabetically sorted columns & metrics in explore #33352

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

Open
vanaigr opened this issue May 3, 2025 · 5 comments
Open

[SIP-168] Alphabetically sorted columns & metrics in explore #33352

vanaigr opened this issue May 3, 2025 · 5 comments
Labels
design:proposal Design proposals explore:sort Related to sorting in Explore sip Superset Improvement Proposal

Comments

@vanaigr
Copy link

vanaigr commented May 3, 2025

[SIP] Proposal for alphabetically sorted columns & metrics in explore

Motivation

Currently, the order of columns is not deterministic,
There is some prioritization, e.g. for datetime and certified columns,
but all other columns are shown in the order returned by the db, which is not guaranteed to be the same.
See: #33140 (comment)

Proposed Change

See: #33140

Display metrics and columns in alphabetical order. Keep certified columns on top, but sort them as well.

Left image is before, right is after:

image image

From: #33140

New or Changed Public Interfaces

DatasourcePanel logic will be changed to sort the columns alphabetically.

New dependencies

None.

Migration Plan and Compatibility

None.

Rejected Alternatives

None.

@vanaigr vanaigr added the sip Superset Improvement Proposal label May 3, 2025
@dosubot dosubot bot added design:proposal Design proposals explore:sort Related to sorting in Explore labels May 3, 2025
@sadpandajoe
Copy link
Member

Any reason why we wouldn't add what we have for sql lab where we can have the default order as is, and then allow a user to sort alphabetically or reverse alphabetically? This should give users a bit more control on what they want to see or not.

Image

@rusackas rusackas changed the title [SIP] Alphabetically sorted columns & metrics in explore [SIP-168] Alphabetically sorted columns & metrics in explore May 5, 2025
@vanaigr
Copy link
Author

vanaigr commented May 7, 2025

Any reason why we wouldn't add what we have for sql lab where we can have the default order as is, and then allow a user to sort alphabetically or reverse alphabetically? This should give users a bit more control on what they want to see or not.

I can add that, though I'm not sure where the button would best fit.

I assume it would switch to sorting by id in the metadata?

@rusackas
Copy link
Member

rusackas commented May 7, 2025

I don't see a DISCUSS thread on the dev@ mailing list. You'll need to do that, or this may eventually be closed as abandoned.

@vanaigr
Copy link
Author

vanaigr commented May 7, 2025

I don't see a DISCUSS thread on the dev@ mailing list. You'll need to do that, or this may eventually be closed as abandoned.

Do I need to do something other than this?

Image

@rusackas rusackas moved this from Pre-discussion to [DISCUSS] thread opened in SIPs (Superset Improvement Proposals) May 21, 2025
@rusackas
Copy link
Member

I somehow missed it since the number wasn't in the title 😅

Maybe @kasiazjc can provide a mockup of how we'd want to add/design the controls for this. Once we all agree on design, we can certainly put this up for a [VOTE] thread. If you already have code around this, you're welcome to open a Draft PR as a POC, btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design:proposal Design proposals explore:sort Related to sorting in Explore sip Superset Improvement Proposal
Projects
Status: [DISCUSS] thread opened
Development

No branches or pull requests

3 participants