Skip to content
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

Add starting point for supporting provider Descriptive property #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamjarling
Copy link
Member

What does this do?

A starting point for supporting provider, and understanding more about iiif-builder. In it's current form, it will support a provider's MUST properties, however it does not handle the SHOULD or MAY properties:

  • homepage
  • logo
  • seeAlso

When investigating this issue, we realized fully supporting the non MUST properties may require digging deeper into @iiif/parser, @iiif/presentation-3, and / or @iiif/vault.

@stephenwf @mathewjordan Thoughts on how much work this may require? (So we can budget time from now til years end). Thanks!

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 8, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e249cd0:

Sandbox Source
React Configuration
iiif-builder Configuration

@stephenwf
Copy link
Member

@adamjarling I've added a bug to track the linking properties: IIIF-Commons/parser#28

Was able to replicate that here: https://codesandbox.io/s/iiif-builder-forked-rd8b6q?file=/src/index.js

I've also added a quick new API here: #16

It allows you to import a block of JSON, like a provider, and it will correctly extract out the various entities etc.

const [reference] = this.importRawJson<'Agent'>(singleProvider);
this.modified.add('provider');
this.provider = [...this.provider, reference];

So something like this should work, and when the bugs are fixed in the parser, it will output correctly.

I do think it would be nice to have an "InstanceBuilder" specifically for the Provider - to help users of the library build good providers with the completion of the APIs.

@adamjarling
Copy link
Member Author

@stephenwf Ah great. Checking out the PR now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants