Migrate Scottish Government Yearbooks (IOG) collection from Skylight#63
Draft
sevenpointsix wants to merge 7 commits into
Draft
Migrate Scottish Government Yearbooks (IOG) collection from Skylight#63sevenpointsix wants to merge 7 commits into
sevenpointsix wants to merge 7 commits into
Conversation
Port the iog DSpace collection to Skylark with no reskin: shared defaults/dspace.php config, Iog\PageController (home, history), layouts/iog.blade.php (legacy nav, search box, base href, dual prefix + SCOTGOVYEARBOOKS_HOST routing), home subject carousel, search results, record show with PDF viewer iframe, and ported about/history/licensing/ takedown/accessibility static pages. Register an IogLayoutComposer so the right-hand Author/Subject facet sidebar populates on the home page — a step that's caught us out on previous migrations. Documented in docs/collection-migration.md plus a new git-ignored AGENTS.local.md with collection-migration gotchas (sidebar composer, facet URL double-encoding, dual-host wiring).
Matches the Points of Arrival pattern: config/collections/iog.php falls back to the dev community UUID so a fresh local Skylark serves /iog without needing IOG_CONTAINER_ID set in .env. Production explicitly overrides to the prod UUID via env.
…aging). We only read from Solr and want the latest data everywhere by default, so ship prod as the fallback and let dev/staging override IOG_CONTAINER_ID in their .env (legacy dev UUID e99d9f85-ef2f-4de4-820b-9561cb759fec is in .env.example for reference). Reverts the dev-default introduced in 9ebbc0f to align with every other prefixed DSpace collection's container_id pattern.
4 tasks
CollectionRouteRegistrar already registers /iog/advanced{,/form,/post,
/search/{filters?}}, but no iog.search.advanced view existed so the form
endpoint 500'd. Port the Skylight legacy markup (same pattern as the
openbooks advanced form) into resources/views/iog/search/advanced.blade.php,
driven by config('skylight.search_fields') (Keywords, Subject, Type,
Author, Series) and POSTing to {collectionUrl}/advanced/post.
Tests cover the advanced* route names and assert the form renders with
every configured search field, the operator select, and the correct
POST target.
The advanced search form was passing every user-supplied field/value pair straight through as an `fq` filter, e.g. `fq=text:test`. DSpace's generic `text` copy field rarely matches single tokens that way, so even queries that worked from the basic search box returned no results. `advancedSearch()` now parses the URL filter segments, maps the friendly labels (Keywords/Title/Author/...) to the underlying Solr fields, and combines them into a Lucene-style `q` string using the user's chosen operator. The `Keywords` field defers to the default `text` search so it matches the basic search behaviour, and multi-word values are wrapped in parens so the boolean operator parses correctly. Also update the "no results" message on the IOG results template to echo back the actual query when it isn't a wildcard fetch, and add tests covering both the single-field and multi-field operator cases.
`SearchController::buildPaginationLinks()` emits Bootstrap-style `<ul class="pagination"><li>...</li></ul>` markup. Layouts that don't include Bootstrap (the IOG legacy theme and any Tailwind-only v2 skin) were rendering the page numbers stacked vertically because `<li>` defaults to `display: list-item`. * Add `public/collections/iog/css/skylark.css` (loaded after the legacy `style.css`) with the minimum rules to lay the pagination out inline without bullets, matching the look of the original CodeIgniter site. * Add a shared `ul.pagination` component layer in `resources/css/app.css` so every Tailwind-based collection layout (geddes-v2, public-art-v2, eerc-v2, ...) gets a sensibly styled horizontal pagination strip out of the box. Includes tests that assert the IOG override stylesheet is loaded and that the compiled Vite CSS bundle includes the shared pagination rules.
Solr indexes publication years on dateIssued.year (not datetemporal_filter). Raise facet_limit to 20 so all 16 years appear without a browse page.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Ports the Scottish Government Yearbooks site from legacy Skylight into Skylark as a no-reskin DSpace collection (internal key
iog). Implements the plan iniog_collection_migration_efec4bea.plan.mdand follows Open Books / Points of Arrival conventions for dual URL modes (prefix + dedicated host).config/collections/iog.phpmergesdefaults/dspace.phpwith ported Solr/UI settings (Author/Subject/Year filters,results_per_page=10,oaipmhcollection=hdl_10683_22746). New env varsIOG_CONTAINER_ID,IOG_GA_CODE,SCOTGOVYEARBOOKS_HOSTdocumented in.env.exampleand wired intophpunit.xmlasscottishgovernmentyearbooks.testingfor dedicated-host tests.Year→dateIssued.yearsidebar facet (Solr-verified; standard DSpacedatetemporal_filteris empty for this collection).facet_limitraised to 20 so all 16 publication years (1976, 1978–1992) appear without a browse page.CollectionRouteRegistrar::registerDspacePrefixedCollectionblock added inroutes/web.php(withfeedback=falseand extra/historyroute).Iog\\PageControllerprovideshome()andhistory(). Sharedabout/licensing/takedown/accessibilitycome fromPageController::resolveSharedPage()resolvingiog.pages.*.layouts/iog.blade.phpmirrors the Skylight header (UoE link, Blog/ERA/SPS/History/About menu, collection title, search box + advanced link) and footer; subject-grid home, search results, and PDF-viewer record page all live underresources/views/iog/. All links use$collectionUrl()so they work in both/iogprefix and dedicated-host modes.IogLayoutComposerregistered inAppServiceProviderinjectssidebar_facetsintolayouts.iogso Author/Subject/Year filters render on the home page (matches the Open Books pattern; without this the right-hand column is empty on home/static pages).docs/collection-migration.mdcovering the composer pattern and facet URL double-encoding. Also added a git-ignoredAGENTS.local.mdscratchpad with the same gotchas plus dual-host wiring notes.Test plan
php artisan test --compact tests/Feature/IogCollectionTest.php→ 35 passed (route registration, prefix-mode home + static pages, dedicated-host home + base href, carousel facet links, legacy nav text,col-sidebarshell on home, Year facet config/rendering/Solr fq forwarding).vendor/bin/pint --dirty --format agentpasses.IOG_CONTAINER_ID=e99d9f85-ef2f-4de4-820b-9561cb759fec(dev UUID) in.env, visithttps://skylark.test/iog, confirm subject carousel + sidebar Author/Subject/Year facets.SCOTGOVYEARBOOKS_HOST=scottishgovernmentyearbooks.test+ Herd link and verify production-parity URLs at the root.Out of scope
iogtoscottishgovernmentyearbooks(would fight existing config/assets naming)./scottishgovernmentyearbooksURL alias (can be a follow-up redirect).