Skip to content

Remove 'Sort by relevance' option on Bookmarks page - #5109

Closed
RyanAJensen wants to merge 90 commits into
mainfrom
4440-relevance-fixed
Closed

Remove 'Sort by relevance' option on Bookmarks page#5109
RyanAJensen wants to merge 90 commits into
mainfrom
4440-relevance-fixed

Conversation

@RyanAJensen

Copy link
Copy Markdown
Contributor

Initial work for #4440

christinach and others added 30 commits July 30, 2025 13:13
* Update Readme - Development - pre-requisites section

* Add components for displaying format badges

* Use Format badge in place of format_icon helper method

---------

Co-authored-by: Christina Chortaria <actspatial@gmail.com>
* Update online options display

* Ignore FeatureEnvy smell

---------

Co-authored-by: Ryan Laddusaw <rladdusaw@princeton.edu>
…4968)

The dialog does not yet show unless you call the following in your
browser console:

document.getElementById('bookmark-login').showModal()

Helps with #4927
Some items not available -> Some Available
Ask Staff -> Request
On-Site Access -> Available
View Record for Full Availability -> Available
temp locations are always available
boundwiths are always available

partof #4929
* Add a new bookmark button component

This bookmark button replaces the bookmark checkbox on the search
results page.

The first time a non-logged in user presses the button, they are
shown a dialog that encourages them to sign in.  The bookmark is
added, whether or not they choose to sign in.  We then record
the timestamp in localStorage, and do not show them the dialog
again as long as that localStorage is present.

Advances #4910
Advances #4927

* set js: true in spec/features/bookmarks_spec.rb

* Update mocking in component test

Co-authored-by: Christina Chortaria <christinach@users.noreply.github.com>

---------

Co-authored-by: Christina Chortaria <actspatial@gmail.com>
Co-authored-by: Christina Chortaria <christinach@users.noreply.github.com>
search results page should display Available
partof #4929
* Set focus on the whole dialog body, rather than the close button
* Adjust spacing in the dialog
* Attempt to only display focus indicator in dialog when the user
  opens it with keyboard input using focus-visible rather than
  focus (note that this works for Firefox and Chrome, but not Safari
* Round the edges of the dialog
* Use an orange, lux-style focus indicator
Co-authored-by: Ryan Jensen <RyanAJensen@users.noreply.github.com>
* WIP remove browse link from results page

* Fix failing test by supplying context

Co-authored-by: Ryan Jensen <RyanAJensen@users.noreply.github.com>

---------

Co-authored-by: Ryan Laddusaw <rladdusaw@princeton.edu>
Co-authored-by: Ryan Jensen <RyanAJensen@users.noreply.github.com>
but did not update the Bookmark all button's selectors
accordingly.

This PR updates those selectors, and also rewrites the
Bookmark all javascript from jquery to Vue.
* Allow icons to overflow to prevent getting cut off

* improve styles

---------

Co-authored-by: Ryan Laddusaw <rladdusaw@princeton.edu>
generate new reek

In the search results availability should only display the Library name.
* Firestone locations are sorted before non-Firestone locations
* Offsite locations are sorted after onsite locations
* Otherwise, locations are sorted alphabetically by library then location
…if already present in the location name (#5006)

Thanks @ellen-aa for finding this case, where Lewis Library has a location whose name
starts with "Lewis Library", meaning that we previously got the redundant label
"Lewis Library - Lewis Library - Serials (Off-Site)"
* Annex holdings should be included whether they start with Annex or Forrestal
* Lewis off-site serials should be included
* [#4912] Update display to use lux-card
Import lux-card
Use lux-card to display holdings in the search results
Add new class to wrap lux-card in a flebox.
Remove stale code that it should have been removed with a newer blacklight release.

* Import and use LuxTextStyle

* Move online holdings content block in its own div

* Update 4th card with correct class and content

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

* Small adjustments to card layout

Co-authored-by: Christina Chortaria <christinach@users.noreply.github.com>
Co-authored-by: Ryan Jensen <RyanAJensen@users.noreply.github.com>

* Sort holdings on the search results page by library

Firestone must come first, remote holdings must come last

Co-authored-by: Christina Chortaria <christinach@users.noreply.github.com>
Co-authored-by: Ryan Jensen <RyanAJensen@users.noreply.github.com>

* Fix js tests. Update availability js and revert styling changes in the show page

* Update js specs and js file to pass the test

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

* Fixed accessibility failure becuse of wrong li structure
Update test to include js: true
Mark spec as pending.

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

* Minor follow-ups to tests

* Simplify an overly specific css selector
* Remove some assertions and a test that are no longer valid

* Adjust capybara wait

This passes locally, but not in CI

* exclude a test from ci

---------

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>
Co-authored-by: Jane Sandberg <js7389@princeton.edu>
Co-authored-by: Christina Chortaria <christinach@users.noreply.github.com>
Co-authored-by: Ryan Jensen <RyanAJensen@users.noreply.github.com>
* Change "Browse related items" to "Call no. browse"

Add aria-label="Call number button" to link for Voice Over accessibility

Remove accompanying icon

Remove rspec test that checks if accompanying icon is present

* Remove aria-label from "Call no. browse" link

---------

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
RyanAJensen and others added 24 commits July 30, 2025 13:21
Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Previously, the location eastasian appeared as 'East Asian Library -'.  With this commit,
it simply appears on the show page as 'East Asian Library'.
Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
)

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
…n't appear so far apart (#5076)

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
* Add rounded corners to 'Other versions' sidebar box

* Update app/assets/stylesheets/components/availability.scss

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

---------

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>
…tring literals (#5079)

Also, add a comment describing the class to fix the last remaining
reek issue on this class.
Replace btn-xs with btn-sm. Bootstrap 5 uses two sizes btn-sm and btn-lg

adresses [#5067]
…h thumbnail (#5082)

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Before this commit, when a user opened a holding group on the show page, pressed the
Request button, then pressed the Return to Record button, the holding group was
no longer open.

This commit adds a param to the requests form that allows this Return button to
take the user back to the show page with the desired groups open.

Co-authored-by: Christina Chortaria <actspatial@gmail.com>
* Add Livre Franklin

* Using Libre Franklin font

* Add license

---------

Co-authored-by: Ryan Laddusaw <rladdusaw@princeton.edu>
Previously, we downloaded the font franklin-gothic-urw from Adobe,
and used it in a handful of lux components.

We are moving from franklin-gothic-urw to Libre Franklin, since
it is now recommended by the communications office and it is a
variable font.

Therefore, for the sake of consistency and saving the user some
bandwidth, we only use Libre Franklin.
This was previously used by a method named
sorted_physical_holdings, which no longer
exists (replaced by grouped_physical_holdings)
In main, this method is covered by other tests, but in our
feature branch, it was not (maybe it is always mocked or
something?)
* Add padding around online results section on Search Results

* Update app/assets/stylesheets/components/format.scss

Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>

---------

Co-authored-by: Ryan Jensen <rj1044@princeton.edu>
Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>
@RyanAJensen
RyanAJensen force-pushed the 4440-relevance-fixed branch from 7b62990 to 3f014c2 Compare July 30, 2025 18:20
@christinach
christinach force-pushed the orangelight-pos-workcycle-07072025 branch from b532813 to f96ffca Compare August 1, 2025 14:23
Base automatically changed from orangelight-pos-workcycle-07072025 to main August 1, 2025 14:32
@christinach

Copy link
Copy Markdown
Member

closing in favor of #5633

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants