Dataverse: Add "Add Data" to navbar, plus Host Dataverse input to create dataverse/dataset forms

Created on 7 Mar 2019  路  22Comments  路  Source: IQSS/dataverse

One way to have people create more dataverses is to make it easier to see how to do it. People who get to dataverse from google and bypass the home page or search results page don't see a clear way to add data.

One solution: adding a button to the header on every page will help make it clear how to add to Harvard Dataverse.

_Adding a button. The button has a dropdown to select a new dataverse or new dataset, as current Add Data functionality from the buttons on the home page:_
add_data_header_loggedin

If users are not logged in, the Log in/Sign in popup with a link to sign up (issue #6170) is shown.
Proposed flow:
Add_data_header_flow

_Removing the "Add Data" button from the search results page, and showing it on the header for not logged in users:_
add_data_header_search_nologin

Medium

All 22 comments

Adding the ability to add data from the header means that users need to be able to select the dataverse and/or dataset that they want to deposit data to or create a dataverse in. We would want to show users the dataverses they have permission to add to. This needs to be thought through for admins so that we do not show all options.

Screen Shot 2019-05-02 at 10 24 34 AM
create_dataset2

[SORRY: Mistakenly left this comment on the wrong issue on 3/8.]

Adding this feature should including resolving this issue, _Moving Dataverses + Datasets: Provide way in the UI for a user to do this #2073_.

The navbar contains links for actions at the root/installation level. When you sign up for an account, the account is created at the highest level. When you use the search input, you are searching all contents of the root/installation. Following that logic, clicking "Add Data" would deposit the dataset/dataverse into the root dataverse, which goes against the preferred workflow, of depositing datasets into your own dataverse.

[ALSO: Adding comments from other related issues that were closed as those issues were consolidated into this issue.]

@ajirnyi commented on Jan 14, 2016 in issue #2874

When the base URL is long enough (e.g. 49 symbols in our test case), the Identifier entry field is too short except for very wide browser windows, and it is not possible to see the text entered there (see example below). The issue is most noticeable in Firefox (box is too small up to screen width of 1183 pixels, after which it instantly expands), but is present in all browsers.

dvidentifier

...

@kaitlinnewson commented on Oct 17, 2017 in issue #4212

Hi Harvard team!

We received a report from one of our users about display issues on the 'Create a new dataverse' page. I've tested this in both the Scholars Portal instance and the Harvard instance, have tested in Chrome (v 61.0.3163.100) and Firefox (v 56.0), and am using OSX 10.11.6.

The issue seems to happen at a screen width of 990px or less, and causes text overlap and the inability to see text entered into the identifier field. I've attached a couple of screenshots for reference.

screen shot 2017-10-17 at 2 44 24 pm

screen shot 2017-10-17 at 2 44 39 pm

Let me know if you need any more information!

@TaniaSchlatter I moved this over to the design column on the board. Feel free to move back to inbox if this is not the correct status.

Related issue #5493 (closed), #5874: Push researchers towards Dataverse Creation and Dataset Linking from Journal Acceptance Notifications

Related: As the creator of a dataverse I'd like to know how to make an "Add Data" button appear for non-logged in users to encourage user interaction #5718

  • ~Consider a configuration option for whether or not it displays on the custom homepage~
  • We could consider a different experience (drop down vs type ahead) depending on the number of dataverses available for selection (consider 5 as a start)
  • Noted some performance concerns about the dataverses list, but we've done work in this area so it may now be more performant (caching? does changing host update dataverse metadata fields? does changing host update dataset template dropdown?)
  • The goal is more participation and more users uploading data, so we don't want it under the name drop down, we should consider internationalization issues re: width
  • We could use Google Analytics or look at the number of records in the DB
  • Evaluate responsiveness of Dataverse create form (#2874, #4212)

Outline of the moving parts:

_navbar_

  • [x] add data dropdown link
  • [x] noopener
  • [x] responsive layout (SM < 992px)

_edit/create dataverse form_

  • [x] host dataverse UI component (create only)
  • [x] host dataverse backend (refactoring of original beta code; related? #2073)
  • [x] host dataverse backend page refresh on select/change
  • [x] responsive layout (#2874, #4212)
  • [x] accessibility/label
  • [x] accessibility/required
  • [x] accessibility/tabindex

_view dataverse pg_

  • [x] responsive layout/metrics[root only]; btn block: contact/share, publish/link/edit

_edit/create dataset form_

  • [x] host dataverse UI component (create only)
  • [x] host dataverse backend (refactoring of original beta code; related? #2073)
  • [x] host dataverse backend page refresh on select/change
  • [x] responsive layout
  • [x] accessibility/required

_view dataset pg_

  • [x] responsive layout/btn block: contact/share, publish/link/edit
  • [x] responsive layout/deaccession (#6162)

_view file pg_

  • [x] responsive layout/deaccession

_contact form_

  • [x] accessibility/label

_my data_

  • [x] add data dropdown btn (#3923)

_user guide_

  • [x] account creation + management
  • [x] dataverse management
  • [x] dataset + file management

_release notes_

  • [x] Add Data and Host Dataverse

OUT OF SCOPE

_edit/create dataset form_

  • accessibility/label (needs some input from @scolapasta, new issue _Create/Edit Dataset Form - need dynamic ID's for input and textarea components #6310_)

After reviewing the progress on the to-do list above, we have revised the final scope to break off some accessibility improvements for another development effort. What remains is the backend review/refactoring/optimization of the Host Dataverse dropdowns that were added to the create/edit dataverse and dataset forms, as outlined in Danny's comment above.

  • Noted some performance concerns about the dataverses list, but we've done work in this area so it may now be more performant (caching? does changing host update dataverse metadata fields? does changing host update dataset template dropdown?)

That part of the scope is represented in the unchecked "host dataverse backend" items for the create/edit dataverse and dataset forms, in the to-do list above. This issue is ready to pick up by any developer ready to tackle those final development items. Meanwhile, I will be adding release notes and documentation changes to check off the last outstanding to-do items.

Revised the remaining backend to-do list items to be more specific, requiring a review of the functionality and refactoring of the code that was original to 4.0-beta and most likely hasn't been touched since.

Also, after reviewing with @landreev, @scolapasta and @djbrooke, added new to-do items to wire up a form/page refresh upon select/change in order to update dynamic content on the page (e.g. breadcrumbs, Metadata Fields and Browse/Search Facets on the dataverse form, Dataset Template on the dataset form).

There are most likely UI implication on the dataverse form with this change (most Host Dataverse component to top of form, like the dataset form), that we should review once a demo of the refresh functionality with @TaniaSchlatter is possible.

Moved host dataverse select component on dataverse form, added bundle info msg (see screenshot, attn: @TaniaSchlatter). Added same info msg to the host dataverse select component on the dataset form as well.

@landreev ~notice a bug on the create dataverse form that would not forward the user after clicking Save Changes from the form to the success msg view on the new dataverse pg. Manually navigating to the root dataverse pg however would show you the new dataverse was in fact created.~

Screen Shot 2019-11-01 at 2 26 17 PM

Thanks @mheppler. The "Changing the host dataverse..." text is a little odd since fields are populated by default, but I'm ok with moving it forward as is.

Having the "Dataverse" field say "Dataverse Name" helps clarify.

@landreev Revised my comment about to strike the bug report, as I saw the same issue on develop and was able to finally make it to the success msg after starting everything and giving the page a longer wait time than I may have previously.

One thing both @mheppler and I noticed, when creating a new dataverse, you see the following message in server.log:

unable to index dataverse. id was null (alias: anothertest)

it is extra weird, because the new dataverse you have just created does actually get indexed successfully; so it's a false alarm of some kind.
This is NOT something introduced in this branch - I checked the logs in prod.:

# grep 'unable to index dataverse' server.log_2019-10-*
server.log_2019-10-01T13-57-08:  unable to index dataverse. id was null (alias: garlick_auto)]]
server.log_2019-10-02T14-16-54:  unable to index dataverse. id was null (alias: uoregon)]]
server.log_2019-10-03T12-02-00:  unable to index dataverse. id was null (alias: lysi)]]
server.log_2019-10-03T12-02-00:  unable to index dataverse. id was null (alias: PSVMOU)]]
server.log_2019-10-03T14-06-27:  unable to index dataverse. id was null (alias: Meerow)]]
server.log_2019-10-04T07-11-36:  unable to index dataverse. id was null (alias: ywiratamajemm)]]
server.log_2019-10-04T12-57-37:  unable to index dataverse. id was null (alias: PEDPEFC)]]
server.log_2019-10-04T14-18-11:  unable to index dataverse. id was null (alias: stevenmvanhauwaert)]]
server.log_2019-10-04T16-04-35:  unable to index dataverse. id was null (alias: hms-genetics)]]
server.log_2019-10-06T00-30-24:  unable to index dataverse. id was null (alias: yangyangzhou)]]
server.log_2019-10-08T10-28-03:  unable to index dataverse. id was null (alias: weather_radar)]]
server.log_2019-10-09T02-51-34:  unable to index dataverse. id was null (alias: Kolya)]]
server.log_2019-10-09T02-51-34:  unable to index dataverse. id was null (alias: Amelita)]]
server.log_2019-10-10T17-15-24:  unable to index dataverse. id was null (alias: DALYs)]]
server.log_2019-10-12T02-01-52:  unable to index dataverse. id was null (alias: keithchen)]]
server.log_2019-10-12T14-06-11:  unable to index dataverse. id was null (alias: foolishnessprototypes)]]
server.log_2019-10-16T04-29-13:  unable to index dataverse. id was null (alias: SM)]]
server.log_2019-10-16T04-29-13:  unable to index dataverse. id was null (alias: DrManishGehani)]]
server.log_2019-10-17T15-29-07:  unable to index dataverse. id was null (alias: foobar)]]
server.log_2019-10-17T19-22-56:  unable to index dataverse. id was null (alias: byers)]]
server.log_2019-10-18T05-55-38:  unable to index dataverse. id was null (alias: dkf)]]
server.log_2019-10-18T05-55-38:  unable to index dataverse. id was null (alias: lemola)]]
server.log_2019-10-18T15-54-18:  unable to index dataverse. id was null (alias: m2filaments)]]
server.log_2019-10-22T08-35-48:  unable to index dataverse. id was null (alias: dividendindia)]]
server.log_2019-10-22T17-33-11:  unable to index dataverse. id was null (alias: DFCpastoral)]]
server.log_2019-10-23T11-30-23:  unable to index dataverse. id was null (alias: pnas_dropletafm)]]
server.log_2019-10-23T11-30-23:  unable to index dataverse. id was null (alias: testtesttest)]]
server.log_2019-10-23T16-02-33:  unable to index dataverse. id was null (alias: RandyCragun)]]
server.log_2019-10-24T08-59-03:  unable to index dataverse. id was null (alias: fomin)]]
server.log_2019-10-24T18-06-43:  unable to index dataverse. id was null (alias: GUD_CS510)]]
server.log_2019-10-28T13-40-58:  unable to index dataverse. id was null (alias: jclark10)]]
server.log_2019-10-29T05-11-04:  unable to index dataverse. id was null (alias: nmhhg8)]]

I'm opening a new issue for this; curios what's going on (maybe there's an extra index call somewhere in the create dataverse command, that tries to index a stale dataverse copy that hasn't been persisted yet??). But it doesn't appear to be a fatal condition.

Created #6337 for the above.

Mr. @mheppler and I had an executive conference and made a decision to close the to-do checklist and advance this issue on its natural course across the project board.

There are a couple of verbose debugging messages left in the code; specifically, the following:

  New host dataverse id: 79610
  Created a new new dataverse.

in server.log when selecting a new host dataverse.
I'd like to keep these in place during QA, and remove them when we're ready to merge.

@mheppler So I switched from the selectOne pulldown menu, to the autoComplete setup similar to what we have in the linking popups.
Could you please take a look at the branch and see if any cosmetic readjustments are needed?

Cleaned up the markup and CSS for autoComplete component on edit dataverse and dataset forms. This will also improve the consistency of other instances of this component across the app, like in the link dataset, create group, assign roles and other workflows. There is no change to the functionality of the component, just improving the consistency of the width and padding of the component in the form compared to other form components on the page.

Screen Shot 2019-11-07 at 12 16 12 PM

@landreev will clicking around on the create/edit dataverse and create/edit dataset versions of these forms, I stumbled across two issues that need to resolved:

  • [x] on edit dataverse version of the form, the Host Dataverse autoComplete component is displayed, and not the static text version (see the edit dataset form for how edit the host after create is not allowed)
  • [x] autoComplete components on both dataverse and dataset forms are missing "No results found" emptyMessage attribute (see example on dashboard-datamove form)

@mheppler OK, checked in fixes for the 2 things above.

The issue mentioned in the PR appears to be the result of primefaces autoComplete giving us trouble; it also looks like it's something we've seen on another page before. Parking it in dev., we'll be working on it first thing next week.

Various references for autoComplete/duplicate ID's:

  • _JSF errors when adding a dataset: duplicated component IDs #5586_ (with PR #6025)
  • _Binding attribute causes duplicate component ID found in the view (Stack Overflow)_
  • _Too much logging messages #5749_
Was this page helpful?
0 / 5 - 0 ratings