Skip to content
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

don't reload the collection to populate subcollection modal #4986

Merged
merged 1 commit into from
May 28, 2021

Conversation

no-reply
Copy link
Contributor

this view used to call #find to retirieve a collection from an id. we already
have a presenter and a solr document, so there's no need for this.

instead, allow Hyrax::Ability to resolve CollectionPresenter to its
underlying SolrDocument. Add CollectionPresenter#nestable? as an alias to
the existing #collection_type_is_nestable? to match the Collection
interface, and pass the presenter through to the modal. we continue to pass the
id into the modal for backward compatibility.

Guidance for testing:

  • add a subcollection to an existing collection from the dashboard

@samvera/hyrax-code-reviewers

@no-reply no-reply force-pushed the no-requery-collection branch from 2a38191 to afbf55f Compare May 28, 2021 03:03
this view used to call `#find` to retirieve a collection from an id. we already
have a presenter and a solr document, so there's no need for this.

instead, allow `Hyrax::Ability` to resolve `CollectionPresenter` to its
underlying `SolrDocument`. Add `CollectionPresenter#nestable?` as an alias to
the existing `#collection_type_is_nestable?` to match the `Collection`
interface, and pass the presenter through to the modal. we continue to pass the
id into the modal for backward compatibility.
@dlpierce dlpierce merged commit e1d2120 into main May 28, 2021
@dlpierce dlpierce deleted the no-requery-collection branch May 28, 2021 17:30
@jlhardes
Copy link
Contributor

I can add a subcollection to an existing collection from the dashboard on both nurax-dev and my local build so this is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants