-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Use an horizontal rule to separate preferred choices #52260
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
Comments
π sounds good to me |
Already supported in Safari and now in Chrome. We're just missing Firefox there. Note that we might need to make this configurable at first, as some projects might need to keep support for older browsers or they might do custom things with the separator. |
For reference, here is the ticket tracking this for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1830909 |
This has been implemented in Firefox π It's available in the nightly release. See https://www.mozilla.org/en-US/firefox/122.0a1/releasenotes/ and will land in the next 122 stable release. |
β¦ custom separator after preferred choices (mboultoureau) This PR was squashed before being merged into the 7.1 branch. Discussion ---------- [Form] Add option `separator` to `ChoiceType` to use a custom separator after preferred choices | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Linked with #52260 | License | MIT Add `separator_html` option to display the `separator` text as HTML Commits ------- bde5191 [Form] Add option `separator` to `ChoiceType` to use a custom separator after preferred choices
Another option would be to use a unicode character to make a line ( |
I would not make the change by default to not break existing applications (or at least their tests). Being able to customise this is sufficient to me. |
Description
Today, we use by default the following text-based separator for preferred choices in
ChoiceType
:symfony/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
Line 243 in fafbbfa
Some browsers just added support for adding
<hr>
as separators inside<select>
elements, which looks much better. See https://developer.chrome.com/blog/hr-in-select/If this proposal is accepted, it can only be implemented in a few months, when most browsers support this feature. Thanks!
The text was updated successfully, but these errors were encountered: