jhu-digital-manuscripts / AnIOp

to track the activities of the Mellon funded Annotation Interoperability project
0 stars 0 forks source link

Augment the 'fetcher' plugin's container to set relationships in application state - capture annotations + annotations that target them #85

Closed cyork closed 4 years ago

cyork commented 4 years ago

assigning to JAbrahams, for now.

jabrah commented 4 years ago

Fetcher plugin now has a reducer to add a map of our annotations: https://github.com/jhu-digital-manuscripts/rosademo-frontend/blob/display-eldarion-annos/src/plugins/jh-annotation-fetch-plugin/reducers.js

This is coupled with a new selector for the annotation sidebar plugin that will read this annotation map from state, creating a new mapping of visible annotations to annotations that target them. The annotation component can use the map to find annotations that target its "main" annotation: https://github.com/jhu-digital-manuscripts/rosademo-frontend/blob/display-eldarion-annos/src/plugins/jh-annotations-panel/selectors.js#L105

I have mixed feelings about how this is turning out, I think there are places that can be simplified given more iterations / time.