-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In citations with many authors, make the "et al." text a link that expands the full author list #264
Comments
That could work for the display, but we also need to be sure that the "Copy Citation" includes the full author list in the copied citation. When designing this feature change, we might want to consider different solutions for different parts of the UI. The datset landing page seems like a good place to display the full citation always, whereas the search results listing might be best if we use the standard journal approach of using et al. for any list of 3 or more authors (e.g., |
How it works nowDecisions about how the authors are formatted in the
Besides the The metacatui/src/js/views/CitationView.js Line 224 in 26e1a46
The copy citation button works by highlighting whatever text is in some targeted HTML element and adding it the the clipboard. To do this, it uses a library that looks for an element ID that is set on the button's How we can update itHere is a path forward we can take to create the expandable author list:
Optionally, we should also:
|
@robyngit It is exciting to see that the citation functionality is being refactored! I wanted to point out that there is a ticket that we submitted a while back to be able to format the citation differently. What you are doing here might address this but I wanted to point you to this issue ticket just incase there are additional things you may be able to consider in this refactor. |
This is really helpful, @vchendrix, thank you! I think addressing both these issues at the same time makes a lot of sense. |
Remove the routeToMetadata function from CitationView, which was not used anywhere. Add JSdocs and a screenshot. Relates to #264
- Previously authors were formatted in 3 different places in the render function. - Now author lists are passed to the new getAuthorString to return a formatted string for the citation. Relates to #264
in CitationListView and EML211EditorView Relates to #264
Update: The CitationView is tricky to make updates to at the moment since it formats a whole bunch of different models (EML models, solr results, Citation models, etc.) in a whole bunch of different ways depending on context. To resolve this, the plan is to add on to the CitationModel so that the model attributes can be populated from different sources (EML, Solr result, data object, etc.), not just the results from the metrics service. The Citation View will then render only the Citation Model. All of the logic that maps various model attributes to parts of a citation will be moved from the CitationView to the CitationModel. This will hopefully achieve the following:
|
Sounds great! |
- Add template files (not complete) - Modularize some of the repeated behaviour in render, move to functions - Document the options that are passed to this views - This is very much at a WIP stage, CitationView is not working with this commit Relates to #264
Add methods that are generalized to look for attributes in DataONEObject models (and extensions) and SolrResult models. Add special set method to handle updating the source model that the Citation Model is populated from. Relates to #264
- Formatting and documentation improvements - Add method to call the getUploadStatus method from sourceModel - Fix a couple of minor bugs Relates to #264
- Built on to the CitationView template & the CitationModel - This is a WIP commit. The CitationView renders the most common citation cases now, but functionality is still missing (e.g. rendering the Cites Data list from the citationMetadata attribute) Relates to #264
Update: The Citation model now has new functionality for populating its attributes from other models used for citations. I've made it modular so that it's easier to modify how attributes are populated, and which attributes we pull in from source models (e.g. the "project" field, see #567). The CitationView only renders content directly from the CitationModel, but can still be initialized with other types of models. (These are just passed to the CitationModel, which handles pulling in the right content). It still accepts both the "model", "metadata" and "id" init options so that it is backwards compatible. All HTML creation has been moved to a new template. The CitationView currently works for the most common use cases, such as in the search results and the metadata landing page, but there's work to do to cover all contexts and render all available information, like the "Cites Data" list from the citationMetadata attribute. Once this is done, I will add a template option for an expandable list of authors! |
Remove the routeToMetadata function from CitationView, which was not used anywhere. Add JSdocs and a screenshot. Relates to #264
- Previously authors were formatted in 3 different places in the render function. - Now author lists are passed to the new getAuthorString to return a formatted string for the citation. Relates to #264
in CitationListView and EML211EditorView Relates to #264
- Add template files (not complete) - Modularize some of the repeated behaviour in render, move to functions - Document the options that are passed to this views - This is very much at a WIP stage, CitationView is not working with this commit Relates to #264
The Citation view & model still need review, and the CitationModel needs unit tests, but otherwise they are both at a state now where we can easily add a template with an expandable section to show all authors. While updating the view & model, I was able to make some other minor improvements: Switch from using
|
- Fix a bug with the isFromNode method in CitationModel - make the citation template more consistent with previous implementation - remove unused style rules - improve docs Relates to #264
Add listeners to the citationMetdata Citations collection Relates to #264
I'm currently working on designing and building the new expandable author list layout. I've included some images showing the direction that I'm heading with it and welcome any and all feedback at this stage! BeforeHere is an example dataset as it's currently displayed on the ADC. It's not clear that there are so many contributors to this dataset. In fact, there are 46! AfterHere is the new WIP design. When a user lands on a page, by default, as many authors as possible are displayed, plus the last author preceded by and ellipse. Bold, highlighted text at the end of the list indicates how many more authors there are for the dataset. Either the The "Cite this dataset" button below can be clicked to bring up a modal that shows the complete citation with all authors Other details
|
That's awesome, Robyn! Does the dataset citation change based upon whether a user is viewing the condensed list or full list? For example, if someone's viewing the condensed list, would the "Cite this dataset" button truncate the author list to et al, and vice versa if they're looking at the expanded list? I don't think it's a big deal one way or the other, just curious :) |
Thanks @dvirlar2! No, the "Cite this dataset" list will always show the full author list, regardless of whether or not the landing page list is expanded or collapsed. Is that the behaviour you think users would expect? |
@robyngit I asked Bruce how many authors he was expecting to add on his dataset, and he said between 24-30. You had asked him for a number, so I wanted to let you know! Here's the specific message if you want it. As for the expected behavior, I think it's what I would expect, but I don't think it's what most users would expect. I'll have to think on that a bit more. |
- Use on data package landing page instead of a regular citation - WIP: Make the citation button open a new modal window with the ability to copy citation Relates to #264
And other minor updates: - Embed the CitationListView as a child view within the Metric Modal View, so that updates to citations in the Citation List are reflected in the Citation Modal - Make the order of the metrics in the modal consistent with the order of the buttons in the dataset landing page - Make the metrics that are displayed in the modal configurable in the view, such that metrics can be added, removed, or changed easily in the future. Relates to #264
Doc updates in CitationHeaderView & CitationView Relates to #264
- Create CitationModalView - Change button from Copy Citation to Cite this Dataset. Open modal when clicked. Relates to #264
Properly remove listeners in setSourceModel() Return name string even when there is no given name in originArrayToString() Relates to #264
Add JS docs since tag to CitationView Relates to #264
Also fix issues found while creating tests Relates to #264
Make the archive template and the render method optional for configured citation styles in the CitationView Relates to #264
No description provided.
The text was updated successfully, but these errors were encountered: