ProjectMirador / mirador-annotations

a Mirador 3 plugin that adds annotation creation tools to the user interface
https://mirador-annotations.netlify.app/
38 stars 37 forks source link

Enforce single canvas view for annotation editor #43

Closed lutzhelm closed 3 years ago

lutzhelm commented 3 years ago

As there are currently some problems with annotation creation / editing in views with more than one visible canvas (see #24), this PR adds a dialog that is displayed if a user clicks the "New Annotation" icon in any other than single view.

What's still missing in this PR is a similar behavior for the edit button.

lutzhelm commented 3 years ago

At 901709d08fba1deffb1f9663424f95128a641bcc, switching to the single canvas view also opened the companion window. But I think this would introduce to much complexity especially for editing existing annotations.

lutzhelm commented 3 years ago

Overall this looks really good. One quick question I have is if we maybe want to start looking at expanding (or moving) what is done in AnnotationCreation to handle the logic here rather than on our button clicks, or if there are reasons that wasn't done.

I'm not entirely sure I understand the question correctly. There is some multi canvas logic in AnnotationCreation that is, at least for the moment, no longer relevant as soon as this PR is merged. However annotations across multiple canvases might still be a valid use case. In the end, fixing #24 and removing this workaround should be the goal.

lutzhelm commented 3 years ago

I'll look into the fresh conflicts.