performant-software / textlab

A collaborative space for creating and publishing digital critical editions.
http://www.textlab.org
GNU General Public License v3.0
13 stars 4 forks source link

Display TEI Attributes in Published Addition #181

Closed NickLaiacona closed 3 years ago

NickLaiacona commented 7 years ago

Need capability to display TEI attributes on diplomatic transcription preview page. On click of an alteration a dialog with the TEI attributes displays.

NickLaiacona commented 4 years ago

Users want to be able to see the attributes that they assigned to a given XML element in the diplomatic interface. Specifically, there are these spots in the text called "revision sites" which are places the author of the manuscript made a revision, such as crossing something out or writing above the line. The xml painstakingly describes these revisions, but much of that information is lost in the final product of the diplomatic render.

When the user rolls their cursor over a revision site, a box appears on the image to show where that is on the image they would also like a popup to appear with all the attribute data. This is tricky, since we don't have the data we need to display.. need to add more capability to the server to deliver this data. The data itself is in the XML, so we need to parse the XML to get the attributes, build a JSON list of these and send those to the client. To do that, we need to use a Ruby gem like Nokogiri to parse the XML.

Here's an example of the attributes I'm talking about:

<del facs="#img_19-0008" rend="single-stroke _ink1" hand="#HM" change="StDa">whatever</del>

so here, the link to the image is #img_19-0008. It is a single stroke deletion using ink type 1 by Herman Melville (HM). It is believed to have been done during revision campaign StDa. These boil down to arbitrary key value pairs. So you could say:

{ facs: '#img_19-008', rend: 'single-stroke _ink1', hand='#HM', change: 'StDa' }

and then just display these key value pairs in a pop over when the user rolls over the area keyed by the facs property.

NickLaiacona commented 4 years ago

This is all done, except the formatting of the popper needs improvement. Instead of color coding the field names and values, just make the field names bold and the values normal font. Introduce a line break after each field, value pair. Like so:

Place: Hand: Facs: etc.

Current UI screenshot:

Screen Shot 2020-06-03 at 11 16 22 AM

SteveMarvin commented 4 years ago

Still seeing the color coding and no line breaks. This is on: https://mel-textlab.herokuapp.com/transcriptions/16906

jamiefolsom commented 4 years ago

@timdunn22 work on this first

timdunn22 commented 4 years ago

What does this issue resolve?

  1. Display TEI Attributes in Published Addition

How to test?

  1. Login and go to https://mel-textlab.herokuapp.com/transcriptions/16903
  2. Click on the first item under the diplomatic tab and make sure when you hover over the transcriptions on the left side you are able to see the tei attributes (Hand, Facs, Rend, etc)
jamiefolsom commented 4 years ago

@timdunn22 please move this test plan to the PR (#220)