Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Fjord 657 posts 1542 karma points c-trib
    Jun 19, 2018 @ 06:50
    Rasmus Fjord
    0

    multi select under facet

    Hey :)

    Im trying out your package, and ive downloaded your example, there is just one thing that I cannot get to work!

    Multi select, if my query becomes something like this: ?fcategory=animals&fcategory=clothing

    Only the first category is looked upon, what im i doing wrong? Isnt this the whole idea with facets?

    Hope you can point me to my error, or in the direction fo fixing this :)

  • Tom Steer 161 posts 596 karma points
    Jun 19, 2018 @ 07:57
    Tom Steer
    1

    Hi Rasmus,

    For this, you will need to override and implement the "CreateBrowseRequest" yourself and then split the query string key accordingly. This is something that could probably be improved to make it easier to extend this.

    https://github.com/designagencyuk/DesignAgency.BoboFacets/blob/master/development/DesignAgency.BoboFacets/Services/BaseBrowser.cs#L225

    Cheers, Tom

  • Rasmus Fjord 657 posts 1542 karma points c-trib
    Jun 19, 2018 @ 14:34
    Rasmus Fjord
    1

    Hey Tom!

    Thanks for getting back so quick! I did some testing and got it working, I got it working, and created a new method besides yours, to handle it. Everything works out of the box with Bobo so the only thing we have to do is push the extra parameters with.

    So an example would be that for url like this : ?fHand=Right&fSex=Male&f_Sex=Female

    https://github.com/designagencyuk/DesignAgency.BoboFacets/pull/4

    It works :) It might not be the prettiest way of extending it, but it works. Do you think it could become a nugetpackage upgrade? since im using your nuget package in my project.

  • Rasmus Fjord 657 posts 1542 karma points c-trib
    Jun 26, 2018 @ 07:10
    Rasmus Fjord
    0

    Hey Tom any update on the pull request? Because I would really like to update my nuget package with the method for our project?

  • Tom Steer 161 posts 596 karma points
    Jun 27, 2018 @ 21:57
    Tom Steer
    0

    Hey Rasmus, sorry for the delay in getting back to you, been super busy the last few days. Thank you very much for the pull request, however I feel it could be more generic as it duplicates a lot of the code atm. Hopefully I’ll get a chance to have a proper look this weekend. Cheers

  • Rasmus Fjord 657 posts 1542 karma points c-trib
    Jun 28, 2018 @ 06:15
    Rasmus Fjord
    0

    Thanks for getting back.

    Right after submitting the pullrequest i saw that aswell, but what I thought was, why not just embed it into the normal request method, why whould we want it not to be able to handle multi query params. Just a thought.

  • Tim Geyssens 6526 posts 15308 karma points MVP 2x c-trib
    Jul 19, 2018 @ 13:20
    Tim Geyssens
    0

    Also interested in this, I did an implementation where the values are passed with a delimiter but unsure about what the best way is (since there doesn't seem to be a standard)

    https://stackoverflow.com/questions/24059773/correct-way-to-pass-multiple-values-for-same-parameter-name-in-get-request

  • Tom Steer 161 posts 596 karma points
    Jul 19, 2018 @ 18:25
    Tom Steer
    2

    Hey... Sorry, it's taken me a while to look at this, been quite busy recently.

    I've come up with the following solution if you could both have a look and let me know what you think:

    https://github.com/designagencyuk/DesignAgency.BoboFacets/commit/71dfc555ed382f79c64a60ac0d3dcfb38ae86143

    This should be a non-breaking change and then also allow you to swap out how the query string is parsed using the composition over inheritance approach to make it easier.

    I've added two basic implementations, the default one is what Rasmus provided and then also a delimiter one to handle the scenario Tim mentioned.

    You can then simply swap the default one out by passing it to the BaseBrowser constructor:

    public MyBrowser() : base(new DelimiterQueryStringParser())
    {
    }
    

    Let me know your thoughts, happy to change it if you have any others ideas.

    Cheers, Tom

  • Tim Geyssens 6526 posts 15308 karma points MVP 2x c-trib
    Jul 19, 2018 @ 18:32
    Tim Geyssens
    2

    Looks ace, I'll give it a go shortly! Thanks again for a great project!

  • Rasmus Fjord 657 posts 1542 karma points c-trib
    Jul 23, 2018 @ 10:48
    Rasmus Fjord
    0

    This is great!

    Tom could you update the nuget package? Then ill test it asap!

  • Rasmus Fjord 657 posts 1542 karma points c-trib
    Jul 23, 2018 @ 11:19
    Rasmus Fjord
    2

    Just an update, I downloaded your branch and tried building it, it couldnt, its just because the new folder /DesignAgency.BoboFacets/FacetQueryStringParsers/ is not part of the project.

    But it works super fine, so ill say release the kraken :)

  • Tom Steer 161 posts 596 karma points
    Jul 23, 2018 @ 11:48
    Tom Steer
    101

    Cheers Rasmus, that's now fixed and pushed to both Nuget & Our as version 0.1.1.

  • Rasmus Fjord 657 posts 1542 karma points c-trib
    Jul 23, 2018 @ 11:49
    Rasmus Fjord
    0

    AWESOME!

    Thanks man!

Please Sign in or register to post replies

Write your reply to:

Draft