Skip to content

feat(annotations): Summarize annotations on spans, tables, project header #7247

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

Conversation

cephalization
Copy link
Contributor

@cephalization cephalization commented Apr 22, 2025

Resolves #7002

@@ -30,8 +30,6 @@ export const ContinuousAnnotationInput = forwardRef<
},
ref
) => {
// step should be 1 if the min and max end in .0, .1 otherwise
const step = (annotationConfig?.lowerBound ?? 0) % 1 === 0 ? 1 : 0.1;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This actually prevents users from typing in non-stepped values, not sure why I thought otherwise. Maybe its a react aria behavior

@@ -52,6 +52,7 @@ export function SpanAnnotationActionMenu(props: SpanAnnotationActionMenuProps) {
node(id: $spanId) {
... on Span {
...SpanAnnotationsEditor_spanAnnotations
...SpanFeedback_annotations
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes the span feedback table reload when annotations are deleted

@@ -281,6 +281,7 @@ function SpanAnnotationsList(props: {
query {
node(id: $spanId) {
... on Span {
...TraceHeaderRootSpanAnnotationsFragment
Copy link
Contributor Author

Choose a reason for hiding this comment

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

reload stats on the trace details slideover when annotations are mutated

@cephalization cephalization force-pushed the cephalization/annotations/7002-annotation-summary branch from 80a1c79 to 88e8ea0 Compare April 23, 2025 14:35
@cephalization cephalization marked this pull request as ready for review April 23, 2025 20:05
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Apr 23, 2025
@cephalization cephalization force-pushed the cephalization/annotations/7002-annotation-summary branch from ecb3cee to e57d853 Compare April 23, 2025 20:07
@cephalization cephalization force-pushed the cephalization/annotations/7002-annotation-summary branch from d9c3040 to e073b94 Compare April 25, 2025 16:38
@mikeldking
Copy link
Contributor

Screenshot 2025-04-28 at 1 57 08 PM The spacing in the TraceHeader should be even here.

Comment on lines 79 to 82
/** Override clickable detection. By default, clickable will only be true if onClick is provided. */
clickable?: boolean;
/** Whether to show the click affordance icon when clickable is true. */
showClickableIcon?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

this feels really confusing. I don't get this permutation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to add more customization to this component while keeping it backwards compatible, since it is used in a bunch of places.

I updated the comments to be clearer about their intention

span: AnnotationSummaryGroup$key;
showFilterActions?: boolean;
renderEmptyState?: () => React.ReactNode;
variant?: "stacked" | "pills";
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a gut reaction this feels a bit overloaded - I get that they are the same thing sorta but it's a bit tough since I would never advise to add another variant here and there's other sizing constraints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've split this up into multiple components with a shared hook

@github-project-automation github-project-automation bot moved this from 📘 Todo to 👍 Approved in phoenix Apr 28, 2025
- Split AnnotationSummaryGroup into two components with shared hook
- Tweak padding
- Remove Pie chart from annotation token
@cephalization cephalization merged commit 7e2599a into feat/annotations Apr 29, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from 👍 Approved to ✅ Done in phoenix Apr 29, 2025
@cephalization cephalization deleted the cephalization/annotations/7002-annotation-summary branch April 29, 2025 14:47
efontan-dialpad pushed a commit to gluru/phoenix that referenced this pull request May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants