Closed numjcp closed 2 weeks ago
Yeah, this was initially designed with years as a use case. Can I ask what sort of data you are using it for instead?
Are you interested in sending a pull request making this a configuration parameter defaulting to 4 but configurable?
I'm not sure i'm familiar with the pull request process, not sure either to get the architectural awareness for choosing a decent way to store the parameter. But If you are ready to guide me, I can do it.
I'm not using Blacklight in a Library context at all.
My use case is an integer facet representing a quantity that can can grow up to 999999, so 6 would do the job, but leaving room to user makes him feel good.
Regards
I'm sorry, I may not be able to get to this soon, but we'll leave the ticket open until I or someone else does!
To make a pull request, you'd fork this repo into your own github account, commit a change to that repo in your own account, and then use the github 'pull request' button.
https://help.github.com/articles/fork-a-repo https://help.github.com/articles/using-pull-requests
I'm not super sure where to actually put the configuration value either. It looks like existing configuration is on the add_facet_field
area
config.add_facet_field 'pub_date', :label => 'Publication Year', :range => true
I think you can actually add any arbitrary keys there. So maybe another one for :range_input_width
, and then the blacklight_range_limit
code just needs to pull it out of there. I don't have exactly the code in my head for how this would be done either, I'd need to look into it and pull it out, we can leave this ticket open until I or someone else finds time to do so! Sorry for the inconvenience.
Current implementation no longer uses maxlength, no longer relevant.
Hello, The text input field in a facet_limit panel might be longer than the hardcoded 4 maxlength in app/helpers/range_limit_helper.rb: text_field_tag("range... Even though it's easy to manually change it to suit one's custom need, wouldn't it be nice if it was parameterized ? Any how any where but not hardcoded ?
Regards
Julien