diegodlh / zotero-cita

Cita: a Wikidata addon for Zotero with citations metadata support
GNU General Public License v3.0
218 stars 10 forks source link

Support reason of citation with Wikidata #240

Open Futur3r opened 1 year ago

Futur3r commented 1 year ago

working on #163

I'm working on implementing the CiTO in the citation editor, the synchronization with wikidata and the visualization of intention of citation in the 'citation' tab, as well as the ability the order citations elements by intention of citation.

Futur3r commented 1 year ago

For now, the ability to modify citation intentions via the Citation Editor is OK. But I'm not good with UIs, so the menu is not well positioned. It would be better if it was under the last field (date).

Futur3r commented 1 year ago

I made the variable 'cito' in wikidata.js so adding new intentions would be as easy as just adding a new pair key:value. It will be also used to synchronize with Wikidata.

Futur3r commented 1 year ago

@diegodlh did you planned on implementing citation intentions synchronization in the function syncItemCitationsWithWikidata ? If so, what were your ideas ? I'm not sure if I just add loops in the function to check for the difference in the citation intentions between local and remote or the whole function need to be updated with the use of the CitesWorkClaim class, for example ?

I also read the CitesWorkClaim class comments, but I'm not sure how to implement it in the syncItem.. function.

Futur3r commented 1 year ago

My code is not clean at all, but I put the PR in 'ready for review' to have feedback.

I'm having a hard time with the render of the citations in the citations tab, I'm not too good with CSS. And I think some part of the code might need to be implemented as methods in objects, but I'm not sure which or how.

It is usable in this state.

Dominic-DallOsto commented 1 year ago

Thanks a lot for your work - I'll try and get to reviewing this soon!

Futur3r commented 1 year ago

While this PR modifies the citations panel and enable supports of qualifiers, it would be important, I think, to implement the property 'series ordinal' (P1545) in the citation panel as well.

So when the citations are ordered by index, their index number would be the value of the 'series ordinal' property in wikidata. Also, the user could then modify the index of a citation with cita and then synchronize it with Wikidata like the intentions are.

It would be needed to replace the 'up and down arrows' with field in the citation editor.