-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Show canonical dataset in MetadataView #2546
Open
robyngit
wants to merge
15
commits into
develop
Choose a base branch
from
feature-2541-show-source-dataset
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
robyngit
changed the title
Add view to show source dataset in MetadataView
Show canonical dataset in MetadataView
Oct 3, 2024
- Add a new view, CanonicalDatasetHandlerView, to handle identifying and displaying the canonical dataset for a given dataset - The view removes the annotations that identify the canonical dataset from the metadata view and adds a field to display the canonical dataset url - The view has shell methods to fill in that will make further modifications to the metadata view Issue #2541
- Deprecate the template that rendered the icons previously - Add new methods to MetadataView to render the icons - Call new methods to render the duplicate icon with the CanonicalDatasetHandlerView Issue #2541
robyngit
force-pushed
the
feature-2541-show-source-dataset
branch
from
October 3, 2024 23:12
922c13b
to
6741949
Compare
The metadata view re-renders when a users' logged in status changes. Depending on the timing of this change, re-rendering may occur in the middle of a previous render. This causes elements of the view to break, especially the new CanonicalDatasetHandlerView. This commit fixes the issue by adding a check to see if the view is already rendering before re-rendering. Issue #2541
And show the citation modal when the "duplicate" info icon is clicked. Issue #2541
and add rendering of issue & volume for journal articles in the citation APA template Issue #2541
using the new CrossRef model Issue #2541
robyngit
force-pushed
the
feature-2541-show-source-dataset
branch
from
October 14, 2024 19:23
63195fd
to
5c124bd
Compare
Changes to do based on feedback from @mbjones:
|
Canonical dataset citation is now before the "this version" citation in the citation modal on dataset landing pages. Issue #2541
Also fix a problem found in testing:
|
In the MetadataView. This ensures that if the logged in status changes, the view will re-render to show the correct information. Issue #2541
robyngit
force-pushed
the
feature-2541-show-source-dataset
branch
from
October 17, 2024 19:11
029f128
to
ded5b86
Compare
Remove the Canonical Dataset field in the General section of dataset landing pages, and instead show a more prominent blue info box at the top of the page with the citation. Issue #2541
Even if we can't fetch DOI info Issue #2541
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a feature that a visually identifies a dataset as essentially a duplicate of another in the
MetadataView
. It does this by adding and modifying some components of the view.New
CanonicalDatasetHandlerView
Added a new view,
CanonicalDatasetHandlerView
that handles identifying and displaying the canonical dataset within a Metadata view.This new view is a "scoped subview", a self-contained view that is responsible for managing a specific part of UI within a larger parent view. In this case, the
CanonicalDatasetHandlerView
handles inspecting and modifying specific parts of the already-rendered DOM within theMetadataView
. Creating a new view for this purpose avoids adding more complexity to the already very largeMetadataView
.The
CanonicalDatasetHandlerView
is responsible for the following tasks:MetadataView
to identify a canonical dataset.schema.org:sameAs
andprov:derivedFrom
annotations that have the value, this is assumed to be a reference the DOI of the canonical dataset.MetadataView
when a canonical dataset is detected, by:New
CrossRef
modelChanges to other components
Citation Model
issue
and methods to extractvolume
andissue
from the source model. UpdatedgetJournalFromSourceModel
andgetPidFromSourceModel
to handle getting these values from aCrossRefModel
.Citation View
issue
and adjust the formatting of the journal, volume, and page information.Metadata View
CanonicalDatasetHandlerView