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

Porting essential blacklight range limit functionality #3098

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cgalarza
Copy link
Contributor

First, I'd like to acknowledge all the work that people have put in the blacklight-range-limit plugin over the years. Without their effort I would not be submitting this PR today. Thank you! I hope that this new (potential) iteration allows for better support of this functionality.

The goal of this pull request is to port the essential functionality of the blacklight-range-limit plugin into blacklight core. This includes the form that allows a user to enter two years within a facet and excludes the histogram (and the associated functionality). Notably, this MR does not include any javascript.

Currently, the blacklight-range-limit plugin is not compatible with Blacklight 8. We are hoping that this port allows us to update our applications to Blacklight 8 while maintaining the core functionality provided by the blacklight-range-limit plugin.

Some notes:

  • Feature test: I tried to add in a feature test, but in doing so a handful of other tests failed so I skipped it for now since the component tests cover a lot of what a feature test would have covered.
  • Rubocop: Linting fails for code that is not part of this PR. I am not sure how to address that.
  • Internalization: I copied over the translations available in the blacklight-range-limit plugin, but blacklight core covers a lot more languages and therefore there are missing translations.

Some potential additional features:

  • Displaying min and max values might be helpful to give users a sense of what the range of values they can choose from are. In order to provide that, the Solr request would have to include the stats component. I wasn't sure how folks would feel about that, but depending on community feedback it's something that can be added in later.
  • This MR provides inputs for numbers, but it could be expanded to provide different types of inputs. For example, character ranges (A-Z) or full date ranges.

My time is limited over the next few weeks. I will try to respond and help as much as possible, but would welcome the community's help in finishing this work.

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.

1 participant