Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Remove default option grouping in TimezoneType#31293

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromro0NL:tz-form
Apr 29, 2019
Merged

[Form] Remove default option grouping in TimezoneType#31293

fabpot merged 1 commit intosymfony:masterfromro0NL:tz-form
Apr 29, 2019

Conversation

@ro0NL
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#...
LicenseMIT
Doc PRsymfony/symfony-docs#...

This removes some complexity from the TimezoneType. The default option grouping is really a simplegroup_by (+choice_label) configuration for the end-user, i.e.:

'group_by' =>function($choice) {if (false !==$i =strpos($choice,'/')) {returnsubstr($choice,0,$i);    }return'Other';},

The grouping labels are not really i18n friendly, so i think SF should opt-out by default.

@ro0NL
Copy link
ContributorAuthor

(failures unrelated; deps=high should pass once merged upstream)

@fabpot
Copy link
Member

Thank you@ro0NL.

@fabpotfabpot merged commitebe6179 intosymfony:masterApr 29, 2019
fabpot added a commit that referenced this pull requestApr 29, 2019
…(ro0NL)This PR was squashed before being merged into the 4.3-dev branch (closes#31293).Discussion----------[Form] Remove default option grouping in TimezoneType| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->This removes some complexity from the TimezoneType. The default option grouping is really a simple `group_by`  (+ `choice_label`) configuration for the end-user, i.e.:```php'group_by' => function($choice) {    if (false !== $i = strpos($choice, '/')) {        return substr($choice, 0, $i);    }    return 'Other';},```The grouping labels are not really i18n friendly, so i think SF should opt-out by default.Commits-------ebe6179 [Form] Remove default option grouping in TimezoneType
@ro0NLro0NL deleted the tz-form branchApril 29, 2019 08:36
@nicolas-grekasnicolas-grekas modified the milestones:next,4.3Apr 30, 2019
@fabpotfabpot mentioned this pull requestMay 9, 2019
fabpot added a commit that referenced this pull requestMay 13, 2019
…mezoneType (ro0NL)This PR was merged into the 4.3 branch.Discussion----------[Form] Add intl/choice_translation_locale option to TimezoneType| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets |#28836| License       | MIT| Doc PR        |symfony/symfony-docs#11503final step :)for now i think any form of grouping is a user concern (i.e. by GMT offset or area name); see#31293 +#31295having a special built in `group_by' => 'gmt_offset'` util would be nice, and can be done in the future.includes#31434Commits-------001b930 [Form] Add intl/choice_translation_locale option to TimezoneType
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@ro0NL@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp