GithubHelp home page GithubHelp logo

sul-dlss / sul-bento-app Goto Github PK

View Code? Open in Web Editor NEW
2.0 17.0 1.0 2.29 MB

The Bento Application for Stanford Library Search

Home Page: https://library.stanford.edu/all

License: Other

Ruby 70.53% JavaScript 3.40% HTML 17.40% SCSS 8.57% Shell 0.10%
access application rails bento

sul-bento-app's Introduction

README

Developer environment

  1. To test agaist a local instance of searchworks, point your settings.local.yml to the local instance of SearchWorks.
  2. Install Gemfile $ bundle install
  3. Install required node modules (requires node be installed) yarn install.
  4. Run bin/dev
  5. Now, you can visit http://localhost:3000/ for the Bento app

Example of running a search from the Rails console

client = HTTP.timeout(30)
article_search = QuickSearch::ArticleSearcher.new(client, "covid").search
# could also be CatalogSearcher or ExhibitsSearcher
article_search.total # total number of search results
article_search.results.size # total number of results actually returned for display, configurable with NUM_RESULTS_SHOWN in settings.yml
article_search.results[0].title # title of the search
article_search.results[0].link # link to the results

Some of the code in this repository was extracted from NCSU/quick_search.

Copyright 2016 North Carolina State University

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

sul-bento-app's People

Contributors

camillevilla avatar cbeer avatar corylown avatar dnoneill avatar hudajkhan avatar jcoyne avatar jkeck avatar jvine avatar marlo-longley avatar mejackreed avatar peetucket avatar sul-devops-team avatar thatbudakguy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

peetucket

sul-bento-app's Issues

Move 'See all results' button

Split off from #68.

The 'See all results' button is currently at the bottom of results. It should appear in the top left corner of the results module.

bento module

Stylin' details for bento (based on -stage 2:12p Friday)

Not sure how much of this is currently WIP in #15

  • please use the btn-primary styling from SearchWorks for the see-all-results links. The current link doesn't stand out enough. Note: it was intentional design to have the "see-all" button up at the top next to the header. If it's not possible to move it within the time constraints, okay; regardless, it needs to be much more visible.

  • base font size should be 15px. Current 16 so it doesn't match either website nor SW.

  • reduce vertical spacing between the elements of each result. Currently individual results are not holding together visually.

  • add the "Full text" label styling (see SW) to the full text links in the Articles+ section.

Update no results experience

It looks like maybe there are links rendered that are intended to be shown at different screen sizes (via foundation) but they are both showing now.

no-results-page

Add a Yewno embed

This is similar to what's already on the library bento page (possibly small JS drop-in?)

replace search placeholder text

Our homepage searchbar currently displays "Search all the things!", (inherited from quick_search-generic_theme) as placeholder text.

Possible solutions:
(1) No placeholder text (shown in mockups)
(2) description text in SearchWorks is "catalog, articles, website, & more in one search"

Opinions, @jvine?

Current

searchbar

Adjust styling for records

  • add description text beneath module title
  • put record title inline with <ol> number
  • reduce font size of record title

Mockup

mockup

Current

screen shot 2017-09-14 at 10 30 54 am

Style jump-to links

  • ignore bracket image
  • restyle current jump-to links (e.g. SearchWorks articles, SearchWorks catalog)
  • add Yewno link
    jump-to-links

javascript errors calling foundation

Uncaught TypeError: $(...).foundation is not a function
    at HTMLDocument.<anonymous> (quick_search_generic_theme.self-f86edabee359830edeb94bd93b23bf087c8d9d70b760a32424c9a7a27aedd3d8.js?body=1:15)
    at fire (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3233)
    at Object.fireWith [as resolveWith] (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3363)
    at Function.ready (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3583)
    at HTMLDocument.completed (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3618)

Add dejavu font to result titles

Dejavu needs to be imported and added to the stylesheets. In SearchWorks, we use Dejavu for record titles because it handles diacritics etc. better than Source Sans Pro.

Add feedback form

The current Feedback link is a dummy link. We'll need something similar to SearchWorks.

feedback form

Write a searcher class to fetch EDS results

We could use the ebsco-eds gem as part of the searcher (which would make a useful gem for anybody else using both EBSCO and our chosen bento framework).

However; we could also use the SearchWorks json endpoint which might greatly reduce the scope and complexity for completing this (given that we'll most likely want to have something similar for catalog results anyway).

One consideration here would be how guest vs. non-guest will work from the bento app. If we're using a ruby class to issue the search to the Blacklight API, then the request's IP address will be that of the bento application itself and not the user.

Write a searcher class to fetch SearchWorks catalog results

Not sure if we'll need multiple here or not. The current bento implementation does two API requests against SearchWorks: one for catalog results and one restricted to just databases (check the design-docs to see if the same is true).

Text/heading cleanup in bento to match SW

  • all <h4> headings should be <h3>
  • remove "Covers ~87% of our subscribed databases." from the Articles+ blurb
  • link "topic-specific databases" in the Catalog blurb to https://searchworks.stanford.edu/databases

Additional Yewno module styling

  • black border to differentiate it from Stanford services
  • Link text should be a button below embedded viewer
  • Subtitle "Explore relationships among concepts"

yewno

Add feedback form related javascript

Proxy - coordinate website/Drupal tasks with Bento implementation

Just to keep track of the Drupal tasks associated with getting the Bento connected:

  • send searches from home page main search box to bento
  • send searches from banner search box (on all pages) to bento
  • rename content types
  • exclude some content types from search (hero image, feature image...)
  • reconfigure SOLR settings and reindex (?)

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.