NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
41 stars 26 forks source link

Add a message to the arctic editor that indicates the submission is under review #258

Closed laurenwalker closed 6 years ago

rushirajnenuji commented 6 years ago

Does this mean that when the user clicks on Submit (after filling all the metadata fields), this message should be displayed on the screen? Also does this have to be specific to the ARCTIC theme?!

rushirajnenuji commented 6 years ago

Added a property contentIsModerated in the AppModel.js. Based on this boolean value, the success message displays appropriate text. For now, only the Arctic theme has contentIsModerated = true.

laurenwalker commented 6 years ago

@rushirajnenuji - Can you add the contentModerated attribute to all the theme AppModels? Whenever we add a new AppModel attribute, we usually make sure the default is set on all themes so we don't ever run into a JS error referencing an undefined variable.

We also should have a more descriptive message. The message we show in the Arctic Data Center registry now seems to be working well, so let's keep using that. It is in the template insertProgress.html. The message is:

<h1>Thank you for your submission</h1>
<h3>Your data set is now under review by the Arctic Data Center team.</h3>
<p>No further action is required at this point; we will contact you by email.</p>       
<p>Once the review and any revisions are complete, we will assign a DOI, and publicly publish the data package. Until then, it will not be publicly visible.</p>

The hardcoded "Arctic Data Center" will need to be replaced by a dynamically inserted theme name, via the MetacatUI.themeTitle variable.

rushirajnenuji commented 6 years ago

Hey @laurenwalker, regarding the contentIsModerated attribute, Chris suggested that if it is present in the main AppModel then we don't need to add that to each theme's individual AppModel. But, I'll make that change. And regarding the success alert, the insertProgress.html looks more formal and informative. I'll start working on these changes asap. Thanks!

laurenwalker commented 6 years ago

Unfortunately the theme AppModels do not use the default AppModel as a prototype to build upon. We have plans in the future to make the MetacatUI configuration easier in that way, but as of now each theme has it's own AppModel completely independent of the default AppModel, so there is some redundancy.

rushirajnenuji commented 6 years ago

Ah, I get that. Sure, no problem. I'll add the attribute and set it to false for the remaining themes.

laurenwalker commented 6 years ago

This is looking really good!

After testing it out, I think we should show the message until the user clicks the "X" button to remove it. Otherwise, it only displays a few seconds and it is difficult to read it that fast.

The showAlert() function should have an option to remove the timeout and add an "X" remove button.

Also, let's reduce the size of the font a bit. That may be done by increasing the header level from h1 to h2, h2 to h3, etc.

csjx commented 6 years ago

Ah, yes, I forgot we are not extending AppModel. Thanks for catching that @laurenwalker

laurenwalker commented 6 years ago

Fixed in 79734d649740550298a38896c598148742dd66c6