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][WebProfiler] Empty form names fix#12267

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

Closed
kix wants to merge1 commit intosymfony:masterfromkix:profiler_empty_form_names

Conversation

@kix
Copy link
Contributor

@kixkix commentedOct 20, 2014

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsnone
LicenseMIT
Doc PRnone

When a Form had no name, the markup was broken in the profiler, making the form tree ugly. This pull request changes the output so that(no name) string is displayed when no form name was available.

Before:
screenshot 2014-10-21 00 06 23

After:
screenshot 2014-10-21 00 08 02

@phramz
Copy link
Contributor

won't a  do it as well?

@kix
Copy link
ContributorAuthor

kix commentedOct 20, 2014

It sure could, but personally I think that it would be less understandable. This fix improves usability a bit, too, IMO.

@javiereguiluz
Copy link
Member

@kix thanks for this PR! I personally love this kind of small fixes that improve the overall quality of the framework. This will lead to less confusion for developers and that's very important.

I also agree that showing some explicit message, such asno name, it's better than displaying a white space.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

you should remove the spaces around the| according to the Twig coding standards.

And I even suggest using{% if name is not empty %} here. It will make the intent easier to understand

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@stof 👍

@kixkixforce-pushed theprofiler_empty_form_names branch 2 times, most recently from76411e1 to88c5910CompareOctober 27, 2014 10:16
@kix
Copy link
ContributorAuthor

kix commentedOct 27, 2014

@webmozart Done. Is it better now?

@webmozart
Copy link
Contributor

Yes! :) Could you add the same fix to the details view on the right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why not simply:

{{ name|default('(no name)') }}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

@kixkixforce-pushed theprofiler_empty_form_names branch from88c5910 to3800402CompareNovember 4, 2014 12:05
When a Form had no name, the markup was broken in the profiler,making the form tree ugly.
@kixkixforce-pushed theprofiler_empty_form_names branch from3800402 toc121deaCompareNovember 4, 2014 12:15
@kix
Copy link
ContributorAuthor

kix commentedNov 4, 2014

Got it. Right-side detail view is updated in the same manner, too.

@fabpot
Copy link
Member

Thank you@kix.

fabpot added a commit that referenced this pull requestNov 21, 2014
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes#12267).Discussion----------[Form][WebProfiler] Empty form names fix| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | none| License       | MIT| Doc PR        | noneWhen a Form had no name, the markup was broken in the profiler, making the form tree ugly. This pull request changes the output so that `(no name)` string is displayed when no form name was available.Before:![screenshot 2014-10-21 00 06 23](https://cloud.githubusercontent.com/assets/345754/4706329/d596a3ec-5883-11e4-8c67-44a7f357f3e1.png)After:![screenshot 2014-10-21 00 08 02](https://cloud.githubusercontent.com/assets/345754/4706359/122674c2-5884-11e4-8237-0177a590f2a0.png)Commits-------6e9642a [Form][WebProfiler] Empty form names fix
@fabpotfabpot closed thisNov 21, 2014
@kixkix deleted the profiler_empty_form_names branchNovember 26, 2014 14:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@kix@phramz@javiereguiluz@webmozart@fabpot@stloyd@stof

[8]ページ先頭

©2009-2025 Movatter.jp