Closed NickLaiacona closed 3 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.
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:
Current UI screenshot:
Still seeing the color coding and no line breaks. This is on: https://mel-textlab.herokuapp.com/transcriptions/16906
@timdunn22 work on this first
@timdunn22 please move this test plan to the PR (#220)
Need capability to display TEI attributes on diplomatic transcription preview page. On click of an alteration a dialog with the TEI attributes displays.