-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANW-1101 use column prefs for top container listing #3010
ANW-1101 use column prefs for top container listing #3010
Conversation
4bd07f7
to
e3d256c
Compare
9ce06cb
to
b14d475
Compare
0e0cfdb
to
92edd63
Compare
92edd63
to
0a665c9
Compare
Since these changes broke some of the tests in the selenium spec for containers/instances, I took the opportunity to rewrite them as a Capybara feature test. However, some tests required full indexing runs ( Due to issues that the team has been experiencing with some test specs (in many cases old selenium tests or even tests for other apps that have nothing to do with the changes) passing with no issue on our dev machines but failing during GitHub CI. In one case, the selenium |
frontend/app/views/top_containers/bulk_operations/_results.html.erb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donaldjosephsmith Looks good to me, but I did see one type in the view - see suggestion.
…l.erb Co-authored-by: Brian Hoffman <brian.hoffman@lyrasis.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
These changes to the top containers controller and results view make the table listing configure columns based the standard browse/search column preferences and default sort, instead of being hard-coded.
This table view is different than other record types, and the columns and default sort were hard-coded previously. The sorting is performed in client-side javascript, and the user's chosen sort columns are saved in session storage, so the default sort will only take effect at the beginning of a new user session.
A few fields that were present in the hard-coded table had to be added to the search/browse column config in order to make them show up in the select boxes on the preferences page. Something to beware of: the Solr query to fetch the data uses the default sort field/direction from the preferences, so anything there (marked as sortable in
search_browse_column_config.rb
) must have asort_by
field specified that is in the index, otherwise the query will crash. It doesn't impact the results table directly since the data is sorted client-side, but it is an unfortunate complication that limits what can be chosen as a default sort.Definitely not a perfect fit; it's a bit of a compromise for the sake of app consistency and implementation practicality.