PoC: support launch editor feature for selected component #20821
+94
−0
Conversation
|
Comparing: 1a74726...8d86de4 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
864dbfb
to
3f83e57
3f83e57
to
8d86de4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Summary
support launch editor feature
Original Feature Request #20435
When you inspected a react component, you can click the
launch editoricon to jump to your editor and navigate to the source code original file position.supoort set custom
launchEditorEndpointWhy we need this ? Because different launch editor server middleware use different endpoint.
create-react-appuser must use__open-stack-frame-in-editoras endpoint cause these hard code.launch-editor-middlewareuser often use__open-in-editoras endpoint.Both middleware have many user around world (and exist many custom middleware actually).
Issues need to fix
sourcepath is absolute(e.g./Users/iChenLei/Documents/cra/reactapp/src/App.js:24).create-react-app/react-dev-utilsto support absolute path.https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/launchEditor.js#L287-L290+ const filePath = path.relative(process.cwd(), fileName)launch editorfeature, Thanks forfacebook/reactofficial.common toastui component to show message about set custom endpoint success ? I think feedback is necessary.@bvaughn Sir, I need your code review and advices, thanks.
Test Plan
will add necessary unit test later