Psychoanalytic-Electronic-Publishing / PEP-Web-User-Interface

Single Page App Graphical User Interface for PEP-Web
1 stars 0 forks source link

Reference Linking - Heuristic "related" references (rxcf) #717

Closed nrshapiro closed 1 year ago

nrshapiro commented 1 year ago

Apparently, I didn't realize when looking at the site that we had the rxcf feature implemented and working in the client for single rxcf values. The reason I couldn't see it because when we switched away from using my PC based XML processing, that data was no longer there in the references to trigger the client to add the link symbol. Now that it's back (on Stage), you can see the links are in the client.

image

However, when I rebuilt the rxcf linker for the server, I enhanced it to add multiple references to the rxcf value. Thus, we need to change this feature in the client to take advantage of the list of possible matches it provides, as we've already discussed.

<be id="B0049" reftype="book" class="mixed-citation"><a><l>Steinberg</l>, M</a>. (<y>1993</y>). <bst>Structured clinical interview for DSM-IV dissociative disorders</bst>. <bp class="publisher-name"> American Psychiatric Press</bp>.</be>
<be id="B0050" reftype="book" class="mixed-citation" rxcf="JAA.028.0740A:0.66, PSAR.086.0967A:0.66, IJP.080.0189A:0.65, PAQ.068.0313A:0.65, PPSY.016.0481A:0.61" rxcfconf="0.66"><a><l>Stern</l>, D. B</a>. (<y>1997</y>). <bst>Unformulated experience: From dissociation to imagination in psychoanalysis</bst>. <bp class="publisher-name"> The Analytic Press</bp>.</be>
<be id="B0051" reftype="book" class="mixed-citation" rxcf="JOAP.052.0511A:0.54" rxcfconf="0.54"><a><l>van der Hart</l>, O.</a>, <a><l>Nijenhuis</l>, E. R. S.</a>, &amp; <a> <l>Steele</l>, K</a>. (<y>2006</y>). <bst>The haunted self: Structural dissociation and the treatment of chronic traumatization</bst>. <bp class="publisher-name"> Norton</bp>.</be>

The simplest update is to change the link from a direct link to that one article, to a search, including all the articles.

I've modified smartsearch in the latest server (not online yet) to accept the rxcf list as a special search, just submit it as follows:

cf::JAA.028.0740A:0.66, PSAR.086.0967A:0.66, IJP.080.0189A:0.65, PAQ.068.0313A:0.65, PPSY.016.0481A:0.61

you can optionally add text by including //_custom_labeltext// at the end, where _custom_labeltext can be whatever you want, e.g.,

cf::JAA.028.0740A:0.66, PSAR.086.0967A:0.66, IJP.080.0189A:0.65, PAQ.068.0313A:0.65, PPSY.016.0481A:0.61//Like: Stern, D. B (1997). Unformulated experience: From dissociation to imagination in psychoanalysis.//

Here's what it shows if I paste that into the smartsearch box (though the client will be using it in an API call instead):

image

Jordan, please note the 'cf::' -- TWO colons, like the 'adv::' syntax of smartsearch.

@davidtuckett @jordanallen-dev @ocappello

nrshapiro commented 1 year ago

@jordanallen-dev

I did some testing of client/server rxcf implementation. Looks good but some issues with rxcf implementation to handle (list in progress, will add as I continue testing): 1) Need to be able to use the back button to get back to the reference section. After viewing, people may not want any of those references, but pressing back takes you to the top of the article, not the reference section. If the return is an issue, we may want to have the link open a new tab so they can just close that one and be back. 2) I think because this is not a regular link, the browser methods that let the user choose to open in a new tab or window aren't available. Is there a way we can fix that? That would at least give the user choices. Same for direct reference link!!! 3) Help message needs to be updated to correspond to new method

jordanallen-dev commented 1 year ago

@jordanallen-dev

I did some testing of client/server rxcf implementation. Looks good but some issues with rxcf implementation to handle (list in progress, will add as I continue testing):

  1. Need to be able to use the back button to get back to the reference section. After viewing, people may not want any of those references, but pressing back takes you to the top of the article, not the reference section. If the return is an issue, we may want to have the link open a new tab so they can just close that one and be back.
  2. I think because this is not a regular link, the browser methods that let the user choose to open in a new tab or window aren't available. Is there a way we can fix that? That would at least give the user choices. Same for direct reference link!!!
  3. Help message needs to be updated to correspond to new method

I have updated the help message and provided a href for the RXCF link so that it can be opened in a new tab as we discussed yesterday

It is deployed to stage and ready when you are

The back button behaviour speaks to a broader issue with PEP-Web that needs to be addressed in a separate piece of work

Similarly, we should follow up with another task to add hrefs to each of the clickable document elements

jordanallen-dev commented 1 year ago

Implemented in #718