-
Notifications
You must be signed in to change notification settings - Fork 126
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
Enable editing Valkyrie resources with children #5516
Conversation
d71a84b
to
c30b4d3
Compare
b2ba588
to
152c094
Compare
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 is looking really good. I just have one question.
describe '#file_set_presenters' do | ||
it 'is empty' do | ||
expect(factory.file_set_presenters.to_a).to be_empty | ||
context 'with ActiveFedora index adapter' do |
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.
Good to see this tested with both AF and Valkyrie.
152c094
to
00700c6
Compare
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 good to me.
00700c6
to
4758791
Compare
4758791
to
d754171
Compare
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.
AF works need to switch back to using generic_type_sim
to avoid backward incompatibility issues.
d754171
to
38ff5ac
Compare
@@ -30,6 +30,7 @@ def generate_solr_document # rubocop:disable Metrics/AbcSize, Metrics/MethodLeng | |||
solr_doc['original_checksum_tesim'] = object.original_checksum | |||
solr_doc['alpha_channels_ssi'] = object.alpha_channels | |||
solr_doc['original_file_id_ssi'] = original_file_id | |||
solr_doc['generic_type_si'] = 'FileSet' |
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.
The generic_type
field is used in PcdmMemberPresenterFactory
. This is called from:
Hyrax::WorkShowPresenter #member_presenter_factory
which only calls it forValkyrie::Resource
Hyrax::WorkFormHelper #form_file_set_select_for(parent:)
which is called from several views.- select representative_id in _form_representative.html.erb
- select rendering_ids in _form_rendering.html.erb
- select thumbnail_id in _form_thumbnail.html.erb
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.
I tested with Main and with this PR's branch. The behavior for GenericWork is the same for both branches. GenericWork uses a different member_presenter_factory that does not depend on generic_type_si
, so the addition of this index field has no impact on non-valkyrie works.
Closes #5462
Closes #5447
Adds work-around for two issues:
main_app
helper.has_model_ssim: FileSet
in ActiveFedora and withhas_model_ssim: Hyrax::FileSet
with the Valkyrie solr adapter.