Skip to content

[FEATURE] Add annotation support#120

Merged
Gladorme merged 13 commits into
perses:mainfrom
Gladorme:annotations
Jun 11, 2026
Merged

[FEATURE] Add annotation support#120
Gladorme merged 13 commits into
perses:mainfrom
Gladorme:annotations

Conversation

@Gladorme

@Gladorme Gladorme commented Apr 27, 2026

Copy link
Copy Markdown
Member

Description

Adding Annotation support with Provider, Editor, ...

PR related to:

Screenshots

image

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • E2E tests are stable and unlikely to be flaky.
    See e2e docs for more details. Common issues include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

Comment thread dashboards/src/components/Annotations/AnnotationsEditor.tsx
Comment thread dashboards/src/components/Annotations/AnnotationsEditor.tsx Outdated
Comment thread dashboards/src/components/Annotations/AnnotationsEditor.tsx Outdated
Comment thread dashboards/src/components/Annotations/AnnotationsEditor.tsx
Comment on lines +18 to +37
export function AnnotationHydrationWrapper({ children }: AnnotationHydrationWrapperProps): ReactNode {
const annotationSpecs = useAnnotationSpecs();
const { setAnnotationState } = useAnnotationActions();
const annotations: Array<UseQueryResult<AnnotationData[]>> = useAnnotations(annotationSpecs);

useEffect(() => {
for (const [index, definition] of annotationSpecs.entries()) {
const query = annotations[index] ?? null;
if (query) {
setAnnotationState(definition.display.name, {
data: query.data ?? null,
isPending: query.isLoading,
error: (query?.error as Error) ?? null,
});
}
}
}, [annotationSpecs, annotations, setAnnotationState]);

return <>{children}</>;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread dashboards/src/context/AnnotationProvider/utils.ts Outdated
Comment thread dashboards/src/context/AnnotationProvider/AnnotationHydrationWrapper.tsx Outdated
Comment thread dashboards/src/context/AnnotationProvider/AnnotationHydrationWrapper.tsx Outdated
Comment thread dashboards/src/context/useDashboard.tsx Outdated
Comment thread dashboards/src/context/useDashboard.tsx Outdated
Comment thread plugin-system/src/runtime/annotations.ts
Comment thread plugin-system/src/runtime/annotations.ts
Comment thread plugin-system/src/runtime/annotations.ts Outdated
Comment thread plugin-system/src/runtime/annotations.ts
Comment thread plugin-system/src/runtime/annotations.ts
@Gladorme Gladorme force-pushed the annotations branch 3 times, most recently from b3d76df to bda33b3 Compare May 29, 2026 16:18
@Gladorme Gladorme marked this pull request as ready for review June 9, 2026 14:09
@Gladorme Gladorme requested a review from a team as a code owner June 9, 2026 14:09
Comment thread dashboards/src/components/Annotations/AnnotationsEditor.tsx
Gladorme added 13 commits June 11, 2026 11:13
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
@Gladorme Gladorme merged commit e136f2b into perses:main Jun 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants