-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Filtering Select Box Link fields by None
#2073
Comments
Thanks. Will have a look myself later, currently in the middle of migrating a larger project to 2.4, just wanted to log the issues before I forget about it. |
The issue will be that the SBL provides it's options relative to creating a select box, and the filtering won't take that into account when it calls that method. |
@nilshoerrmann, how can we make the filtering get filters from the field? I could make the SBL implement I can fix this in the SBL too, but I'm not happy with it. For example, if |
Symphony's public API is really poor whenit comes to fetching field or entry data. The biggest problem is that we have to use functions that were never created for these purposes – in this case I'm not sure where and how this should be fixed. You know better, Brendan. |
@nilshoerrmann I'm thinking we need to get Field's to really implement the Field's If all the field's implemented this function (and by default all should at the moment with at least For this immediate problem, SBL should include the magic |
Are you available for a chat tomorrow or Wednesday? |
Wednesday morning AEST works for me, how about you? |
That's in the midst of the night here, if I'm not mistaken? Will have to check that first. |
Ah it might be, I'm not too sure. Let me know a time that suits and I'll see what I can do :) |
I just checked and your mornings are our nights (we are 8 hours behind at the moment). What about the evenings? Anything after 16:00 / 4pm your time would suit me. |
@brendo @nilshoerrmann any conclusion was made during your chat ? I would be interested to fix that as well. |
We missed each other and didn't chat yet. The most important things in my eyes needed by the backend scripts that affect the PHP part of the system:
The first two points should be available in the markup or the Based on these features, the UI interactions can be fixed and improved. |
Great starting point. Do not hesitate to ping me on twitter or skype. I totally agree with your proposition. |
@nilshoerrmann @nitriques Check out that commit. I've added
This generates a markup like: The idea is that you could call this function from the Publish Filtering context to get the display value (
Little unsure how to integrate this. The SBL works both, ID's or handles so I can't really make it pick between one or the other.
@nitriques suggested this in #2171. It's worth noting that SBL has this with |
Is that true? I wasn't aware of that. In this case: Why do handles work, but values don't? It would save us a lot of headache, if we wouldn't have to take care of ids. |
Do you mean not having to code it or remove filtering by ids ? IMO, I think one should be able to filter using everything that's possible: values, handles and Ids... |
I was thinking of problems like #2076 where we use the id in the URL but have no way to restore the string value in the search so far. |
ok Nils thanks. |
I thought about this over the weekend and came up with the following ideas:
Depending on the returned value of the function, Symphony could adjust the filtering UI behaviour.
Thinking about the backend filtering it would be great, if we had a consistent API for retreiving and converting values or IDs on a general level: if we want to keep the filtering UI manageable, we cannot take custom field functions like SBL's I have some spare time by the end of the week and like work on the interface aspects. If we could agree on a way how to handle the two mentioned areas that would be great (just the general concept and the naming of function, it can be implemented later). |
Actually you can use anything. Handle's, value's or ID's will all resolve with the Select Box Link. Does that totally simplify your thoughts? This transformation happens in Don't forget to check out the |
Yes, I'll take that branch as a base. Regarding the SBL filtering: I remember that it didn't work with values when implementing the current version of publish filtering. Are backend filtering and DS filtering supposed to be working exactly the same? |
Publish Filtering uses I've just tested this with a SBL link, while filtering will add the Let me know how you go :) On Tue, Nov 4, 2014 at 8:58 PM, Nils Hörrmann notifications@github.com
|
Okay, I'll check that out.
I will :) |
This is great! I do not think that we really need a preferred filtering method, but a way to get 'supported' ones. In understand that from a DB perspective, ID are better, but from a client perspective, IDs do not even exists. |
This is merged into |
I'll work on the whole filtering UI later. Looking at the latest changes for the DS filtering interface, it might be possible to unify the filter handling by also using a Duplicator in the publish area (with a different styling inside the drawer though). |
The |
Are you still working on the filtering branch? Let me know when you're done and ready for testing. Totally stunned by the amount of work you've put into this over the last few days, thanks so much. |
Yes, still a few things to do. I'll create a pull request if it's ready to be tested. |
This should be fixed as soon as the suggestion type is declared within SBL, see symphonycms/selectbox_link_field#80. |
Select Box Link fields that are optional can be filtered by
None
(publish filtering), but that doesn't seem to work.The text was updated successfully, but these errors were encountered: