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

fix(explore): Preserve sort when adding group by #81258

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

Zylphrex
Copy link
Member

We use the first available option to sort when there's no sort specified. In aggregate mode, when adding a group by, the first option changes from the aggregate function to the group by field thus implicitly changing the sort. This ensures that the aggregate functions are higher in the list so the default sort doesnt change when the group by changes.

We use the first available option to sort when there's no sort specified. In
aggregate mode, when adding a group by, the first option changes from the
aggregate function to the group by field thus implicitly changing the sort. This
ensures that the aggregate functions are higher in the list so the default sort
doesnt change when the group by changes.
@Zylphrex Zylphrex requested a review from a team as a code owner November 25, 2024 19:02
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
static/app/views/explore/toolbar/index.tsx 60.00% 2 Missing ⚠️
static/app/views/explore/tables/spansTable.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #81258      +/-   ##
==========================================
- Coverage   80.34%   80.34%   -0.01%     
==========================================
  Files        7219     7220       +1     
  Lines      319544   319570      +26     
  Branches    20779    20783       +4     
==========================================
+ Hits       256736   256752      +16     
- Misses      62417    62427      +10     
  Partials      391      391              

@Zylphrex Zylphrex merged commit 5a93960 into master Nov 25, 2024
44 of 45 checks passed
@Zylphrex Zylphrex deleted the txiao/fix/preserve-sort-when-adding-group-by branch November 25, 2024 20:29
andrewshie-sentry pushed a commit that referenced this pull request Dec 2, 2024
We use the first available option to sort when there's no sort
specified. In aggregate mode, when adding a group by, the first option
changes from the aggregate function to the group by field thus
implicitly changing the sort. This ensures that the aggregate functions
are higher in the list so the default sort doesnt change when the group
by changes.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants