Skip to content

v7.2.0

Latest

Choose a tag to compare

@orangewolf orangewolf released this 07 Oct 13:40
1ccae4e

Highlights

Compound metadata

7.2.0 brings Hyrax's compound (hierarchical) metadata to Hyku. A compound field holds a list of entries, and each entry is a small set of named sub-properties. For example, a participant has a name, a role and a title, and an identifier has a value and a type. Before this, data like that had to be flattened into parallel single-value fields, which lost which role went with which name.

Compounds are declared entirely in the schema. No custom Ruby or ERB is needed. This works in both metadata modes:

  • Flexible metadata on (HYRAX_FLEXIBLE=true): declare them in the tenant's m3 profile.
  • Flexible metadata off: declare them in config/metadata/compound_metadata.yaml.

Hyku ships three sample compounds on works and collections:

  • participants: name, role, title
  • identifiers: value, type
  • relationships: a related item (an internal work or an external URL), a relationship type and a title. This one displays as its own card on the show page.

What works out of the box:

  • Editing: add and remove rows on the work and collection edit forms.
  • Show pages: compounds display on work, collection and file set show pages in every bundled show theme. Inline compounds appear in the metadata list; compounds with view: { display: card } render as their own card.
  • Controlled values: sub-properties can use an inline values list or an existing Questioning Authority local authority, with typeahead and multi-select. Show pages display the term rather than the stored id.
  • Linked records: a sub-property can point at another record (linked_record).
  • Bulk import: Bulkrax CSV import and export use numbered columns per row, for example participants_name_1 and participants_role_1. Requires Bulkrax 9.5.x.
  • Solr indexing: each sub-property is indexed, for example participants_name_tesim and participants_role_sim.

What is not automatic: compound sub-properties are not included in keyword search or facets. To make one searchable or facetable, register it in CatalogController.

How to use it

Upgrade notes

  • Flexible metadata off: the sample compounds appear on every work type and collection. Each work type's field_order controls whether a compound is listed on the show page. To add a new compound, declare it in the YAML and add it to field_order.
  • Flexible metadata on: compounds come from the tenant's m3 profile. A tenant using its own profile must add the compound properties to that profile to get them.

Guided deposit wizard

This is an optional multi-step deposit flow: choose a work type, upload files, enter work metadata, enter per-file metadata and visibility, review, then deposit. It adds file-level metadata and file permissions at the time of deposit, and lets a depositor attach the new work to a parent. It is off by default.

  • To enable: turn on the enable_guided_deposit feature for a tenant. enable_standard_deposit is on by default. If both are on, depositors get both buttons and can switch between forms.
  • Docs: docs/deposit-wizard.md

URL redirects

Admins can register legacy paths, for example from DSpace, CONTENTdm or bepress, as 301 redirects to a work's or collection's permanent URL. Redirects can be managed on the form or imported and exported through Bulkrax.

  • To enable: both switches are required. Set HYRAX_REDIRECTS_ENABLED=true for the app, then turn on the redirects feature per tenant.
  • Docs: Hyrax redirects guide

New themes and display options

  • Home and show page themes: Practice Research and Heritage
  • Search results page themes: Masonry and Slideshow (Appearance > Search Results Page Theme)
  • Work Type facet: added to the catalog and the dashboard works page
  • New metadata display directives, documented in docs/configuration.md:
    • form: { input_type: rich_text }: rich text editor on the form
    • view: { render_as: html }: displays the value as sanitized HTML
    • view: { position: featured }: shows the field at the top of the show page
    • view: { search_results_truncate: N }: limits snippet length in search results

Public demo tenant tooling

Accounts flagged public_demo_tenant now get:

  • a nightly reset to a stored golden state
  • a demo banner
  • noindex headers
  • restricted invitations
  • protection against removing the last superadmin
  • a required signup spam challenge

Setup:

  1. Capture the golden state with rake hyku:demo:snapshot[tenant]. The reset refuses to run without a snapshot.
  2. Optionally set DEMO_SEED_CSV_PATH, DEMO_KEEP_USERS, DEMO_IMPORT_USER, DEMO_HEALTH_CHECK and HYKU_DEMO_ACCEPTABLE_USE_URL.

Upgrade and configuration notes

  • Database migrations: run db:migrate. New tables and columns cover redirects, accounts.last_reset_at and accounts.demo_tenant_snapshot.
  • Assets: run assets:precompile. The rich text editor JS comes in through Hyrax.
  • Bulkrax: now 9.5.x. The Bulkrax Guided Import UI is hidden behind a feature until it is complete.
  • hyrax-iiif_av gem removed: its code is now in Hyrax core.
    • iiif_av is on by default.
    • The IIIF manifest factory is pinned to V3.
    • Knapsacks that reference Hyrax::IiifAv must update.
  • IIIF for PDFs: manifests can include PDF content when the feature is on.
  • HYRAX_FLEXIBLE_CLASSES: a value you set yourself is now kept. List every class, including custom knapsack work types that should get flexible metadata.
  • Collection dropdown limits: new tenant settings control query limits for collection dropdowns. Raise them if a tenant has more than 100 collections.
  • Single-tenant installs: HYKU_SINGLE_TENANT_NAME and HYKU_SINGLE_TENANT_CNAME override the default tenant name and cname.
  • Postgres: pg_stat_statements is enabled when available. If not, it is skipped safely.
  • Knapsacks that override layouts/hyrax: add the one-line shared/_demo_banner render if you run public demo tenants.

Security and behavior changes

  • HTTP basic auth: credentials for hidden tenants and staging now come from HYKU_BASIC_AUTH_USER and HYKU_BASIC_AUTH_PASSWORD. The defaults are still samvera / hyku, so set real values.
  • Activated users: an activated user no longer gets the password password when HYKU_USER_DEFAULT_PASSWORD is unset. They get a random placeholder and set their own password through the reset flow.
  • Invitations: sending an invitation now requires admin or user manager rights. Before, any signed-in user could invite.
  • Parent works: the standard deposit form now rejects a parent_id for a work the depositor cannot edit.
  • Signup spam protection: optional and per tenant (signup_spam_protection, or HYKU_SIGNUP_SPAM_PROTECTION).

What's Changed

Exciting New Features 🎉

Bug Fixes 🐞

New Contributors

Full Changelog: v7.1.0...v7.2.0