digirati-co-uk / iiif-manifest-editor

Create new IIIF Manifests. Modify existing manifests. Tell stories with IIIF.
https://manifest-editor.digirati.services/
MIT License
31 stars 2 forks source link

Custom configuration and previews #12

Closed tomcrane closed 1 year ago

tomcrane commented 2 years ago

Custom configuration can provide capture models (#11) and also a link to a preview environment (where to pass the manifest for preview). Unlike the earlier manifest editor, previews are external and not the manifest editor's responsibility.

If you were editing Ocean Liners, or a Slideshow, you'd be using the manifest editor with different configuration JSON.

The manifest editor works the same way, but might offer you a limited, or an expanded, set of editable things. Clicking "preview" might produce dramatically different experiences, but there's no need for the manifest editor itself to try to be like those experiences.

sammeltassen commented 2 years ago

If previewing externally, how is the data passed to the other environment? I see three options:

  1. Commit to Github first, then load the json from there via query string
  2. Parse raw data via query string (we implemented this option in the Allmaps application, see viewer.allmaps.org and paste a georeferencing annotation like this one in the bottom field.
  3. Use local file system api and open the same local file in another window

1) requires least of the viewing application, 2) offers a preview before committing which seems valuable, and 3) offers truly live previews but is still experimental as a browser feature.

tomcrane commented 2 years ago

Are 1 and 3 the same in terms of mechanism - you are passing a URL?

Just that in 1) you are passing https://example.org/manifest but in 3) you are passing a URI that starts with filesystem:http://...

What are the constraints on this? In https://github.com/digirati-co-uk/iiif-manifest-editor/discussions/3 @stephenwf says that you could only do this if your preview app was on the same domain as the editor app (which may be acceptable for many scenarios). What's possible here without pushing the file out to somewhere it can be hosted?

jpadfield commented 2 years ago

Does this relate to #14 - would one want the preview in a popup/modal (including the nominated viewer) or in a box to the side etc?

tomcrane commented 2 years ago

See https://github.com/digirati-co-uk/iiif-manifest-editor/wiki/Preview for proposed approach to this.

stephenwf commented 1 year ago

Preview has had a few iterations now. We have the preview service/protocol that has been implemented with customisable config (code only, no user-driven configuration yet).

Some experiments with "Server" vaults to provide live previews without the use of the preview protocol have also been tested that also show the latest changes directly - without having to first serialise and save them externally.

The reliability of this mechanism can be improved, but is working. Configuration #64 is still remaining.