cwrc / DEPRECATED-CWRC-Writer

The Canadian Writing Research Collaboratory (CWRC) is developing an in-browser text markup editor (CWRCWriter) for use by collaborative scholarly editing projects.
http://www.cwrc.ca/projects/infrastructure-projects/technical-projects/cwrc-writer/
GNU General Public License v2.0
24 stars 17 forks source link

Help with CSS for scholar notes and bibcits in Orlando docs #438

Closed SusanBrown closed 7 years ago

SusanBrown commented 8 years ago

Both the standalone version and embedded version On a Mac on Chrome but pretty sure this is ubiquitous

@ajmacdonald we are hoping to resolve this problem prior to the CWRC launch next week if possible. Apologies for the lengthy description that follows.

Orlando docs use the Orlando stylesheets designed for the Cambridge UP interface. These include icons for bibcits and scholarnotes that produce popups containing the information in those tags. Example of a note from the begining of the Pauline Johnson doc: image

In the case of bibcits, they also pull in the full bibliographic information associated with the identifer in the bi_id attribute, with the page number or other locative information from the text of the bibcit attached, as in this screenshot, where the bibcit would contain only "219": image

CWRC-Writer is obviously not set up to do any of these things. The result is that although the icons for bibcits and scholarnotes show, users cannot click on them to expose the contents of the tag. In fact there is no way with the current stylesheet to get to see in the viewing pane the contents of the tag.

We are hoping you can help us arrive at a solution to this rendering problem.

(there is also the related issue that the note popup isn't launching: having it launch as a read-only popup would be one solution for scholarnotes.)

The situation is not much better with our other CSS, although bibcits are rendering as parenthetical references within docs using the stylesheet for Canada's Early Women Writers. Here's the schema and css info associated with the document (which btw is here):

<?xml-model href="http://cwrc.ca/schemas/cwrc_entry.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-stylesheet type="text/css" href="http://cwrc.ca/templates/css/ceww-CWRCWriter.css"?>

The formatting for bibcits is as follows: *[_tag = "LISTBIBCIT"] *[_tag = "BIBCIT"]{ display:block; padding-left:2%; padding-bottom:0.5em This would be acceptable for interim.

Ideally, in the absence of the ability to pull in the corresponding bibliographical entry, we would like the bibcit to show the placeholder tag, then a comma and space, then the contents of the tag.

@jefferya thought that maybe it could be rendered along these lines: *[_tag="BIBCIT"]:after { content:attr(placeholder) ")"; }

Would something like this work? Or should we just stick to the simpler rendering for the bibcit tags as per the early Cdn women writers project?

Then for the scholar notes. What would you imagine to be most feasible. My preference would be a read-only version of the note popup, operating as it does in the editor by clicking on the note icon: image

And then upon clicking the user would see something like this: image

ajmacdonald commented 8 years ago

In regards to the Orlando CSS, it's being pulled from here: http://cwrc.ca/templates/css/orlando.css It contains the following, which effectively hides the BIBCIT content:

BIBCIT {
    content : url(http://cwrc.ca/templates/images/bibcit.gif);
}

The suggested change

 *[_tag="BIBCIT"]:after { content:attr(placeholder) ")"; }

would require that the text content of BIBCIT be placed in an attribute of BIBCIT. This doesn't strike me as a clean solution.

It could be possible to mimic the popup behaviour by listening for clicks on the BIBCIT element. If you want to fetch additional info you'd need to provide me with details for that call.

jefferya commented 8 years ago

@ajmacdonald, @SusanBrown given the tight timeline, for now we'll use the simple approach/kludge as Orlando has, for the most part, filled in the placeholder element. This approach is not clean but is better than what is currently rendering (i.e., no citation information that would lead to the source)

@SusanBrown Question, could someone click on the formerly visible bibcit icon an edit the citation? This approach may have broken that ability.

Here is the code change: https://github.com/cwrc/CWRC-Schema/blob/master/templates/css/orlando.css#L233-L239

SusanBrown commented 7 years ago

Much has happened so archiving this. Will start a fresh card related to notes if needed.