Skip to content
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

Yellow Box for react-dom #7360

Closed
wants to merge 8 commits into from
Closed

Yellow Box for react-dom #7360

wants to merge 8 commits into from

Conversation

keyz
Copy link
Contributor

@keyz keyz commented Jul 27, 2016

This is a port of React Native's Yellow Box to react-dom. It's also similar to our internal ErrorMessageConsole module at Facebook.

It requires facebook/fbjs#165 which passes warning info from warning(...) to __showWarning(...) (the new global hook installed by react-dom).

A demo can be found here: https://jsfiddle.net/keyanzhang/mmupy3zh/15/embedded/result/. There's no fancy styling since we want to keep this component as simple as possible.

Thanks for reviewing! @spicyj


const YellowBoxMessage = require('ReactDOMYellowBoxMessage');

import type {Format, Instance, Milliseconds, InstanceInfo} from 'reactShowWarningDOM';
Copy link
Collaborator

Choose a reason for hiding this comment

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

This depends on a later commit. :\

Copy link
Contributor Author

@keyz keyz Aug 2, 2016

Choose a reason for hiding this comment

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

Oops, sorry didn't notice that :|

@keyz
Copy link
Contributor Author

keyz commented Sep 27, 2016

Just rebased and updated. https://jsfiddle.net/keyanzhang/mmupy3zh/15/embedded/result/

@addyosmani
Copy link
Contributor

Beyond another rebase, is there further work to be done here before this lands? :)

@aweary
Copy link
Contributor

aweary commented Mar 6, 2017

@addyosmani it depends on facebook/fbjs#165 (which itself requires some rebasing), and it will also need to be implemented in ReactDOMFiber.

It's not clear what the status is here since it's been sitting here for so long without review, maybe @spicyj or @gaearon can clarify whether this is something that we still want to do.

@acdlite
Copy link
Collaborator

acdlite commented Mar 6, 2017

I believe this is on pause until we figure out a good public API for exposing hooks to warning and error reporting. @bvaughn built a version we use internally at Facebook that will inform what we do in open source.

@bvaughn
Copy link
Contributor

bvaughn commented Mar 6, 2017

There was also a related exploration on #8861 but as Andrew said, the team decided to put yellow box on hold for now in favor of higher-priority v16 stuff. We'll revisit it soon hopefully. 😄

@aweary
Copy link
Contributor

aweary commented Mar 6, 2017

Thanks for clarifying @acdlite @bvaughn! Should we close this then if it's not currently slated to be merged and isn't likely the implementation that will be used?

@bvaughn
Copy link
Contributor

bvaughn commented Mar 6, 2017

I think it's okay to close this PR for now. We may still end up using this as a starting point for whatever we do merge, but it's unlikely to be merged as-is.

@aweary aweary closed this Mar 6, 2017
@aweary
Copy link
Contributor

aweary commented Mar 6, 2017

@addyosmani thanks for bringing this to our attention again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants