-
-
Notifications
You must be signed in to change notification settings - Fork 364
Allow removing options that EntityType
can't accept
#976
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
Conversation
A side note: if I knew how to get a list of options of that If there is a way to do that, please let me know, I'm happy to tweak things! |
@janklan we should avoid words like "blacklist" and "whitelist", and prefer words that are more inclusive and convey real meanings.
|
@garak I think we don't need to get into politics of offensive language before this gets any real indication of whether or not it is even viable. Thanks for the feedback though. |
@janklan it's not politics, it's just trying to be nice. Anyway, even if you don't care about it and you want to consider it as "politics", I provided you with a very practical reason: the word "blacklist" simply doesn't convey the meaning you want unless you leverage a stereotype. |
Using the word "blacklist" shouldn't be seen as "being not nice". The official definition in the Oxford Dictionary is: "a list of people or things that are regarded as unacceptable or untrustworthy and should be excluded or avoided.". In the current context, it contains a list of options we wish to exclude from passing to the With that said, let's please go back to the technical aspects of this PR. |
Thanks for your understanding |
@garak correct; neutral does not mean "not nice". I think neutral is great, especially in software. It's not a poem. It's code. It should be precise above all. Anyway, I have an opinion on these things that you would probably disagree with, and that's OK. Consider my opinion suppressed in favour of your opinion :) |
The problem is that if you're neutral in an unbalanced situation, you're on the same side as the "not nice" ones. |
Let's agree to disagree and let's get back to focusing on the subject of this PR. Thanks. |
@janklan I like the idea behind this. It's not automatic, but it makes something work that doesn't currently work. If I'm understanding the use-case, it would be this: A) I create an "entity autocomplete field" - like https://github.com/symfony/ux/blob/2.x/ux.symfony.com/src/Form/FoodAutocompleteField.php - but I add a custom option - e.g. B) When using the field - like
Am I thinking about this correctly? If so, then when the Ajax request is made to the autocomplete endpoint, won't we recreate the Cheers! |
I think this can be closed as there are no nested form type now, and you can provide everything same as with other form types |
Yup & yay! Let us know if you have any issues with the new system |
If you implement a custom Autocompleter class as described in the docs and happen to require some non-standard options for your custom field, the Autocompleter (currently) tries to pass your custom option to the internal
EntityType
field.This PR adds the ability to list the options that should NOT be passed to that
EntityType
.