IIIF-Commons / manifesto

IIIF Presentation API client and server utility library.
MIT License
46 stars 31 forks source link

Utils.getServices implementation breaks mirador viewer. #106

Closed mexthecat closed 2 years ago

mexthecat commented 2 years ago

Not sure if the implementation of Utils.getServices() is right.

I'm working with mirador viewer (uses manifetso.js)

With the new version I have a problem. If I ad a Search Service to the manifest, it will also been loaded for the Image Service.

If I read the iiif docs right, the Top Level Service (https://iiif.io/api/presentation/3.0/#service) should not be loaded. There should only be a way to load from Services (https://iiif.io/api/presentation/3.0/#services)

stephenwf commented 2 years ago

Hopefully this sorts it: https://github.com/IIIF-Commons/manifesto/pull/107

mexthecat commented 2 years ago

Not really for me. If I understand the iiif presentation right, it should be possible to load services from manifest level from services tag not from service .

So right now if you have a SearchService on manifest level it will overwrite all ImagesServices on all levels.

My understanding was: if you have a service which is used in many sub levels you should define it in services tag on manifest level and use it on sublevel in service tag. But you need to declare at least the id of the service on sub level.

Maybe I'm wrong - but with the current implementation mirador viewer can not work. The service on manifest level will always be the fist in the loaded list => it is not possible to define a SerachService

mexthecat commented 2 years ago

@stephenwf ... sorry I did not get your link right - #107 will solve the problem

stephenwf commented 2 years ago

Great, yes I think I fixed both the inner .services call (to avoid also retrieving .service on the parent) but then also a way to opt-out of the new functionality all together.

I'll get that merged today 👍

stephenwf commented 2 years ago

Published in manifesto.js@v4.2.11