Giter Club home page Giter Club logo

search's Introduction

Search

This repository contains the front-end code that generates the UI and connects to the middle and backend.

Getting Started

1. Clone Search

git clone https://github.com/mlibrary/search.git

2. Install

npm install

3. Run Locally

npm start

Troubleshooting

TypeError: Cannot read properties of undefined (reading 'isFunction')

If you load the site and it produces this error:

Screen Shot 2022-03-30 at 3 06 10 PM

1. Stop the browser view (Ctrl + C)
2. Navigate to the pride dependency
cd node_modules/pride
3. Edit pride.js
nano pride.js
4. Replace all instances of _underscore._. with _underscore. and save.
5. Install pride
npm install
6. Go back and rerun the app
cd ../../ && npm start

ERR_OSSL_EVP_UNSUPPORTED

If you run npm start and receive this error:

Error: error:0308010C:digital envelope routines::unsupported
 opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
1. Check current version of Node
node --version

If the version of Node is higher than 17, follow the next step.

2. Export NODE_OPTIONS
export NODE_OPTIONS=--openssl-legacy-provider
3. Run the app
npm start

CSS

Style using Emotion's CSS object styles. To see examples look to the ResourceAccess or Metadata modules and related components.

We no longer write new Sass for this project.

Local Development

Local development will only work if you have access to the UMich network. This is a requirment for communicating with the backend service (Spectrum).

Create React App

This project was bootstrapped with Create React App. This will explain why you are seeing a lack of configuration (babel, webpack...) since Create React App is for "creating React apps with no build configuration".

search's People

Contributors

bertrama avatar billdueber avatar bridgetburke avatar dependabot[bot] avatar erinesullivan avatar jonearley avatar niquerio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

bertrama

search's Issues

Add Ask a Librarian widget to search interface

Tasks

<dl> elements must only directly contain properly-ordered <dt> and <dd> groups

Problem

Axe throws this issue title as an error flagged serious.

Records use a <dl> to display fields. React requires a parent container and so <dt> and <dd> pairs are wrapped in a <div>.

Solutions

Need to include 'Citation only (no full text)' text near 'Read Article' Button in Articles Datastore Records (Medium view records and Full Record page)

The 'MGet It' button gives additional context about the record it links to with either 'Full Text Online' or 'Citation only (no full text)' messages as part of the button. This explanatory text appears in the 'MGet It' buttons label text in search result pages and full record pages. (See example below of full record page)

screencapture-lib-umich-edu-articles-details-fetch-logical-a18798-66157917a5068ecb385dcf0aaa0b83ad13dc75cc629c6cf5e32a5abec04227a82-1502205411074

The same record in the Search Beta does not have the accompanying text. (See Below) Could we include the 'Citation only (no full text)' message to the side or below the 'Go to Item' button link?

no full text in search beta

As an advanced user, I want to see the full MARC record for a catalog item in the search interface so I can laugh at its cruddy encapsulation of cataloging data.

In the full view, a user can access the MARC record for that item
https://docs.google.com/document/d/16e4tU6rPuc--wvToz-JEBnDwckHl9Lm_8sb0PJpceyc/edit#heading=h.s8cn5nzb8pja

For full launch, present MARC data in the interface.

Tasks

As a librarian, I want users to be limited to their institution, so that they are scoped by default to our materials.

Context
When a user is at the catalog landing page (not searching), they should be able to select what institution they want to be filtered to. Related specs document.

Tasks

  • @Treevore Finalize institution selection designs and share them here.
  • @bertrama Figure out a way to pass a user's default institution to the front-end.
  • @jonearley Create custom landing page institution filter selection UI for the catalog datastore.
  • @jonearley Make it so that an institution is sticky to a user in the UI, unless they manually change it.
  • @jonearley Have the catalog advanced narrow search to widget use the active institution state.

Supporting evidence
?

Success criteria
When all tasks are complete.

Add a footer with Regents copyright statement

Nowhere else really makes sense to have the copyright statement and keep it persistent. Let's do a super minimal footer. Same background as site header. With the text below in white and centered. Break onto two lines after the first sentence on mobile. Footer can evolve in the future if we need to add anything else.

Copyright © 2017 Regents of the University of Michigan. For details and exceptions, see the Library Copyright Statement.

Tasks

As a new user, I want to understand what datastores are about, so that I get an idea where to begin.

Context
Before a user beings a search we want to provide "landing page" content so the user can get an idea about what each datastore is about and what type of resources they can expect in their results.

Tasks

Success criteria
When all of the tasks are complete.

Labels for Get This, Request This, Advance Booking

Make the action labels for physical holdings in Search Beta match those in current Mirlyn:

Bentley, Clements, or Special Collections where the link points to Aeon and the label should be Request This
https://earleyj-drupal8.www.lib.umich.edu/catalog/record/002741364?query=Cole+papers
https://earleyj-drupal8.www.lib.umich.edu/catalog/record/011692286?query=Cole+papers&filter.location=Special+Collections
https://earleyj-drupal8.www.lib.umich.edu/catalog/record/001169068?query=Cole+papers&filter.location=Special+Collections
https://earleyj-drupal8.www.lib.umich.edu/catalog/record/012918935?query=Cole+papers&filter.location=William+L.+Clements+Library

Askwith Media Library the link point to the advanced booking feature in Mirlyn Classic and the label should be Advance Booking
https://earleyj-drupal8.www.lib.umich.edu/catalog/record/013680870?query=Awakening&filter.location=Askwith+Media+Library

  • If it's a physical holding in any other library, the label should be Get This

Holdings Information and text links missing in medium/full record pages

  1. The medium record (shown below) displays 'request this media item' and 'request this item' text links but they aren't currently linked to anything.

screen shot 2017-08-08 at 11 42 07 am
Link to catalog search results with record above: https://earleyj-drupal8.www.lib.umich.edu/catalog?query=Robert+Altman&filter.location=Special+Collections

  1. The same 'request this media item' and 'request this item' links (shown in the medium record) do not appear in the corresponding full record page (shown below)
    full record page missing action text links
    Link to full record shown above: https://earleyj-drupal8.www.lib.umich.edu/catalog/record/005538759?query=Robert+Altman&filter.location=Special+Collections

  2. Current Full Record in Mirlyn does not have a request link for the item with a 'Building use only' status but we do have a Request this item link in Search Beta. Is this item really requestable?
    It's also not clear how to request the item in the Donald Hall Collection (no call number or identifying info other than the title). (Probably a Special Collections metadata issue)

mirlyn full record

Link to Mirlyn Record: https://mirlyn.lib.umich.edu/Record/005538759/Holdings#tabs

Institution Filter is Persistent

From the spec :

Some libraries that contribute their catalog records to Mirlyn have searches that are scoped to them: Flint, Bentley, Clements, and Ann Arbor Libraries. Selecting one of these libraries, or accessing from a defined IP address, has the following effects:

Bentley
Searches are restricted to Bentley Historical Library (inst=bentley)

Clements
Searches are restricted to Clements Historical Library (inst=clements)

Ann Arbor Libraries
All Ann Arbor libraries (U-M Library, Bentley, and Clements) (inst=aa)

Flint
Searches are restricted to Flint’s holdings (inst=flint). Also:

For each URL found in a bibliographic record 856 field (with indicators that it's the resource itself rather than ancillary material) one of three things can happen:

  1. If there's already a proxy prefix in the record url, it is used without change.
  2. If the Flint library is selected, or access is from an IP address known to be on the Flint campus, or the user is logged in and has a primary affiliation with the Flint campus, then the Flint proxy prefix (http://libproxy.umflint.edu:2048/login?url=) is prepended to the record url.
  3. Otherwise, the Ann Arbor proxy prefix is prepended to the record url.

Ask a Librarian link goes to Flint’s service, http://libguides.umflint.edu/ask

This filter should be sticky for an entire user’s session, unless changed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.