HI

We're using Ajax facets successfully with a number of our taxonomy vocabularies and it's working brilliantly.

Date facets provides a good solution for narrowing results chronologically, but doesn't work with Ajax facets.

Could you provide a bit more information about why this limitation exists?

Thanks in advance

Luke

CommentFileSizeAuthor
#14 d7_ajax_facets.patch447 bytesfago
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lukus created an issue. See original summary.

eugene.ilyin’s picture

Hello lukus

Thank you for interest. It's very nice for me to receive feedback from active developers.
I understand your need and I have idea how to implement it.
It can be special class (actually facet widget) which will extend facet widget from module "Date facets" (and maybe not only from Date facets).
The main purpose of this class will be adding some things to ajaxify the existing facet widget.

It would be nice but it's just idea. I need some time to do it, but now I'm overloaded in the office.

lukus’s picture

Hey Eugene

Thanks for the info. I'd be happy to help with this, but would appreciate any steer you can give me to aid my progress.

I'll start taking a look at the code. Please let me know if you have any ideas I should consider.

Cheers

Luke

lukus’s picture

Category: Support request » Feature request
lukus’s picture

Hi there

I was wondering if you could provide an update re. this feature request. Do you know whether the functionality will be added to the ajax_facet roadmap in the near future?

Thanks

Luke

eugene.ilyin’s picture

Status: Active » Postponed

It's interesting thing, but I have quite a few time.
I think that I'll come back to this issue in D8 version.

lukus’s picture

Hey there

We need to provide this functionality for a specific project, and are currently carrying out some investigation to decide on the best way to approach development.

Could you provide some brief notes that could support our investigation? You mentioned above that you'd aim to extend the facet widget from the Date Facets module. Are there any other guidelines that you think might be relevant?

Thanks in advance,

Luke

eugene.ilyin’s picture

Status: Postponed » Active

Hey

I thought about it yesterday evening. Seems I know how to do it pretty easy. Let me check my theory today evening.

eugene.ilyin’s picture

Status: Active » Postponed

So, I have checked it.

My vision is next:
Most of the widget looks like a bunch of check boxes or links. We need to be able to use something like API in ajax_facets, to force the widgets in other modules like date_facets, work by ajax.
We should be able to extend your existing logic ajax_facets to ajaxify new kinds of widgets easily.

I see that it requires pretty much changes and cannot be implemented in good way for D7.
I'll keep this issue in mind for D8.

eugene.ilyin’s picture

eugene.ilyin’s picture

Version: 7.x-3.x-dev » 8.x-1.x-dev
lukus’s picture

Hey Eugene

Thanks for investigating! Just to make sure I understand what you're saying completely correctly—are you saying that it's not going to be possible in the D7 version, because the architecture won't support it?

If so, would you recommend we find a totally different solution?

Thanks for your time on this

Luke

eugene.ilyin’s picture

Just to make sure I understand what you're saying completely correctly—are you saying that it's not going to be possible in the D7 version, because the architecture won't support it?

It's possible but it will be not good way. Unfortunately I have no enough time to implement temporary solutions and change them to good solutions later. I want to make good solutions only.

If so, would you recommend we find a totally different solution?

I don't think that you need totally different solution. My recommendation will be good for custom case as in your situation.
Date widgets are very similar to regular widgets for links and checkboxes from point of view of rendering. So you can handle them as ajax widgets for links and checkboxes but save logic to generate items in widgets according to type of data date.

Seems my english is so so. Sorry :)
You can write me into the skype with certain questions.

fago’s picture

Status: Postponed » Needs review
FileSize
447 bytes

I ran into the same issue and took a short look at the code. Eugene, I'm not sure why you think date facets should be handled differently - but the facet_api widgets treat term and date facet links just the same way. I tried, and it works just the same with ajax facet links.

Attached patch does the trick for me and makes the module work just fine with date facets.

That said, eugeneilyin thanks for contributing this module. It works great and is a big deal in improving facet UX!

fago’s picture

Version: 8.x-1.x-dev » 7.x-3.x-dev

ops, this patch is for d7.

efpapado’s picture

Status: Needs review » Reviewed & tested by the community

I tested this and it works very well. I suggest changing status to RTBC.

efpapado’s picture

Status: Reviewed & tested by the community » Needs work

Further testing revealed a problem.
If one selects a year, and then a month, and then removes the year, the month is still selected.

  • eugene.ilyin committed a66a310 on 7.x-3.x authored by fago
    Issue #2645894 by fago, lukus, eugene.ilyin: Utilising Date facets with...
eugene.ilyin’s picture

If one selects a year, and then a month, and then removes the year, the month is still selected.

It's not a bug because it's different values of filters (different intervals).

Thank you @fago for such simple solution.
Committed.

eugene.ilyin’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.