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

Use renderStacktrace prop if provided to render Error rep stacktrace #7140

Merged

Conversation

Projects
None yet
3 participants
@nchevobbe
Copy link
Member

nchevobbe commented Oct 23, 2018

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

Fixes #7130

@nchevobbe nchevobbe requested a review from janodvarko Oct 23, 2018

@darkwing

This comment has been minimized.

Copy link
Contributor

darkwing commented Oct 23, 2018

I don't think we want the change to assets/module-manifest.json

Use renderStacktrace prop if provided to render Error rep stacktrace
This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

@nchevobbe nchevobbe force-pushed the nchevobbe:error-rep-render-stacktrace branch from e4fbd5a to eb3bfc0 Oct 23, 2018

@nchevobbe

This comment has been minimized.

Copy link
Member Author

nchevobbe commented Oct 23, 2018

I don't think we want the change to assets/module-manifest.json

good catch!

@darkwing

This comment has been minimized.

Copy link
Contributor

darkwing commented Oct 24, 2018

@janodvarko Just a heads up you were requested for review here

@janodvarko
Copy link
Contributor

janodvarko left a comment

Looks good to me, thanks Nicolas!

Honza

@@ -20,7 +20,8 @@ const IGNORED_SOURCE_URLS = ["debugger eval code"];
ErrorRep.propTypes = {
object: PropTypes.object.isRequired,
// @TODO Change this to Object.values when supported in Node's version of V8
mode: PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key]))
mode: PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])),
renderStacktrace: PropTypes.func

This comment has been minimized.

Copy link
@janodvarko

janodvarko Oct 25, 2018

Contributor

It would be great to have an explanatory comment for the new prop

  renderStacktrace: PropTypes.func

This comment has been minimized.

Copy link
@nchevobbe

nchevobbe Oct 25, 2018

Author Member

done

@nchevobbe nchevobbe merged commit 90e0f6f into firefox-devtools:master Oct 25, 2018

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@nchevobbe nchevobbe deleted the nchevobbe:error-rep-render-stacktrace branch Oct 25, 2018

darkwing added a commit that referenced this pull request Oct 25, 2018

Use renderStacktrace prop if provided to render Error rep stacktrace (#…
…7140)

* Use renderStacktrace prop if provided to render Error rep stacktrace

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

* Update error.js

darkwing added a commit that referenced this pull request Oct 26, 2018

Use renderStacktrace prop if provided to render Error rep stacktrace (#…
…7140)

* Use renderStacktrace prop if provided to render Error rep stacktrace

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

* Update error.js

darkwing added a commit that referenced this pull request Oct 26, 2018

Use renderStacktrace prop if provided to render Error rep stacktrace (#…
…7140)

* Use renderStacktrace prop if provided to render Error rep stacktrace

This will allow us to use the same component
in the console and in reps for example.
If the prop is not passed, it defers to the
current stacktrace rendering.

* Update error.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.