-
Notifications
You must be signed in to change notification settings - Fork 467
feat(annotations): Annotation Config UI #6856
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
feat(annotations): Annotation Config UI #6856
Conversation
bodyStyle={{ padding: 0 }} | ||
extra={ | ||
<DialogTrigger> | ||
<Button size="S">New Annotation Config</Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a + icon with the word "New Configuration" - just to keep things more proper.
@@ -8,7 +8,7 @@ import { formatFloat } from "@phoenix/utils/numberFormatUtils"; | |||
import { AnnotationColorSwatch } from "./AnnotationColorSwatch"; | |||
import { Annotation } from "./types"; | |||
|
|||
type AnnotationDisplayPreference = "label" | "score"; | |||
type AnnotationDisplayPreference = "label" | "score" | "none"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably needs a docstring
AnnotationConfigFreeform, | ||
AnnotationConfigOptimizationDirection, | ||
AnnotationConfigType, | ||
} from "@phoenix/pages/settings/types"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} from "@phoenix/pages/settings/types"; | |
} from "./types"; |
just to promote some level of directory encapsulation
data-testid="optimization-direction-picker" | ||
direction="column" | ||
> | ||
<Label>Optimization Direction</Label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are gonna need descriptions of these - they are not self evident
render={({ field, fieldState: { error } }) => ( | ||
<TextField {...field} isInvalid={!!error}> | ||
<Label>Annotation Name</Label> | ||
<Input placeholder="correctness" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With placeholders, it's best practice to not put a valid value there since it looks valid. Always use some sort of text like "e.x. correctness"
<> | ||
<Controller | ||
control={control} | ||
name="lowerBound" | ||
rules={{ | ||
required: "Min is required", | ||
}} | ||
render={({ | ||
field: { value, ...field }, | ||
fieldState: { error }, | ||
}) => ( | ||
<NumberField | ||
{...field} | ||
value={typeof value === "number" ? value : undefined} | ||
isInvalid={!!error} | ||
> | ||
<Label>Min</Label> | ||
<Input placeholder="0" /> | ||
<FieldError>{error?.message}</FieldError> | ||
</NumberField> | ||
)} | ||
/> | ||
<Controller |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-label={`Value ${index + 1}`} | ||
isInvalid={!!error} | ||
> | ||
<Input placeholder="Category label" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Input placeholder="Category label" /> | |
<Input placeholder="the annotation label" /> |
return tokens; | ||
} | ||
case "CONTINUOUS": | ||
return `Range: ${row.lowerBound} - ${row.upperBound}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return `Range: ${row.lowerBound} - ${row.upperBound}`; | |
return `${row.lowerBound} - ${row.upperBound}`; |
@@ -55,6 +55,8 @@ const getAnnotationDisplayValue = ( | |||
annotation.label || | |||
"n/a" | |||
); | |||
case "none": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
annotation.config.post.cleanup.mov |
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
* feat(annotations): Annotation Config UI * Fix style merging in AnnotationLabel * Handle large values * Rename card * Persist annotation config via gql * Convert annotation config popover to dialog * Implement annotation selection toolbar + deletion * Remove bad lint rule * Replace dialog extra buttons with cancel button * styling changes * clean up annotation label * Remove hover state from annotation label unless clickable
Annotation.Config.mov