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

Limit Input Field might be to short #17

Open
numjcp opened this issue Apr 7, 2014 · 3 comments
Open

Limit Input Field might be to short #17

numjcp opened this issue Apr 7, 2014 · 3 comments

Comments

@numjcp
Copy link

numjcp commented Apr 7, 2014

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

@jrochkind
Copy link
Member

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?

@numjcp
Copy link
Author

numjcp commented Apr 7, 2014

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

@jrochkind
Copy link
Member

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.

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

No branches or pull requests

2 participants