-
Notifications
You must be signed in to change notification settings - Fork 41
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
How do I render range limiting form fields as part of an advanced search form in the newer version of this gem. #312
Comments
Hi here is the commit where that went away, by me in preparing 9.0 release: However, it had already been deprecated as going away in 9.x, 2.5 years ago in May 2022 and version 8.2, here: That was part of refactoring to work with the new "view component" architecture, to get it to work with refactored blacklight. I am not totally sure the whether that deprecated helper method worked in what versions -- I'm curious if you were using in 8.2.0+, or if you are migrating from an older version? I did not totally understand the great view component refactor at the time, and I actually did think of this use case I'm afraid, and tried to bring it to the attention of those doing the refactoring; I'm not sure if I succesfully got it across, but at the time, the answer I recall was "pull requests welcome". I think you are supposed to instead try to look at configuration for a view component configured and use that maybe? I think there is a component that is not a form within a form, but just the field you need? Oh.... I see maybe there wasn't because it wasn't needed for internal use cases. I do understand your use case and feel your pain. I guess the first step is factoring out just the field as a separate ViewComponent, so you can re-use it? Or is there another refactor that would give you what you need? Once that's done, a helper method could be returned (it's I think a pre-requisite for adding a helper method), or there might be another better way to provide access to that Component itself? Are you interested in trying to do the PR? If so, I will commit to reviewing it and working with you if needed! I'm sorry this use case was missed in the refactor; I spent around two solid months saving blacklight_range_limit to be able to work with Blacklight 8 and 9 at all, and don't use advanced search form myself, and there were no tests inside this project that ensured it. If we add it back, we should make sure to also add a test that would fail if it were broken or removed, and ensures the "api" used by a dependent project like blacklight_advanced_search remains working! |
@jrochkind thanks for responding so quickly. You are correct that I am trying to upgrade from an older version (v7). And of course I do remember that you asked developers to weigh in on the new version and that I in fact volunteered to do so. Sadly, I didn't get a chance to take a look at the new code. So, don't be sorry it's really my fault. That said I'm perfectly happy to try and refactor the input field section of the form into a component. I can't commit to a specific time when I'll get to do it. But, I'll try to get to it as soon as I can as I am working on an upgrade to blacklight 8 for the Temple University library search app. |
Sweet. No hurry on my end, I don't hae the use case! But will try to review and advise when you get to it! Maybe we add a configuration field for the input_component, so local apps can change it and have it picked up by the advanced search plugin? |
I'm trying to upgrade to the latest version of this gem (v9.0.0). To my dismay, as far as I can tell, the
render_range_input
helper method has been completely removed from the gem without providing a substitute way to render input fields. The components that are meant to replace the helper method only render the input fields in the context of the range limit form. But, if I want to embed a range field inside an advanced search form I cannot (because then I will have a form within a form situation).I think this helper method should be returned, or maybe an input field only component can be used.
The text was updated successfully, but these errors were encountered: