Skip to content

Conversation

@sjproctor
Copy link
Contributor

@sjproctor sjproctor commented Dec 18, 2025

Metadata view.render_as links on catalog index

Adds helper methods from Hyrax::HyraxHelperBehavior to the flexible metadata properties that have a view.render_as value of linked, external_link, or rights_statement.

Prior to this change, the properties were receiving their view rendering behavior from the CatalogController. Any new metadata properties had no view rendering behavior and would only display plain text. Properties that were already defined in the CatalogController could not have their view rendering behavior changed via flexible metadata profile.

Adds a hook to ensures the properties can be excluded from the catalog index view via tenant configuration in the Hyku admin dashboard > Settings > Accounts > Hidden index fields.

NOTE: This approach to hiding catalog index fields will likely be deprecated in favor of handling it via the flexible metadata profile.

Also adds a check for properties that do NOT have indexing.facetable and removes the property's facet_field. This applies to properties that have a facet_field in the CatalogController.

Before

  • Source is set in the metadata profile to be an external link [not rendering as a link]
  • All properties are on the index page even though there should be properties that are hidden
Photo: catalog index page image

After

  • Source is set in the metadata profile to be an external link
  • Properties are hidden that were configured in the dashboard
  • NOTE: overflowing text is being addressed in a Hyku PR
Photo: catalog index page image

Ref:

@samvera/hyrax-code-reviewers

sjproctor and others added 3 commits December 16, 2025 16:06
This commit adds mappings for flexible metadata properties with
`render_as`` view options to Blacklight helper methods that add links
in the catalog index view.
- Map `render_as: 'linked'` to helper_method: :index_field_link
  - This method requires the field_name as an argument
- Map `render_as: 'external_link'` to helper_method: :iconify_auto_link

This ensures that flexible metadata fields with render_as configurations
are properly displayed on the catalog index page using the appropriate
helper methods.

Ref:
- notch8/wvu_knapsack#102
This commit adds helper methods from Hyrax::HyraxHelperBehavior to the
flexible metadata properties that have a `view.render_as` value of
`linked`, `external_link`, or `rights_statement`.

Prior to this change, the properties were receiving their view rendering
behavior from the CatalogController. Any new metadata properties had no
view rendering behavior and would only display plain text. Properties
that were already defined in the CatalogController could not have their
view rendering behavior changed via flexible metadata profile.

This commit also adds `if: :render_in_tenant?` to all metadata
properties that are not defined in the CatalogController. This ensures
the properties can be excluded from the catalog index view via tenant
configuration in the admin dashboard > Settings > Accounts >
Hidden index fields.

NOTE: This approach to hiding catalog index fields will likely be
deprecated in favor of handling it via the flexible metadata profile.

Ref:
- samvera/hyku#2860
@sjproctor sjproctor added the notes-bugfix Release Notes: Fixed a bug label Dec 18, 2025
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Test Results

    13 files  ± 0      13 suites  ±0   2h 49m 37s ⏱️ -5s
 7 007 tests +29   6 701 ✅ +29  306 💤 ±0  0 ❌ ±0 
18 660 runs  +88  18 159 ✅ +88  501 💤 ±0  0 ❌ ±0 

Results for commit 9a48c95. ± Comparison against base commit 8312a50.

This pull request removes 368 and adds 397 tests. Note that renamed tests count towards both.
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f023d037fa0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f0f613d3d40>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f2d80524b08>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f023d0a6a40>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f0f61130660>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f2d804d12c8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 565ff8a4-503a-41cc-b9d3-da1c623e0df8
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 0387fbb5-0d8b-491a-895e-0e05604bf68a
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: f7f686a0-e9a0-4cbd-bbce-a8f64d14c5a0
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: b20ded2d-99ce-4e15-8118-da0b0b781ff8
…
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007efc8b1d9b18>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f817914be08>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f942b63e748>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007efc946121e0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f8178d27e58>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f9427e217c0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 5bd70daf-a1d0-4991-9517-e55faafec97e
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 4c63325c-1a50-4835-8a4a-9c427dfdcf3e
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: b55f6e94-1d89-49c4-b131-cddb2196e4d3
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 2a4bafe9-f6a5-4a03-be08-4f41892e4e44
…

♻️ This comment has been updated with latest results.

sjproctor and others added 9 commits December 23, 2025 12:41
This commit updates the m3 profile spec fixture to specify sidebar
faceting in the indexing section rather than the render_as section.

Ref:
- samvera/hyku#2860
Add test coverage for FlexibleCatalogBehavior concern which dynamically
loads M3 metadata profile properties into Blacklight catalog config.

Tests both fixture and custom properties to verify the concern handles:
- Index field creation and updates
- Display labels
- Itemprop mapping for semantic markup
- Helper methods for linked/external link rendering
- Facet field creation and linking
- Search field parameter additions
- Admin visibility controls

Ref:
- samvera/hyku#2860
If a property has a `facet_field` in the CatalogController it will
render on the sidebar as a facet even if the flexible metadata profile
does not specify it as a facetable property. This commit removes
`facet_field` from any property that does not specify
`indexing.facetable`

Ref:
- samvera/hyku#2792
This commit uses a mocked Hyrax::FlexibleSchema in the spec to avoid
validation errors and improve test isolation.

Ref:
- samvera/hyku#2860
This commit updates the m3_profile.yaml fixture to set the render_as
option to linked rather than faceted and updates the corresponding specs

Ref:
- samvera/hyku#2860
orangewolf
orangewolf previously approved these changes Jan 16, 2026
@sjproctor sjproctor merged commit 0af11ac into main Jan 19, 2026
17 checks passed
@sjproctor sjproctor deleted the catalog-view-options branch January 19, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes-bugfix Release Notes: Fixed a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants