-
Notifications
You must be signed in to change notification settings - Fork 124
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
centralize the list of collection classes #5207
Conversation
i think this is a good goal, but maybe needs some more consideration. in some cases (e.g. on the search side) i think we want/need to continue to find indexed data under model on the flip side, i think we've encountered some other cases where we want to include so far i've only been able to approach this case-by-case, but if we could understand the whole problem space, i think that would help move this forward. |
@no-reply See what you think about the new approach to determining the list of collection classes. WAS
NEW APPROACH
|
i think #5229 clears the remaining failing test in this PR. |
30be1c0
to
bbedb91
Compare
@@ -13,7 +13,7 @@ | |||
|
|||
it 'searches for valid work types' do | |||
expect(builder.filter_models(solr_params)) | |||
.to contain_exactly("{!terms f=has_model_ssim}Monograph,#{Hyrax.config.collection_class}") | |||
.to contain_exactly("{!terms f=has_model_ssim}Monograph,#{Hyrax.collection_classes.join(',')}") |
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.
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.
This centralizes the list of collection classes to `Hyrax.config.collection_classes`.
Places where any collection class could be input or processing occurs across all collection classes were updated to use `Hyrax.config.collection_classes`. Remaining single references to `::Collection` were updated to `Hyrax.config.collection_class`. These changes allow for almost all remaining uses of `::Collection` to be removed. Exceptions: * work_form which is only used with ActiveFedora * `PermissionTemplate #collection` which is deprecated and only works with `::Collection` * `Hyrax::Collections::MigrationService` which performs a migration dependent on reading in the collection as a `::Collection`
This issue has been automatically marked as stale because it has not had activity for 30 days. It will be closed if no further activity occurs within 14 days. Thank you for your contributions. |
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.
This looks like a good change to me. Is it still relevant? How bad of a rebase will it be to bring this up to date?
@@ -3,7 +3,7 @@ | |||
<td></td> | |||
<td> | |||
<div class="media"> | |||
<span class="<%= Hyrax::ModelIcon.css_class_for(::Collection) %> collection-icon-small pull-left"></span> | |||
<span class="<%= Hyrax::ModelIcon.css_class_for(Hyrax.config.collection_class) %> collection-icon-small pull-left"></span> |
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.
Should this be changed like the change in app/views/hyrax/collections/_media_display.html.erb?
<span class="<%= Hyrax::ModelIcon.css_class_for(Hyrax.config.collection_class) %> collection-icon-small pull-left"></span> | |
<span class="<%= collection_model_icon %> collection-icon-small pull-left"></span> |
@@ -24,6 +24,13 @@ def available_parent_collections_data(collection:) | |||
end.to_json | |||
end | |||
|
|||
## | |||
# @since 3.1.0 |
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.
This should be updated to 3.4.0?
# @since 3.1.0 | |
# @since 3.4.0 |
This issue has been automatically marked as stale because it has not had activity for 30 days. It will be closed if no further activity occurs within 14 days. Thank you for your contributions. |
This centralizes the list of collection classes to
Hyrax.config.collection_classes
.Places where any collection class could be input or processing occurs across all collection classes were updated to use
Hyrax.config.collection_classes
. Remaining single references to::Collection
were updated toHyrax.config.collection_class
. These changes allow for almost all remaining uses of::Collection
to be removed.Exceptions:
PermissionTemplate #collection
which is deprecated and only works with::Collection
Hyrax::Collections::MigrationService
which performs a migration dependent on reading in the collection as a::Collection
This PR does not update
CollectionAbiility
as it is being updated in PR #5206. Whichever PR is merged first, there will be a small fix required to get abilities to reference thecollection_classes
config instead of creating the list in theCollectionAbility
class.@samvera/hyrax-code-reviewers