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

Can't create SVG Selectors for Annotations #180

Closed
digitaldogsbody opened this issue May 4, 2023 · 5 comments
Closed

Can't create SVG Selectors for Annotations #180

digitaldogsbody opened this issue May 4, 2023 · 5 comments
Assignees
Labels
bug Something isn't working iiif-schema

Comments

@digitaldogsbody
Copy link
Member

You cannot create a target for an Annotation with a SpecificResource that has a string value for selector (see https://iiif.io/api/cookbook/recipe/0261-non-rectangular-commenting/ for an example)

Expected behaviour:

SpecificResource would allow the SvgSelector construct

Observed behaviour:

The selector attribute gets omitted completely when the JSON is printed

Potential bug location(s):

https://github.com/iiif-prezi/iiif-prezi3/blob/main/iiif_prezi3/skeleton.py#L97-L103

SpecificResource currently requires either AnyUrl or an AnnoSelectorItem class, neither of which has the value property required by SvgSelector

Any other comments:

It looks like this construct was added to the schema (IIIF/presentation-validator@6a3a901) but after the last skeleton regeneration - so hopefully a regeneration should fix things pretty easily.

@digitaldogsbody digitaldogsbody added bug Something isn't working iiif-schema labels May 4, 2023
@digitaldogsbody digitaldogsbody self-assigned this May 4, 2023
@jpadfield
Copy link

Hi, sorry just checking, has there been any progress with this one?

@digitaldogsbody
Copy link
Member Author

@glenrobson did you get a chance to look at the RangeRef removal?

I am happy to put in a temporary hotfix for this using the skeleton modifier tool to allow the skeleton to be regenerated, which will add the SvgSelector and resolve Joe's issue.

@glenrobson
Copy link
Contributor

I did and unfortunately it broke my automated tests. I think it would be better to move to this version of the schema: IIIF/presentation-validator#155 but it requires some work as it moves to if / then / else rather than oneOfs. I'm part way through writing some code to replace if / then / else with oneOfs for the conversion.

@digitaldogsbody
Copy link
Member Author

Ok, that sounds like a good plan. In the meantime any objection to me patching RangeRef back into the skeleton and making a new release so we can support SvgSelector?

@digitaldogsbody
Copy link
Member Author

I have done the above and as of Release 1.2.1 support for SvgSelector is now functional :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iiif-schema
Projects
None yet
Development

No branches or pull requests

3 participants