Skip to content

Prevent creating non-document resources at root via import #631

@blms

Description

@blms
  • Text Import can create non-document resources
  • IIIF Import seemed to create a buggy document on check-in, needs further investigation

Testing notes

In the new FairCopy dev build, 1.3.0-dev.3:

  • Open a project. Instead of "Import Text" the button should now say "Import TEI"
  • When you open the dialog, plaintext should not be mentioned, and it should have an additional rule that a TEI Header element must be present to import XML.
  • Click "Select Files". It should limit you to just picking files with the .xml extension.
  • If you import an XML file without a TEI header, the popup should tell you that it needs one to be imported. (if you need one of these, you can get one by going to a TEI document, and exporting a Text resource from inside of it)
  • If you import an XML file with a TEI header, it should import successfully as a new TEI document at the project root. (If you need one of these, you can get one by exporting a TEI document from the project root)
  • Blocked until Lorin is done with check-in fixes: you should be able to check in the documents.
  • Inside of a TEI document, the button should still say "Import Text". From there you should be able to import plain text, and it should create a new Text resource in the document (or source document if you chose that in the dialog)
  • Try importing a IIIF manifest like https://media.nga.gov/public/manifests/nga_highlights.json. It should create a TEI document with a header and facsimile element.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions