netcreateorg / netcreate-itest

Developing the 2.0 version of NetCreate
https://github.com/netcreateorg/netcreate-2018
Other
0 stars 0 forks source link

Feature: Citation Dialog #109

Closed benloh closed 7 months ago

benloh commented 7 months ago

Addresses #86

This re-implements the ability to cite nodes and edges. Clicking the "Cite Node" and "Cite Edge" buttons will show a dialog with the citation text with a "Copy to Clipboard" button. Clicking the button will close the window and copy the text to the clipboard.

This works on most browsers. Tested on:

e.g. screenshot_1362

NetCreate Tacitus network, Node: "Nero" (ID 5). Last accessed at 09:26 on 11/29/23.
NetCreate Tacitus network, Edge: (ID 8), from "Nero" to "Tacitus". Last accessed at 09:27 on 11/29/23.

NOTES

jdanish commented 7 months ago

I'll let Kalani weigh in here, but my recollection is that the citation was a more elaborated version of the network name, that if we wanted, instead of:

NetCreate Images of Death network, Node: "Comforting" (ID 3). Last accessed at 12:57 on 11/29/23.

We could have it be:

NetCreate Images of Death network from Kalani's class in 2023, Node: "Comforting" (ID 3). Last accessed at 12:57 on 11/29/23.

I haven't really needed it as much, so will defer to @kalanicraig.

Also, Ben - if we did have it it would be at the level of the whole network / template and calling it citation or citation-text would be great, though where it fits in the data structure likely doesn't matter to us. I think the assumption would be if it is there, use it, if not, use the network name as a default as you did. Does that lead to any thoughts about things being hard or problematic to do?

jdanish commented 7 months ago

This appears to work otherwise. If you want to merge and make the citation question a separate issue that'd make sense to me, and I'd likely bump it down in priority since this works for now.

jdanish commented 7 months ago

Sorry, also in the prior version the citation > hidden was used to turn off the buttons. That would be nice as a graph-level attribute. That can also be a separate issue for later, though.

In the current templates I am seeing this:

[citation] text = "No citation set" hidden = true

Any nodes / edges with a citation attribute were added by the author of that network for users to type in. So the intent was always that the citation above is what was linked to the citation buttons (referencing the graph name, essentially).

benloh commented 7 months ago

Sorry, this was a case of long long term memory messing with my more recent long term memory. You're absolutely right, we do support the citation field. I think our early versions did use citation fields, but I had forgotten about the fix.

This should be working now. The citation field works in conjunction with the network name. 70638b637658acffc7c7308582140c654eebac8a

jdanish commented 7 months ago

This all looks good!