Closed (fixed)
Project:
Facetapi Slider
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2011 at 02:07 UTC
Updated:
7 Nov 2011 at 12:40 UTC
Jump to comment: Most recent file
Making some progress getting this working after much mucking around with the JS and selectors.
Have not started on the new query type plugin yet, nor figuring out how to use the stats component results here.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | 1176088.patch | 9.29 KB | nick_vh |
| #24 | queryType-1176088.patch | 9.87 KB | nick_vh |
| #23 | queryType-1176088.patch | 9.87 KB | nick_vh |
| #22 | facetapi_slider-get-something-working-1176088-22.patch | 49.65 KB | das-peter |
| #15 | facetapi_slider-get-something-working-1176088-15.patch | 22.91 KB | das-peter |
Comments
Comment #1
pwolanin commentedCommitted code for a semi-functional UI, but the back-end pieces are not working yet.
Comment #2
cpliakas commentedGreat!!! This is a very important initiative, and thanks for committing code. Really look forward to the maturity of this functionality.
Regarding the query type plugins, seems like a watered down version of the term and date query type plugins. I think having term_filter, range_filter, and date_filter plugins would satisfy a lot of future widget requirements.
Awesome work,
Chris
Comment #3
pwolanin commentedYes, I'll try to work on a range_filter one soon.
Comment #4
pwolanin commentedmaking more progress - attached is a corresponding apachesolr patch
committed the further progress to the module - constructing a page callback to handle the form submit to avoid double searching.
The alternative would be to do something crazy with JS and the action attribute, and not sure how that would handle the no-JS case.
Comment #5
pwolanin commentedcurrent apachesolr patch - not much changed.
Comment #6
mrharolda commented@pwolanin,
I'm getting this fatal error using the #5 patch and facet_slider from Git:
PHP Fatal error: Call to undefined method ApacheSolrFacetapiAdapter::getFilterKey() in /var/www/d7.local/sites/all/modules/contrib/facet_slider/plugins/facetapi/widget_slider.inc on line 112" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "POST /facetapi/widget/submit/facetapi_slider_widget_form_im_28_field_functiegroep/apachesolr%40ezcompany_solr_server HTTP/1.1The slider renders as a single drag-able button and the error is displayed after clicking it...
Did I do something wrong or is the facet-slider not usable at all at this stage?
Comment #7
cpliakas commented@MrHaroldA This is dependent on #1214772: Make the filter key an instance variable rather than a class const.
Comment #8
pwolanin commentedSo I ran into a hitch that the stats query returns the stats for the result doc set, so basically as you filter down, the slider doesn't give you the option to expand out again.
So, I think we need to cache the full range initially and use that, rather than manking the request each time.
Comment #9
cpliakas commentedSounds like a plan. I think caching the ranges is probably a good idea anyways, as they are used in other areas that would benefit from caching as well. Like anything else, optimal cache invalidation will be the trick.
Comment #10
mrharolda commented@cpliakas: patching facetapi-dev (July 7th) with the patch found in #1214772: Make the filter key an instance variable rather than a class const fixed the 500 error!
Unfortunately, that didn't fix the slider which is only able to select 0 and loads the searchresults after clicking it: [0 TO 0] with a nice "Got values" notice ;)
Comment #11
das-peter commentedI've started patching the code.
This are the changes made:
parseFloat().FacetapiWidgetSlider::execute().FacetapiWidgetSlider::widgetFormValidate()andFacetapiWidgetSlider::widgetFormSubmit().php-Background:
call_user_func()doesn't support references butcall_user_func_array()does.Comment #12
pwolanin commentedI think my use of call_user_func was working by adding the & there. Did that not work?
Comment #13
das-peter commented@pwolanin
First I didn't get the intention of the construct and thus opened this, meanwhile closed, issue #1230076: Get rid of Warning: Call-time pass-by-reference has been deprecated.
Adding
&to a parameter in a function call or incall_user_func()leads to a notice like this: "Warning: Call-time pass-by-reference has been deprecated".The php documentation explicitly says "Note that the parameters for
call_user_func()are not passed by reference.". Nevertheless it seems that references incall_user_func()are supported from php 5.3 upwards - there's this interesting example part in the php documentation:However, since we should support php 5.2.5+ I suggest to use
call_user_func_array()--> No notices, and working references.Comment #14
das-peter commentedAttached patch enhances the support for date ranges. I've only tested it with search_api_solr integration yet, thus I'm not sure if it works for other searchers too. But it definitely needs more work anyway ;)
Comment #15
das-peter commentedSome clean-up to move more js-code back into php.
While doing so I remembered an extension for the jQuery UI slider which would enhance the accessibility and also solves some date related limitations of javascript.
The FilamentGroup selectToUISlider uses two select elements to create the slider - and it's released under GPL / MIT license.
But before I start do integrate this script I'd like to hear your thoughts.
Comment #16
mrharolda commented@das-peter: the -15 patch doesn't apply on the latest git checkout. Which version should I use to test your patch?
Comment #17
das-peter commented@MrHaroldA: All patches base on the latest master branch of facetapi_slider. And since the last change there, was made two weeks ago I guess the problem is somewhere else.
Do you have any additional information what fails?
Did you check the git path prefix settings? I use -p1 formatted patches since the old -p0 format was phased out by May 31, 2011
Comment #18
Everett Zufelt commentedI tested the Filament Group slider with JAWS 12 / FF 5. The UI pattern is a bit new for assistive technology users to get used to. But, it is well coded and does work as a slider for me as a blind screen-reader user.
Comment #19
mrharolda commented@das-peter: the patch worked fine with -p1 ;)
That said, I used a taxonomy vocabulary for a list of numeric values to simplify administration of it for a client. I guess I have to convert that field to an integer-type. I got a slider with tids. Which seems to work fine though ;)
Comment #20
pwolanin commentedI would rather get just the numeric facets working initially - and keep them separate from Date ranges (make them 2 different widgets). I suspect there will be enough different back-end implementation differences that that will be simpler to reliably implement.
Comment #21
askibinski commentedSlider works for integer fields with patch #15 and latest facetapi -dev.
I did have one small problem with the (sliderstep) and a feature proposal which I posted as seperate issues.
Comment #22
das-peter commentedUpdate:
Is there a way to provide widgets only for defined field types?
Comment #23
nick_vhThis continues on the patch of das-peter and incorporates the latest changes in facetapi so we can define what query type to use and to what query types we are restricting this widget to
Comment #24
nick_vhAlso the other widget types are working now, there was still a problem regarding the getFilterKey
Anyone would have any idea how to keep the facets on the page so people can keep redefining their slider?
Comment #25
cpliakas commentedNick, gave you commit access.
~Chris
Comment #26
nick_vhI've redone the patch with only the necessary adjustments so we can focus on getting this working first.
Comment #27
nick_vhCommitted and closing. Let's open more specific issues now
Das-peter : It would be very useful if you'd move your patch to a separate issue so we can work in parallel