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

Add a ChildTypes to manage selection display during work attachment #4181

Merged
merged 5 commits into from
Jan 24, 2020

Conversation

no-reply
Copy link
Contributor

With ActiveFedora models, we use MyWork.valid_child_concerns to determine
which types the user can select to attach to an existing work.

Since this is a display-only issue, we break this out into a new service. For
legacy models, we delegate the configuration back to the model, avoiding any
need for configuration changes.

For Valkyrie models, we provide a default config (a work can nest works of its
own type), but punt on configuration issues. There are other configuration
matters to discuss.

@samvera/hyrax-code-reviewers

@no-reply no-reply changed the title Valkyrie presenters Add a ChildTypes to manage selection display during work attachment Jan 10, 2020
Tom Johnson added 4 commits January 14, 2020 08:44
This mixin was previously untested and will need to change to support
`Valkyrie`. To get ready for the changes, test it against a minimal compatible
class.
With `ActiveFedora` models, we use `MyWork.valid_child_concerns` to determine
which types the user can select to attach to an existing work.

Since this is a display-only issue, we break this out into a new service. For
legacy models, we delegate the configuration back to the model, avoiding any
need for configuration changes.

For Valkyrie models, we provide a default config (a work can nest works of its
own type), but punt on configuration issues. There are other configuration
matters to discuss.
This method isn't releted to the `ModelProxy` concern. It is deprecated, with
the relevant implementation moved to `WorkShowPresenter`.
Avoid duplicated implementation in for model name/partial path resoultion. These
can be safely delegated to `SolrDocument`, which has its own handling for these
issues.

While we're here, remove the `_delegated_to` cache.
@jeremyf jeremyf merged commit fd3f92b into master Jan 24, 2020
@jeremyf jeremyf deleted the valkyrie-presenters branch January 24, 2020 20:25
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.

2 participants