Commit Graph

25 Commits

Author SHA1 Message Date
Dan Abramov
f65a1a90a7 Add missing slash 2017-09-02 13:54:33 -07:00
Jared Palmer
8a72a314bc Make error overlay filename configurable (#3028)
* Make error overlay file configurable

* Add fallback filename
2017-09-02 13:42:04 -07:00
Tharaka Wijebandara
ecd1f0544b Convert react-error-overlay to React (#2515)
* Convert react-error-overlay to React

* Update compile-time error overlay to use react-error-overlay components

 * Refactor react-error-overlay components to container and presentational components.

 * Make the compile-time error overlay a part of react-error-overlay package.

 * Use react-error-overlay as dependency in react-dev-utils to show compile-time errors.

* Run Prettier

* Move the function name fix into StackFrame itself

* Fix clicking on source code snippet to open the code in editor

* Use exact objects + minor style tweak

* Don't linkify frames that don't exist on the disk

* Fix lint

* Consolidate iframe rendering logic

* Remove circular dependency between react-dev-utils and react-error-overlay

* Fix lint

* Fix decoupling of react-dev-utils and react-error-overlay by moving middleware

* Deduplicate identical errors
2017-08-27 19:45:55 -06:00
864907600cc
cff167f068 Fix parsing HTML/JSX tags to real elements (#2796)
* Fix parsing HTML/JSX tags to real elements

* Use `html-entities` to escape instead of pure `replace()`

* Remove unnecessary HTML entity replacing
2017-08-01 21:21:07 -04:00
Dan Abramov
a171d93064 Reformat source code with Prettier 1.5.2 2017-06-28 16:23:16 +01:00
Dan Abramov
9cfa3552ba Limit console warnings to 5 files at most (#2327) 2017-05-22 16:36:53 +01:00
Broda Noel
7348ca9bd1 Wrap console calls into a check (#2301)
* Wrap console calls into a check

* Add another check
2017-05-21 20:42:28 +01:00
Dan Abramov
d76c1b78eb Wrap console calls into a check (#2290) 2017-05-20 19:06:48 +01:00
Dan Abramov
6c8b18b0cd Improve interaction between compile and runtime overlays (#2219) 2017-05-18 23:07:56 +01:00
Dan Abramov
07c75aa5fd Replace text-align: start with left to fix Edge (#2215) 2017-05-18 19:04:43 +01:00
Brian Vaughn
0681e24531 Tweaked error overlay styles (pt2) (#2208)
* Fixed several of the issues and nits from PR:

* Moved margin between header and file name to header, so when content was scrolled, the header would remain more separate
* Made build-time and runtime overlays better match
* Secondary error <pre> style now uses yellow bg instead of red
* 'Scrollable Header' (see above comment to why this is necessary) but I did increase the max-height from 35% to 50%.
* Fixed header and 'X' button vertical alignment

* Temporary stack margin fix

* Move "N errors" to the top
2017-05-18 12:25:43 +01:00
Brian Vaughn
68f95d4133 Tweaking error overlay styles (#2201)
* Tweaked overlay styles

* Tweaked pre-style

* Clicked to background overlay dismiss

* Tidied up styles tobe more mobile Safari friendly

* Re-enabled pre-wrap

* Margin fixes

* Base font-size 10 -> 11px

* Error overlay is full-screen now based on feedback

* Make "N errors on the page" visible again

* Fix bottom margin of frame location and lack of tab nav

* Add tooltip to close button

* Bring compile error styles closer to runtime overlay

* s/when/if/
2017-05-18 00:48:33 +01:00
Dan Abramov
0a503954b2 Prettify errors and warnings for Webpack 2 (#2113)
* Prettify errors and warnings for Webpack 2

* Update formatWebpackMessages.js
2017-05-10 21:49:37 +01:00
Valerii Sorokobatko
fe7b5c212b update to modern code style (#1738)
* mv create-react-app/index.js -> create-react-app/creteReactApp.js

* update to modern code style

* var -> cosnt

* set trailing-coma to es5 for prettier
2017-03-07 19:46:10 +00:00
Joe Haddad
ed5c016d61 Add runtime error overlay (#1101)
* Add red box prototype

* Unmount fail node when hot-reloaded (future proofing)

* Slightly improve error reason

* Add Chrome unhandledrejection listener

* Close red box when Escape is pressed

* Construct our own source if not available

* Resolve sourcemaps for friendlier traces

* Allow error to be scrolled

* Only utilize sourcemaps, not the magic. :(

* Make view similar to React Native

* Fix an uncaught syntax error

* Add workaround for Firefox 50

* Add a hint for closing the prompt

* Multiple error support
When there's multiple errors, simply state that there are more instead of re-rendering

* Log any renderer error

* Dim node_modules in display

* Override chrome stack trace limit

* Magic: show me some source!

* Add ability to toggle internal calls

* Switch text from show -> hide

* Change color scheme to something easier on the eyes

* Change UI to be friendlier (thanks @nicinabox)
https://github.com/facebookincubator/create-react-app/pull/1101#issuecomment-263621057
https://github.com/facebookincubator/create-react-app/pull/1101#issuecomment-263636171

* Update styles

* Add container inside overlay

* Apply pre style

* Add line highlight

* Add omitted frames ui

* Move yellow to var

* Do all function names in black

* Adapt container based on screen size

* Extract ansiHTML

Use base16-github theme

* Linting

* Add syntax highlighting of errors

* Linting

* Remove white background

* Append new files to package.json

* Target exact version

* White is a little harsh, use same color as red box.

* Fix a bug where omitted frames would never be rendered
(under certain circumstances)

* Show local file path instead of confusing webpack://

* Do not require the entire file

* Remove css file

* Use context size, not a magic variable.

* Fix title regression

* Update dependency

* Do not center text for internal calls

* Temporarily disable links

* Switch internal toggle to 'i'

* Remove unnecessary rules from container style

* Reduce omitted frames font size

* Fix font family in pre > code

* Re-introduce line highlighting

* Object.<anonymous> -> (anonymous function)

* Add ability to see script source

* Add missing ansi mappings

* Remove SIAF

* Skip native functions

* Extract hints div function

* Extract renderers

* Refacor var names

* If source is disabled, don't use the line.

* Allow toggle between source

* Allow bundles to be expanded

* Wow, how did I let this one slip?

* Toggle text for UX/DX

* Make it so clicking Close unmounts the error component

* Do not allow hot reloading once an error is thrown

* Do not wrap lines for small displays

* Fix toggle when additional errors happen

* Make the close a button

* Capture and store errors

* Dispose on render; move additional logic

* Only make code not wrap

* Switch to a view-by-index method

* Allow user to switch between errors with arrow keys

* Fix text while switching between errors

* Update close button style

* Render additional errors at top

* Add left and right arrows

* Make frames pointy

* UTF-8 arrows

* Don't mount unneeded DOM node

* Switch to single changing text for compiled <-> source

* Don't display arrows with only one error.

* Collapsed and expanded

* Make sure the last collapse toggle is appended

* Do not show the stack trace if it doesn't resolve to a file we wrote

* Style container with media queries

* Do not allow x overflow; break words by default.

* Trim off whitespace of lines

* Remove padding since it's not outer-most

* Add footer message

* Extract css file to JS

* Only inject the css when the overlay is up

* Extract red variable

* Remove env

* Update babel-code-frame

* Set force color to true

* Extract out collapse div logic

* Remove arrow field

* Insert a top collapse

* Make browser friendlier

* Absolutify ^

* Make arrows buttons

* Accessify

* Let there be ES5

* Pretty css

* Use forEach where we can ...

* Remove extracted loop

* Fix IE compatibility

* Capture React warnings

* Add source override via React output parsing

* Whoops, fix arguments to crash.

* es5-ify

* Re-enable e2e-install directory test

* Only rewrite line number if it was resolved and leaves a line at bottom

* Rename failFast to crashOverlay

* Disable console proxy

* Appease linter

* Appease more
2017-03-06 21:59:57 -05:00
Dan Abramov
2f7e3a2168 Lint internal scripts with eslint:recommended (#1729)
* Lint internal scripts with eslint:recommended

* Warnings r bad
2017-03-05 22:29:28 +00:00
Kees Kluskens
1d5a277367 Enable watchContentBase for webpack-dev-server (#1546)
Resolves #1508
2017-02-14 21:41:31 -05:00
Robbie H
17bb8d420f webpack-dev-server patch for 'still-ok' success status (#1377) 2017-01-12 10:27:58 -08:00
Jarle Friestad
4e5a561d98 Dispose error overlay when linting errors have been corrected (#856)
* Dispose error overlay when linting errors have been corrected

* Fixed spelling error

* Minor style tweaks
2016-10-11 12:44:58 +01:00
Michal Kvasničák
4feff2acf7 Make webpackHotDevClient support webpack 2 too (#840)
* Support webpack 2

* Code style
2016-10-04 13:25:13 +01:00
Brian Ng
909d938166 Fix some typos (#809) 2016-10-01 12:13:42 +03:00
Ville Immonen
7d0fd03b00 Fix the right and bottom padding of the error overlay (#758) 2016-09-26 10:29:55 +01:00
Dan Abramov
17ab11e279 Add an unobtrusive log when server disconnects 2016-09-25 12:41:33 +01:00
Dan Abramov
e872907b50 Fix error overlay in Firefox (#749) 2016-09-25 12:33:43 +01:00
Dan Abramov
9cce0fb59f Add syntax error overlay in development (#744)
* Add syntax error overlay in development

* Support HMR being disabled

* Tweak CSS
2016-09-25 11:31:10 +01:00