sul-dlss / happy-heron

Self-Deposit for the Stanford Digital Repository (SDR): H2 is a Rails web application enabling users to deposit scholarly content into SDR
Apache License 2.0
10 stars 2 forks source link

The depositor can provide keywords #82

Closed jcoyne closed 4 years ago

jcoyne commented 4 years ago
Screen Shot 2020-09-23 at 10 39 38 PM

This eventually gets persisted as a MODS subject/topic https://github.com/sul-dlss-labs/cocina-descriptive-metadata/blob/master/mods_cocina_mappings/mods_to_cocina_subject.txt

Consider something like this? https://github.com/jshjohnson/Choices

justinlittman commented 4 years ago

It is available from Cornell's QA: https://lookup.ld4l.org/authority_list

jcoyne commented 4 years ago

@justinlittman That's a good option, but we still want the product owner to weigh the following:

jcoyne commented 4 years ago

Here is what the markup that react-bootstrap-typeahead used and it achieves much of the look that Astrid has prescribed:

<div class="form-group">
  <div class="rbt clearfix open" style="position: relative;" tabindex="-1">
    <div class="form-control rbt-input-multi rbt-input" tabindex="-1">
      <div class="rbt-input-wrapper">
       <div tabindex="0" class="rbt-token rbt-token-removeable">
          <a href="http://id.loc.gov/vocabulary/mediaTypes/s" rel="noopener noreferrer" target="_blank">audio</a>
          <button tabindex="-1" aria-label="Remove" class="close rbt-close rbt-token-remove-button" type="button"><span aria-hidden="true">×</span><span class="sr-only">Remove</span></button>
        </div>
         <div tabindex="0" class="rbt-token rbt-token-removeable">
           flour<button tabindex="-1" aria-label="Remove" class="close rbt-close rbt-token-remove-button" type="button"><span aria-hidden="true">×</span><span class="sr-only">Remove</span></button>
        </div>
        <div class="rbt-input-hint-container" style="position: relative;">
          <div style="position: relative; z-index: 1; display: inline-block;">
          <input aria-autocomplete="list" aria-haspopup="listbox" autocomplete="nope" type="text" style="background-color: transparent; border: 0px none; box-shadow: none; cursor: inherit; outline: currentcolor none medium; padding: 0px; box-sizing: content-box; width: 3px;" class="rbt-input-main" value="" aria-owns="loc-vocab-list">
            <div style="height: 0px; left: 0px; overflow: scroll; position: absolute; top: 0px; visibility: hidden; white-space: pre; font-size: 16px; font-family: &quot;Source Sans Pro&quot;, sans-serif; font-weight: 400; font-style: normal; letter-spacing: normal; text-transform: none;"></div>
        </div>
        <div class="rbt-input-hint" style="left: 0px; pointer-events: none; position: absolute; top: 0px; display: inline-block;"><input aria-hidden="true" readonly="" style="background-color: transparent; border-color: transparent; box-shadow: none; color: rgba(0, 0, 0, 0.35); box-sizing: content-box; width: 3px; border-style: none; border-width: 0px; font-size: 16px; line-height: 24px; margin: 1px 0px 4px; padding: 0px;" tabindex="-1" value=""><div style="height: 0px; left: 0px; overflow: scroll; position: absolute; top: 0px; visibility: hidden; white-space: pre; font-size: 16px; font-family: &quot;Source Sans Pro&quot;, sans-serif; font-weight: 400; font-style: normal; letter-spacing: normal; text-transform: none;"></div></div></div></div></div><div aria-atomic="true" aria-live="polite" class="sr-only rbt-sr-status" role="status">25 results. Use up and down arrow keys to navigate.</div><ul class="rbt-menu dropdown-menu show" id="loc-vocab-list" role="listbox" style="position: absolute; display: block; max-height: 300px; overflow: auto; will-change: transform; width: 466px; top: 0px; left: 0px; transform: translate3d(0px, 38px, 0px);"><li class="dropdown-header">media type</li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">unmediated</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">unmediated</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">unmediated</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">projected</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">stereographic</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">stereographic</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">stereographic</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">microscopic</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">audio</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">audio</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">audio</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">computer</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">computer</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">computer</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">other</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">video</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">video</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">video</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">unspecified</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">unspecified</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">unspecified</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">microform</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">microform</a></li><li aria-selected="false" id="rbt-menu-item-undefined" role="option" class=""><a class="dropdown-item" href="#">microform</a></li></ul></div></div>
Screen Shot 2020-09-25 at 9 41 38 AM
amyehodge commented 4 years ago

@justinlittman That's a good option, but we still want the product owner to weigh the following:

  • Would this be an authorized use of that service?
  • Can we expect that they will maintain that for the time frame where we need it?
  • Do we want to tolerate service interruption when Cornell has an outage.
  • How do we need to engage with Cornells so that we are aware of changes to that service.

I have talked with Lynnette Rayle at Cornell. There is no problem with our using their service for this purpose. I have also discussed with @hannahfrost and neither of us are overly concerned about using this service, though we are aware that relying on any outside service has its risks. The risks are mitigated in our case here by always maintaining the free-text entry as well, so that depositors do not encounter a situation where the required keyword element can't be entered, thereby preventing them from submitting an item for deposit. I'm pasting my conversation with Lynette in below, as it contains some details about the available services that you may want to consider. Please read from the bottom up.

Yes the grant runs through mid-year 2022.

Cache is OCLCFAST_LD4L_CACHE also through QA Direct is OCLCFAST_DIRECT also through QA. Direct means that QA makes the call to OCLC through their API.

I checked on your other question about downtime. Those numbers can be inflated when an error occurs and we are debugging the problem. The tests will be run multiple times on the same day with many failures. OCLCFAST_DIRECT was down 21 days in the past 365 days. So it was up 95% of the time during the last year.

Lynette

From: "Amy E. Hodge" amyhodge@stanford.edu Date: Wednesday, October 14, 2020 at 12:49 PM To: Lynette Rayle elr37@cornell.edu Cc: Dave Eichmann david-eichmann@uiowa.edu Subject: Re: Questions about using QA's OCLC FAST lookup in another Stanford project

Hi Lynette,

Thanks for the quick responses.

The current grant is scheduled to run through 2022, is that correct? I assume you expect this to be running at least that long, correct? (No promises, I understand.)

And, by your cache system, are you referring to OCLCFAST_LD4L_CACHE? And by direct access do you mean one of the other two OCLC FAST services in your list, or do you mean via OCLC directly and not using Cornell’s QA system?

Thanks,

~ Amy

From: Lynette Rayle elr37@cornell.edu Date: Wednesday, October 14, 2020 at 9:40 AM To: Amy E. Hodge amyhodge@stanford.edu Cc: Dave Eichmann david-eichmann@uiowa.edu Subject: Re: Questions about using QA's OCLC FAST lookup in another Stanford project

Hi Amy,

If you want to use OCLCFAST, you have two choices. 1) our cache system, or 2) direct access

The two services are roughly equivalent in what they return.

Our cache system has several value-adds… · results are sorted based on search ranking · results include pagination information allowing a request for additional results The cons of the cache system are that it is grant funded and we don’t know for sure when the grant will finally end and whether the resources will have a life beyond the grant. We are working on a sustainability plan and have begun work that will support sites setting up their own cache + qa lookup services. The work is too early on to comment on the likely hood of success or timing of availability.

The advantage of the direct access approach is that it is supported by the Samvera open source community which is a vibrant community expected to have a long life. Should our services retire, you would be able to setup your own lookup service with minimal effort and resources. The cons for the direct approach is that results are sorted alphabetically and you do not have the option to retrieve additional results.

Lynette

amyehodge commented 4 years ago

@jcoyne FYI from Lynette: We generally announce changes on Slack in the #authorities channel (https://ld4.slack.com/archives/C9EREFC3Z). If you can’t access the LD4P Slack, Michelle should be able to help you with that.

jcoyne commented 4 years ago

@amyehodge Great. Sounds like we have a plan.