Skip to content

feat(trace-eap-waterfall): Sorting attributes. #91814

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

Merged
merged 1 commit into from
May 16, 2025
Merged

Conversation

Abdkhan14
Copy link
Contributor

Screenshot 2025-05-16 at 2 33 50 PM

@Abdkhan14 Abdkhan14 requested a review from a team as a code owner May 16, 2025 18:34
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 16, 2025
Comment on lines +93 to +99
if (aIsSpan && !bIsSpan) {
return -1;
}
if (!aIsSpan && bIsSpan) {
return 1;
}
return a.name.localeCompare(b.name);
Copy link
Contributor

@DominikB2014 DominikB2014 May 16, 2025

Choose a reason for hiding this comment

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

Suggested change
if (aIsSpan && !bIsSpan) {
return -1;
}
if (!aIsSpan && bIsSpan) {
return 1;
}
return a.name.localeCompare(b.name);
return (bIsSpan - aIsSpan) || a.name.localeCompare(b.name);

I think this works, bit more concise, slightly harder to read

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah a lil bit harder to read imo 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to ignore, i like the readable one

@Abdkhan14 Abdkhan14 enabled auto-merge (squash) May 16, 2025 18:38
@Abdkhan14 Abdkhan14 merged commit 65012d6 into master May 16, 2025
43 checks passed
@Abdkhan14 Abdkhan14 deleted the abdk/trace-attrs-sort branch May 16, 2025 18:49
andrewshie-sentry pushed a commit that referenced this pull request May 20, 2025
<img width="816" alt="Screenshot 2025-05-16 at 2 33 50 PM"
src="https://github.com/user-attachments/assets/8aaaa9cb-f6f2-4339-9364-0cf1f8a7af62"
/>

Co-authored-by: Abdullah Khan <abdullahkhan@PG9Y57YDXQ.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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