-
-
Notifications
You must be signed in to change notification settings - Fork 39
Incorrect reference sorting in tooltips under certain circumstances #421
Comments
I managed to fix the inline citation order (second screenshot above) by specifying citation-number sorting for the inline citations, instead of author-issued-title. But the tool tip is still reversing refs 2 and 7. EDIT: A bit of experimenting suggests that the order in the tooltip is determined simply by the order of clicking on references. Have I got that right? |
Good catch. Can't remember off the top of my head how exactly the order in the tooltips is determined. But for certain I can tell you that I hadn't considered all the ways that the citation numbers can be sorted. IIRC, it just grabs them from the bibliography in the order that they are printed. I'll see maybe if .I can adjust so that citation order is considered. No guarantees when I can get to that though. |
Thanks. Just to be clear, in my testing, multiple references appear in a tooltip sorted by the order in which they were clicked. It's not too hard to click them in alphabetical order if there aren't many, but yes, putting them in the bibliography (or citation) order would be a nice refinement. So consider this a feature request. |
@glorious1 Which citation style causes this to happen? Or, more specifically, which one uses |
Sorry I neglected your question for so long. I'm not sure I understand it. After thinking and studying styles, I think you mean that most numbered styles sort the references in the order they were cited. And you're asking which numbered style sorts by author, issued? In addition to my custom one, there are these: The bibliography and inline citations (when there are multiple citations) are sorting correctly. The part where it doesn't is the popup. The order of references in the popup, at least for me, is determined by the order I click them in. |
Got it. So, to confirm, |
Let me test it tomorrow. Right now I only know my custom style does.
… On 2018 Feb 6, at 5:40 PM, Derek Sifford ***@***.***> wrote:
Got it.
So, to confirm, Council of Science Editors, Citation-Name (numeric, sorted alphabetically) is a style that will trigger this issue correct?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#421 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFuewVg8XtYYh31AtdzQykSMIwXxKW18ks5tSPEWgaJpZM4RjAhl>.
|
Yes that CSE style does the same thing. Order of references in the tooltip is determined by the order you click them in. Direct link to download the style: |
I can't reproduce this issue with that style @glorious1 |
Disregard my last... I was just able to reproduce. |
Reproduction video from #516 : https://www.youtube.com/watch?v=iXr2YOhZJRY&feature=youtu.be |
* update dependencies and stale codebase before digging in to gutenberg * more refactoring * progress on gutenberg update * update dependencies + fix scss import issue * use external lodash provided by wordpress * adjust store structrue + add new sidebar store * make citeproc types non-ambient * use minified citeproc from jsdelivr CDN * upgrade dependencies * misc progress * move _legacy/utils/resolvers to utils/resolvers * misc small tweaks * change sidebarStore to uiStore + other small adjustments * update various type defs * update data store * add cache utility + async controls * add processor utility + actions * misc updates * initial basic working citation inserter/updater * update dependencies * misc type definition updates * improve select and dispatch types * small adjustmets for wp 5.0 release * improve classic editor detection * update dependencies * weekend sprint progress * fix various tslint rule violations * simplify stores * weekend sprint progress on gutenberg update * move a few things around * finish resolvers update + finish manual data form flow * finish edit reference dialog + begin wiring it up * finish edit reference dialog functionality * fix misnomer in state nomenclature * ignore json files in tslint * fix deprecation in tslint.json * dependency updates * add TextareaAutosize component * finish up initial edit, save, and transforms for bibliography block * bump required PHP version to 7.2 * move types into top-level types directory * switch to global notices for more simplicity * misc small tweaks to bibliography block + add misc helper methods * improve bibliography block * improve citation format reliability * refactor sidebar components * improve reliability of citation format * add static publication list block * add postcss-loader * add i18n strings where missing throughout js files * move get_style_json function * misc small adjustments * fix dialog titles * implement changing citation style on the fly * add bibliography metadata to bibliography block * update dependencies * shift around legacy styles * misc tweaks/adjustments * add global bibliography styles * add subscribe to save method to automatically clear save notices * re-implement handling of custom styles * move from globals to using API resolvers for initial state * improve highlighting of selected citations in the editor * fix autocite date parsing in legacy editor. closes #459 * move legacy workers into legacy directory * use babel-loader directly * fix edit dialog date parsing * misc small php adjustments * fix sorting of citation items in tooltips. Note: this fix affects only the new block editor. Legacy editor is still affected. closes #421 * two small php bugfixes * style frontend + add tooltip.js for rendering tooltips * prune out deprecated plugin options from options pages * misc php cleanup * unset pointer cursor inside tooltips * upgrade dependencies * move scripts to top-level directory * fix broken update-styles script and improve fuzzy matching of citation styles * fix tslint warnings * change up export formats * initial working footnotes implementation * add footnote list to sidebar * fix bibliography tooltip bug * a11y improvements * small css tweaks * bump to beta semver number in package.json * fix issue in prefetching saved state * autofocus dialog inputs * remove rollbar for now - maybe add sentry error logger later. closes #493 * clean up various global type declarations * update dependencies + remove old stale tests * add URL field to a few more manual types. closes #535 * swap out domReady for @wordpress/dom-ready in legacy files * split code into several entry chunks * remove unnecessary calls to apiFetch * switch to protected meta for editor state * improve checks for loading legacy code vs new code * give the php files some much-needed TLC * only get citations that have an id in getCitationsByIndex * clean up legacy csl parser and move it to utils since it's still being used * move files around + delete old components that are no longer needed * update and clean up options-page stuff * fix issue with fetching initial post-meta in wordpress core version of gutenberg * fix error message parsing in csl file parser * update dependencies * clean out old translations * remove php trailing commas * dependency updates and build script adjustments * ajax updates & shared code pattern abstractions * json script abstractions * do not focus footnotes or bibliography when inserting the block * fix determining cited items by excluding invalid block types * only disable insert citation button if selectedItems contains one or more citations * upgrade dependencies + adjust i18n string on options page * fix typo in zip script * fix bug introduced by printing the nonce too early * make csl citation properties param required * misc refactors for better code sharing * use page-embedded JSON for initial state, rather than unreliable resolvers * remove all legacy tests because most of them are failing now and it isnt worth fixing * clean up ambient definitions + move fileinput out of legacy * upgrade dependencies * fix ambient reference i missed in last commit * add script for resolving external dependencies automatically using webpack stats * misc final touches before update * fix lint errors * update citation styles
ABT Version: 4.13.2
PHP Version: 5.6
**Theme:**GeneratePress
Plugin List:
Browser: Firefox 57
**Expected behavior:**Bibliography, inline citations, and tooltip all sort references consistently.
Actual behavior:
First let me say that last bug fix was a game changer for me. For the first time I can edit or add references manually. Also, for the first time, I am able to use a custom style. Which leads to other questions. I doubt this is a bug, maybe a style issue.
The CSL system seems great, but it is mind-boggling. The documentation illustrates how to do some very simple things, like change an element to italic or bold. Anything more complicated than that, you're on your own. I'm trying to learn it by trial and error. Anyway, I've got a style now where the bibliography and citations have the exact same sorting rules (author-issued-title). But I'm getting some anomalies I can't understand (see screenshots). In one case the inline citation is out of order. In another case the tooltip has references presented out of order.
The inline citation order is probably my bad, as editing the style is mysterious. But I don't see that I have any control over ordering inside the tooltip specifically. Any thoughts?
Console messages:
// Paste messages here
The text was updated successfully, but these errors were encountered: