Closed chriddyp closed 5 years ago
The second set of commits simplifies the error boundaries. See 9010044 for details. In the previous version, we:
display: block
which doesn't necessarily match the wrapped component. For example, the output component could be a span
(display: inline
) in-line with other spans.This commit simplifies the logic: now we just display the previous state of the component (if available) without an overlay and without disabling the inputs.
This is similar to how the backend errors affect the frontend.
Now that we have nice error messages, the stack traces aren't as useful for the end user. I feel like they may even indicate to the user that the issue wasn't their fault but was something much more complicated.
@chriddyp python3.x test errors are different than 2.7
======================================================================
ERROR: test_devtools_validation_errors (tests.test_render.Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/circleci/repo/tests/test_render.py", line 2647, in test_devtools_validation_errors
self.wait_for_element_by_css_selector('.test-devtools-error-toggle').click()
File "/home/circleci/repo/tests/test_render.py", line 60, in wait_for_element_by_css_selector
'Could not find element with selector "{}"'.format(selector)
File "/home/circleci/repo/venv/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: Could not find element with selector ".test-devtools-error-toggle"
alright - those tests have been fixed and several more have been added
💃 avant dodo
Improving the prop type error messages.
Previously
Now