-
Notifications
You must be signed in to change notification settings - Fork 132
🐛 Catalog view options #7317
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
Merged
Merged
🐛 Catalog view options #7317
+398
−8
Conversation
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
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
Test Results 13 files ± 0 13 suites ±0 2h 49m 37s ⏱️ -5s 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.♻️ This comment has been updated with latest results. |
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
previously approved these changes
Jan 16, 2026
orangewolf
approved these changes
Jan 19, 2026
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.
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.facetableand removes the property'sfacet_field. This applies to properties that have afacet_fieldin the CatalogController.Before
Photo: catalog index page
After
Photo: catalog index page
Ref:
@samvera/hyrax-code-reviewers