-
Notifications
You must be signed in to change notification settings - Fork 8
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
DACCESS 2025 Sprint 1 - Merge dev to main #2221
Merged
+1,718
−2,288
Merged
Changes from all commits
Commits
Show all changes
102 commits
Select commit
Hold shift + click to select a range
aaaa055
feature: Added query parms to advanced search path.
JeremyDuncan 5fec34b
feature: Added search_form.js
JeremyDuncan 4c31df8
feature: Added search_form.js script load to view
JeremyDuncan 689e225
feature: updated to work with js code
JeremyDuncan 05dd35c
feature: added js code to precompile
JeremyDuncan cfe275a
refactor: removed console log
JeremyDuncan 5a24369
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan eac5024
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan af8010f
tests: updated to use rspec system tests and added tests for new feat…
JeremyDuncan b7d6be2
tests: commented out testing code
JeremyDuncan d6178cc
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan 09cc1a8
refactor: added begins with logic
JeremyDuncan c5b76a6
refactor: added :op param form value
JeremyDuncan 9c17ad6
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan b57c136
Show special request buttons for Kheel items
sarah-cul 75b45a2
LP-1237 - switch CORS to accept connections from the us-east-1 versio…
jgreidy 0a0ab34
Merge pull request #2203 from cul-it/LP-1245---
jgreidy acc32b5
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan 31e6b2d
fix: updated tests to account for new id
JeremyDuncan 3ccfcc4
Bump nokogiri to 1.16.8
chrisrlc 98d6cfc
Merge pull request #2204 from cul-it/nokogiri-bump
chrisrlc 968f32b
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan 4ea1dc9
fix: updated jenkins scripts to work with rspec system tests
JeremyDuncan 618b778
fix: updated script wrapper
JeremyDuncan 879b319
DACCESS-291:test-Added test
JeremyDuncan b205506
Merge branch 'dev' into DACCESS-407
sarah-cul af8cc30
updated to test parallel processing
JeremyDuncan b5b0180
updated to test 4 parallel processes
JeremyDuncan b4fa108
updated to test all parallel processes
JeremyDuncan 354d593
do not allow special requests for Kheel items in this branch, keep th…
sarah-cul 04ca3f3
do not allow special requests for Kheel items in this branch, keep th…
sarah-cul 464c506
DACCESS-291-updated link render logic
JeremyDuncan 5e051af
DACCESS-291-updated link render logic
JeremyDuncan 9b938b0
DACCESS-291-updated id
JeremyDuncan 3937beb
DACCESS-291-updated default form values
JeremyDuncan 8f96526
Merge pull request #2201 from cul-it/DACCESS-407
sarah-cul 9e55909
DACCESS-291-updated default form values
JeremyDuncan 8131232
DACCESS-291-removed debug tag
JeremyDuncan a1bec93
DACCESS-291-updated cucumber tests to to multiple processors
JeremyDuncan d1e178b
DACCESS-291-removed options
JeremyDuncan 1259e75
DACCESS-363: fix empty <h2> heading on New TOU view
mhk33 921faa1
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan 75cf348
DACCESS-291-added chrome options
JeremyDuncan 8752aca
Prevent patrons from exceeding the char limit in the special requests…
sarah-cul 4244132
added style class for this character warning, shows red font awesome …
sarah-cul 53235a0
DACCESS-291-added id to link
JeremyDuncan fee679d
Merge pull request #2207 from cul-it/DACCESS-363
mhk33 e4b9de9
Merge branch 'dev' into DACCESS-476
sarah-cul ed0ea6d
DACCESS-291-set to 1 processor
JeremyDuncan 328d210
Merge pull request #2208 from cul-it/DACCESS-476
sarah-cul fd3f3e6
DACCESS-366 - Don't display bookcover in search results if no_google_…
chrisrlc 0c6b0ef
Merge pull request #2206 from cul-it/DACCESS-366
chrisrlc afeabab
DACCESS-291-ensure values treated as array
JeremyDuncan c93f254
DACCESS-291-added javascript tag
JeremyDuncan 2d413ec
DACCESS-291-updated to account for _row params and pass to /edit path
JeremyDuncan 08b600c
DACCESS-291-cleaned up js code
JeremyDuncan b666ba8
DACCESS-291-updated README
JeremyDuncan b8824ea
DACCESS-291-updated to work with edit path
JeremyDuncan 3a08383
Merge branch 'dev' of github.com:cul-it/blacklight-cornell into DACCE…
JeremyDuncan 2ab8803
DACCESS-291-removed unneeded readme lines
JeremyDuncan 4d99f8a
DACCESS-360 - dry up simple search SearchBuilder logic
chrisrlc a4ec769
Set DISPLAY_SOLR_QUERY env in Jenkinsfile
chrisrlc 6509ba8
DACCESS-471 - Display flash error when trying to exceed search limit
chrisrlc 63b7e75
Remove search param handling from CornellCatalog#index
chrisrlc c93977e
DACCESS-474 - Don't exclude worldcat url generation for lc_callnum se…
chrisrlc af158d0
Merge pull request #2192 from cul-it/DACCESS-360-simple
chrisrlc 292ba97
DACCESS-291-refactored to follow other param conventions
JeremyDuncan 2964290
DACCESS-291-refactored to follow other param conventions
JeremyDuncan d1a0f0a
DACCESS-291-refactored to combine precompiles
JeremyDuncan aa8bcc8
DACCESS-291-merged dev into branch
JeremyDuncan 1ab7d34
Merge pull request #2196 from cul-it/DACCESS-291-Advanced-Search-Carr…
JeremyDuncan f73f903
DACCESS-484-updated NUM_PROCESSES
JeremyDuncan 1340c8e
DACCESS-484-updated jenkins file
JeremyDuncan 8e9216b
DACCESS-484-updated jenkins file
JeremyDuncan ce9fc6d
DACCESS-484-updated jenkins file
JeremyDuncan 07471fe
DACCESS-484-updated jenkins file
JeremyDuncan 817924f
Merge pull request #2209 from cul-it/DACCESS-484-test_variable_update
JeremyDuncan 58045d2
DACCESS-485 update the photoduplication form so its similar to the A…
sarah-cul dd4648c
remove bootstrap muted class
sarah-cul 67144e1
DACCESS-41 - Display Total Works when exists in heading counts_json, …
chrisrlc 63daa71
Merge pull request #2213 from cul-it/DACCESS-41
chrisrlc 74c1ef3
DACCESS-411 - Add sort by date acquired option
chrisrlc 1a662b5
DACCESS-487: add click event for Articles & Full Text, update event f…
mhk33 49d9db3
DACCESS-487: update to use blacklight_format or title for Matomo clic…
mhk33 a86262a
Merge branch 'dev' into DACCESS-485
sarah-cul 89916d7
Merge pull request #2214 from cul-it/DACCESS-411
chrisrlc 0ec2b55
Merge branch 'dev' into DACCESS-487
mhk33 10392b9
Merge branch 'dev' into DACCESS-485
sarah-cul 82d5348
Merge pull request #2210 from cul-it/DACCESS-485
sarah-cul 8436299
Merge branch 'dev' into DACCESS-487
mhk33 0e12690
DACCESS-472 - for bookmarks, use the catalog path to show the details…
sarah-cul 1393f94
Merge pull request #2215 from cul-it/DACCESS-487
mhk33 2822f04
DACCESS-489: fix click events on non-catalog links in bento
mhk33 3511fc2
DACCESS-489: clean up syntax and re-word matomo label
mhk33 281619e
Merge pull request #2219 from cul-it/DACCESS-489
mhk33 17c5a4e
remove searchable concerns for bookmarks, and add cucumber scenario t…
sarah-cul 1fd7527
reverse changes to display_helper
sarah-cul 1137933
Merge branch 'dev' into DACCESS-472
sarah-cul 6d91ecf
Update My Account and Edge library
Baroquem 7a40707
Merge pull request #2216 from cul-it/DACCESS-472
sarah-cul 6be02d5
Merge branch 'dev' into update-my-account
Baroquem 4733dc3
Merge pull request #2220 from cul-it/update-my-account
Baroquem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
blacklight-cornell/app/assets/javascripts/search_form.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
document.addEventListener("DOMContentLoaded", function () { | ||
const advancedSearchLink = document.getElementById("advanced-search-link"); | ||
// Select all inputs, selects, and textareas if no dynamic fields are found | ||
let formFields = document.querySelectorAll("[data-dynamic='true']"); | ||
if (formFields.length === 0) { | ||
formFields = document.querySelectorAll("input, select, textarea"); | ||
} | ||
|
||
if (advancedSearchLink && formFields) { | ||
const searchField = document.getElementById("q"); | ||
// Update the Advanced Search link dynamically | ||
const updateAdvancedSearchLink = () => { | ||
let params = new URLSearchParams(); | ||
let hasSearchText = searchField && searchField.value.trim().length > 0; | ||
|
||
formFields.forEach((field) => { | ||
if (field.name && field.value && field.name !== "q") { | ||
const fieldMappings = { | ||
authq: "q", | ||
browse_type: "search_field", | ||
search_field: "search_field" | ||
}; | ||
|
||
const searchValueMappings = { | ||
author: "author", | ||
author_browse: "author", | ||
at_browse: "author", | ||
"catalog:author": "author", | ||
Author: "author", | ||
"Author-Title": "author", | ||
subject: "subject", | ||
subject_browse: "subject", | ||
"catalog:subject": "subject", | ||
Subject: "subject", | ||
publisher: "publisher", | ||
"catalog:publisher": "publisher", | ||
title: "title", | ||
title_starts: "title", | ||
"catalog:title": "title", | ||
journaltitle: "journaltitle", | ||
"catalog:journaltitle": "journaltitle", | ||
"catalog:lc_callnum": "lc_callnum", | ||
"Call-Number": "lc_callnum", | ||
callnumber_browse: "lc_callnum", | ||
lc_callnum: "lc_callnum" | ||
}; | ||
|
||
if (field.name in fieldMappings) { | ||
if (field.name === "browse_type" || field.name === "search_field" || field.name === "search_field_row") { | ||
if (field.value in searchValueMappings) { | ||
params.append("search_field_row[]", searchValueMappings[field.value]); | ||
if (field.value === "title_starts") { | ||
params.append("op_row[]", "begins_with"); | ||
} | ||
} | ||
} else { | ||
params.append(fieldMappings[field.name], field.value); | ||
} | ||
} else if (field.name !== "authenticity_token" && field.name !== "utf8") { | ||
params.append(field.name, field.value); | ||
} | ||
} | ||
}); | ||
|
||
// Add q_row as a parameter if the search field has text | ||
if (hasSearchText) { | ||
params.append("q_row[]", searchField.value.trim()); // Append q_row | ||
} | ||
|
||
// Append other advanced search parameters if present | ||
const opRow = document.querySelectorAll("[name='op_row[]']"); | ||
const searchFieldRow = document.querySelectorAll("[name='search_field_row[]']"); | ||
const booleanRow = document.querySelectorAll("[name='boolean_row[]']"); | ||
const facetFields = document.querySelectorAll("[name^='f[']"); | ||
|
||
opRow.forEach((field, index) => params.append(`op_row[${index}]`, field.value)); | ||
searchFieldRow.forEach((field, index) => params.append(`search_field_row[${index}]`, field.value)); | ||
booleanRow.forEach((field, index) => params.append(`boolean_row[${index}]`, field.value)); | ||
|
||
// Handle facets, including f[format] | ||
const uniqueFacets = new Set(); | ||
facetFields.forEach((field) => { | ||
const match = field.name.match(/^f\[(.+)\]$/); // Match f[key] format | ||
if (match && match[1]) { | ||
const key = `f[${match[1]}]`; | ||
const value = field.value; | ||
const facetEntry = `${key}=${value}`; | ||
|
||
if (!uniqueFacets.has(facetEntry)) { | ||
uniqueFacets.add(facetEntry); | ||
params.append(key, value); | ||
} | ||
} | ||
}); | ||
// Update link href to use the /edit path | ||
advancedSearchLink.href = `/edit?${params.toString()}`; | ||
}; | ||
|
||
formFields.forEach((field) => { | ||
field.addEventListener("input", updateAdvancedSearchLink); | ||
field.addEventListener("change", updateAdvancedSearchLink); | ||
}); | ||
updateAdvancedSearchLink(); | ||
advancedSearchLink.addEventListener("click", updateAdvancedSearchLink); | ||
} | ||
}); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I may have missed discussion of this during the standups, but how does one determine the right number of processes to use? What are the disadvantages of just selecting the maximum number all the time? Presumably that might impact others who are trying to run Jenkins jobs on the same server for other projects, but how would one know that without sending out a general query to all the developers on Slack?
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.
@Baroquem, As its setup now, It defaults to just using 1 processor, but you can manually set it to use more than one processor (with diminishing gains the more you add).
Currently there are only 4 processors available for Jenkins to use If there are more tests running than processors, then it increases the time it takes to finish those tests.
If you use 2 processors in Jenkins it cuts the time down to about 25 minutes.
Greg said there can be more processors added, but they are working on getting the docker container tests setup first
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.
Thanks. I’m more wondering about the impact on other people. The selfish thing to do is obviously to grab all the available processors for my own testing, to finish it as quickly as possible, but I wouldn’t do that if it negatively affects other people’s work. But then do I pick 2 processors … or 3…? I don’t have a sense of how to find the best compromise there.
And if nobody else happens to be using Jenkins at the time, then I could use all the processors without guilt — but I don’t think we have a good way of determining that.