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

[WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors#19339

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

Conversation

@yceruto
Copy link
Member

@ycerutoyceruto commentedJul 11, 2016
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Currently when we use nested forms and an error occurs into one of them, it's not displayed "easily" in the form panel profiler:

first

This happen because only the root form is expanded and the children are shown collapsed "by default".

The main problem is to search where is the form with error.

The purpose of this PR is to show expanded all forms that contains children with error, reducing a little bit the developer's time when debugging.

PR result when we access to the form panel profiler:

form-error-result

In red the full path to the error.

form-error-result2

fsevestre, javiereguiluz, voronkovich, sstok, hason, apfelbox, unexge, chalasr, and yceruto reacted with thumbs up emojiHeahDude, ogizanagi, and yceruto reacted with heart emoji
@carsonbotcarsonbot added Status: Needs Review WebProfilerBundle Form DXDX = Developer eXperience (anything that improves the experience of using Symfony) Feature labelsJul 11, 2016
@yceruto
Copy link
MemberAuthor

yceruto commentedJul 11, 2016
edited
Loading

Tests fails (no related)
OK Form Tests

@javiereguiluz
Copy link
Member

This is a fantastic DX improvement! Thanks@yceruto.

👍

@HeahDude
Copy link
Contributor

Thanks for that feature!

@eXtreme
Copy link
Contributor

The other idea for solving this would be to somehow show the number of children errors in parents (maybe with different color than red).

@ycerutoycerutoforce-pushed theweb-profiler-form-errors branch from587fa43 to095d15aCompareJuly 12, 2016 17:26
@ycerutoycerutoforce-pushed theweb-profiler-form-errors branch from095d15a to00b8785CompareJuly 12, 2016 17:33
@yceruto
Copy link
MemberAuthor

yceruto commentedJul 12, 2016
edited
Loading

I just rebased! All tests in green again 😃

@yceruto
Copy link
MemberAuthor

yceruto commentedJul 12, 2016
edited
Loading

@eXtreme would be another solution but in that case we would have to open each node until the form with error. In this way the form error is in sight 👀 ;)

@apfelbox
Copy link
Contributor

@eXtreme@yceruto why not both?

fsevestre and eXtreme reacted with thumbs up emoji

@yceruto
Copy link
MemberAuthor

yceruto commentedJul 14, 2016
edited
Loading

I've found a pain point to make this#19339 (comment) proposal:

Suppose you have a form with two children, where one of them has theerror_bubbling property totrue and both children have an error, right now, the result will be:

- form [1]    - child1 <--- error_bubbling = true, so the error is passed to parent form    - child2 [1]

If we implement this proposal, the result will be:

- form [1][1]     - child1    - child2 [1]

Which would be confused IMO, even if we put different colors.

WDYT ?

@ogizanagi
Copy link
Contributor

@yceruto : I was for both proposals, but I came to the same point you did. So IMHO, your solution is enough. But if we wanted to improve this a little bit, I'd say that's not the number of errors in children forms which is important, but rather showing the path to the error. This is what you do by expanding all nodes with errors, but why not simply highlighting in red the full path ?

- form // some children contain errors, red    - child1 // No error, grey-   - child2 [1] // Has error, red
yceruto reacted with thumbs up emoji

@yceruto
Copy link
MemberAuthor

I like your proposal@ogizanagi I say let's do it.

@ycerutoyceruto changed the title[WebProfilerBundle][Form][DX] Expand forms that contains children with errors[WIP][WebProfilerBundle][Form][DX] Expand forms that contains children with errorsJul 15, 2016
@yceruto
Copy link
MemberAuthor

Status: Needs work

@yceruto
Copy link
MemberAuthor

Updated!

Status: Needs Review

@ycerutoyceruto changed the title[WIP][WebProfilerBundle][Form][DX] Expand forms that contains children with errors[WebProfilerBundle][Form][DX] Expand forms that contains children with errorsJul 26, 2016
@ycerutoyceruto changed the title[WebProfilerBundle][Form][DX] Expand forms that contains children with errors[WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errorsJul 27, 2016
@yceruto
Copy link
MemberAuthor

yceruto commentedJul 29, 2016
edited
Loading

I've updated the result screenshot with highlighting error path feature, thanks to@eXtreme,@apfelbox and@ogizanagi by the idea 👍

@fabpot
Copy link
Member

👍

@nicolas-grekas
Copy link
Member

👍
Status: reviewed

@yceruto
Copy link
MemberAuthor

Ready for @symfony/mergers?

@fabpot
Copy link
Member

Thank you@yceruto.

@fabpotfabpot closed thisAug 22, 2016
fabpot added a commit that referenced this pull requestAug 22, 2016
… that contains children with errors (yceruto)This PR was squashed before being merged into the 3.2-dev branch (closes#19339).Discussion----------[WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Currently when we use nested forms and an error occurs into one of them, it's not displayed "easily" in the form panel profiler:![first](https://cloud.githubusercontent.com/assets/2028198/17125622/1fd15142-52c3-11e6-830e-17b3e341ba60.png)This happen because only the root form is expanded and the children are shown collapsed "by default".**The main problem is to search where is the form with error**.The purpose of this PR is to show expanded all forms that contains children with error, reducing a little bit the developer's time when debugging.PR result when we access to the form panel profiler:![form-error-result](https://cloud.githubusercontent.com/assets/2028198/17125447/83eb9c0c-52c1-11e6-94bc-a2a7492eea43.png)In red the full path to the error.![form-error-result2](https://cloud.githubusercontent.com/assets/2028198/17125459/a04de95e-52c1-11e6-8980-84a5dcd0914a.png)Commits-------d626b28 [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
@ycerutoyceruto deleted the web-profiler-form-errors branchAugust 22, 2016 17:33
@fabpotfabpot mentioned this pull requestOct 27, 2016
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull requestMar 25, 2018
…m nodes that contains children with errors (yceruto)This PR was squashed before being merged into the 3.2-dev branch (closessymfony#19339).Discussion----------[WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Currently when we use nested forms and an error occurs into one of them, it's not displayed "easily" in the form panel profiler:![first](https://cloud.githubusercontent.com/assets/2028198/17125622/1fd15142-52c3-11e6-830e-17b3e341ba60.png)This happen because only the root form is expanded and the children are shown collapsed "by default".**The main problem is to search where is the form with error**.The purpose of this PR is to show expanded all forms that contains children with error, reducing a little bit the developer's time when debugging.PR result when we access to the form panel profiler:![form-error-result](https://cloud.githubusercontent.com/assets/2028198/17125447/83eb9c0c-52c1-11e6-94bc-a2a7492eea43.png)In red the full path to the error.![form-error-result2](https://cloud.githubusercontent.com/assets/2028198/17125459/a04de95e-52c1-11e6-8980-84a5dcd0914a.png)Commits-------d626b28 [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
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

DXDX = Developer eXperience (anything that improves the experience of using Symfony)FeatureFormStatus: ReviewedWebProfilerBundle

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

9 participants

@yceruto@javiereguiluz@HeahDude@eXtreme@apfelbox@ogizanagi@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp