-
Notifications
You must be signed in to change notification settings - Fork 1
Add helpers for AnnotationDocumentInfo #18
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
Conversation
| export type Annotation = { | ||
| uri: string; | ||
| document: { title: string }; | ||
| links: { | ||
| /** A "bouncer" URL that takes the user to see the annotation in context */ | ||
| incontext?: string; | ||
| /** URL to view the annotation by itself. */ | ||
| html?: string; | ||
| }; | ||
| }; |
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.
I have created this type as small as possible, just with the minimum properties that are needed by the helpers defined here.
In future we plan to extract the type definitions to a shared location.
5897c76 to
ff6fdb6
Compare
robertknight
left a comment
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.
I think it will make sense to combine AnnotationDocument and AnnotationDocumentInfo into one AnnotationDocumentInfo component, since AnnotationDocumentInfo is quite small and I don't think we plan to use it outside AnnotationDocument?
13e20d5 to
c5122f0
Compare
c5122f0 to
3b0562f
Compare
3b0562f to
1825352
Compare
1825352 to
4fdd8f1
Compare
Part of hypothesis/h#9548
Improve the
AnnotationDocumentInfocomponent so that it can extract the information to display from the annotation, via a number of new helper functions.Most of the logic here is extracted from client, and will be used in hypothesis/h#9618 as well.
Once merged, I will create a client PR removing the helpers that are not needed there anymore.