-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tests fails (no related) |
This is a fantastic DX improvement! Thanks @yceruto. 👍 |
Thanks for that feature! |
The other idea for solving this would be to somehow show the number of children errors in parents (maybe with different color than red). |
587fa43
to
095d15a
Compare
095d15a
to
00b8785
Compare
I just rebased! All tests in green again 😃 |
@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 👀 ;) |
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 the
If we implement this proposal, the result will be:
Which would be confused IMO, even if we put different colors. WDYT ? |
@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 |
I like your proposal @ogizanagi I say let's do it. |
Status: Needs work |
Updated! Status: Needs Review |
I've updated the result screenshot with highlighting error path feature, thanks to @eXtreme, @apfelbox and @ogizanagi by the idea 👍 |
👍 |
👍 |
Ready for @symfony/mergers? |
Thank you @yceruto. |
… 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:  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:  In red the full path to the error.  Commits ------- d626b28 [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
…m nodes that contains children with errors (yceruto) This PR was squashed before being merged into the 3.2-dev branch (closes symfony#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:  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:  In red the full path to the error.  Commits ------- d626b28 [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
Currently when we use nested forms and an error occurs into one of them, it's not displayed "easily" in the form panel profiler:
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:
In red the full path to the error.