-
-
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
Allow adding, removing, and changing the "canonical dataset" in the Editor #2551
Conversation
Left to do:
|
43c3062
to
4df698d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
eslint
🚫 [eslint] <object-shorthand> reported by reviewdog 🐶
Expected method shorthand.
metacatui/src/js/views/metadata/EML211View.js
Lines 2050 to 2085 in 4df698d
addBasicText: function (e) { | |
var category = $(e.target).attr("data-category"), | |
allBasicTexts = $( | |
".basic-text.new[data-category='" + category + "']", | |
); | |
//Only show one new row at a time | |
if (allBasicTexts.length == 1 && !allBasicTexts.val()) return; | |
else if (allBasicTexts.length > 1) return; | |
//We are only supporting one title right now | |
else if (category === "title" || category === "canonicalDataset") | |
return; | |
//Add another blank text input | |
var newRow = $(document.createElement("div")).addClass( | |
"basic-text-row", | |
); | |
newRow.append( | |
$(document.createElement("input")) | |
.attr("type", "text") | |
.attr("data-category", category) | |
.attr("placeholder", $(e.target).attr("placeholder")) | |
.addClass("new basic-text"), | |
); | |
$(e.target).parent().after(newRow); | |
$(e.target).after( | |
this.createRemoveButton( | |
null, | |
category, | |
".basic-text-row", | |
"div.text-container", | |
), | |
); | |
}, |
🚫 [eslint] <one-var> reported by reviewdog 🐶
Split 'var' declarations into multiple statements.
metacatui/src/js/views/metadata/EML211View.js
Lines 2051 to 2054 in 4df698d
var category = $(e.target).attr("data-category"), | |
allBasicTexts = $( | |
".basic-text.new[data-category='" + category + "']", | |
); |
🚫 [eslint] <no-var> reported by reviewdog 🐶
Unexpected var, use let or const instead.
metacatui/src/js/views/metadata/EML211View.js
Lines 2051 to 2054 in 4df698d
var category = $(e.target).attr("data-category"), | |
allBasicTexts = $( | |
".basic-text.new[data-category='" + category + "']", | |
); |
🚫 [eslint] <vars-on-top> reported by reviewdog 🐶
All 'var' declarations must be at the top of the function scope.
metacatui/src/js/views/metadata/EML211View.js
Lines 2063 to 2065 in 4df698d
var newRow = $(document.createElement("div")).addClass( | |
"basic-text-row", | |
); |
🚫 [eslint] <no-var> reported by reviewdog 🐶
Unexpected var, use let or const instead.
metacatui/src/js/views/metadata/EML211View.js
Lines 2063 to 2065 in 4df698d
var newRow = $(document.createElement("div")).addClass( | |
"basic-text-row", | |
); |
- Handle canonical dataset annotation errors specially so that they can be displayed in the new input field. - Improve annotations validation to remove empty annotations and duplicates Issue #2542
99cf131
to
877beac
Compare
(in Editor) Issue #2542
- Fix the findDuplicates method to return the correct result Issue #2542
Issue #2542
And remove dev code Issue #2542
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and tested this feature on my local instance of metacatUI. I was able to add, view and modify source dataset annotations, these changes looks good to me. Thank you @robyngit
Use DOI url as example of proper value for annotation value Issue #2542
@@ -175,7 +174,7 @@ define(["jquery", "underscore", "backbone"], function ($, _, Backbone) { | |||
|
|||
/* Let the top level package know of attribute changes from this object */ | |||
trickleUpChange: function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [eslint] <object-shorthand> reported by reviewdog 🐶
Expected method shorthand.
trickleUpChange: function () { | |
trickleUpChange () { |
Add an input in the Overview page of the EML Editor View that allows users to identify the authoritative version of the dataset: